Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
Network response timeout after errors when working with Animated API inside Expo

I have been trying to learn to use the Animated API but have been encountering unexplained network response timeouts after the app throws an error such as.

TypeError: undefined is not an object (evaluating 'animations[current].start') or Invariant Violation: Transform with key of "rotate" must be a string: {"rotate":3.141592653589793}

I am using android studio to emulate a device to display the app on but im working on the app and running expo from VS code.

Even if I kill the expo instance in the console and reload it with a different component not containing the animations I was working on, I still get a blue screen on the emulated device stating "Something went wrong, Network response timed out".

the strange thing is it will inexplicably start working again after repeated refreshes and resets whereupon it will build a new bundle and work, until another error is thrown then it breaks all over again, which makes debugging it quite challenging.

code I am working on is:

    import React, { useEffect, useRef, useState } from 'react';
import { Animated, Easing, View, StyleSheet } from 'react-native';


const AnimPractice = () => {

    const progress = useRef(new Animated.Value(0.5)).current
    const scale = useRef(new Animated.Value(1)).current


    useEffect(() => {
        
        Animated.sequence([
            Animated.spring(progress, { toValue: 1, useNativeDriver: true} ).start(),
            Animated.spring(progress, { toValue: 0.5, useNativeDriver: true} ).start()
        ]).start();

        Animated.sequence([
            Animated.spring(scale, { toValue: 2, useNativeDriver: true}).start(),
            Animated.spring(progress, { toValue: 1, useNativeDriver: true} ).start()
        ]).start();
        

    },[])

    return (
        <View style={styles.container}>
            <Animated.View style={[styles.square, 
                {
                    borderRadius: progress.interpolate({inputRange: [0.5, 1], outputRange: [(0.5 * SIZE) / 2, (1 * SIZE) / 2]}),
                    opacity: progress, 
                    transform: [{ scale }, { rotate: progress.interpolate({inputRange: [0.5, 1] , outputRange: [0.5 * 2 * Math.PI, 1 * 2 * Math.PI]})}]
                }
            ]} 
            />
        </View>
    );
}

const SIZE = 100;

const styles = StyleSheet.create({
    
    container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: "center",
        justifyContent: "center"
    },
    square: {
        width: SIZE,
        height: SIZE,
        backgroundColor: "orange",
    }
})

export default AnimPractice;

All I can say is that its a good job the office doesn't have windows or the computer would have gone out of one around lunchtime! Any help would be gratefully accepted.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda