Detox icon indicating copy to clipboard operation
Detox copied to clipboard

The app has not responded to the network requests below: (id = -1000) isReady: {}

Open andreasalt41 opened this issue 2 years ago • 4 comments

What happened?

Test is not able to start and stuck after app launches.

package-lock.json package.json

What was the expected behaviour?

Test Would start after "beforeAll" stage

Was it tested on latest Detox?

  • [X] I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.13.5 React Native version: 0.72.4 Has Fabric (React Native's new rendering system) enabled: no Node version: v16.13.0 Device model: iPhone13 iOS version: 15.0 macOS version: Ventura 13.5 Xcode version: Version 15.0 (15A240d) Test-runner (select one): jest

Detox logs

Detox logs [detox.log](https://github.com/wix/Detox/files/13390373/detox.log) [detox.trace.json](https://github.com/wix/Detox/files/13390374/detox.trace.json)

Device logs

Device logs [D046BA25-92E9-4E85-B58C-4DADFAA409B5 2023-11-17 09-50-56Z.startup.log.zip](https://github.com/wix/Detox/files/13390407/D046BA25-92E9-4E85-B58C-4DADFAA409B5.2023-11-17.09-50-56Z.startup.log.zip)

More data, please!

No response

andreasalt41 avatar Nov 17 '23 10:11 andreasalt41

Facing the same issue with Detox 20.13.5 RN 0.71.6 Xcode 15

matice2 avatar Nov 30 '23 12:11 matice2

Duplicate of #3949?

WolfyUK avatar Dec 06 '23 16:12 WolfyUK

I fuond the problem and I found a temporary workaround. Detox got stuck because i was testing a view that embeds a native-base Menu as you can see on the below code. The strange thing was that i was not testing the menu but a button inside the view. The only presence of the Menu let Detox to stuck when the view was rendered. By commenting the Menu solved the problem. Support is requested to find a lond term solution. Detox should support Native-Base Menu

` import React from 'react'; import type { Element } from 'react'; import { connect } from 'react-redux'; import { ImageBackground } from 'react-native'; import { View, Button, VStack, Menu, Image, } from 'native-base'; import { receiveLocale } from 'yeppik-common/lib/actions'; import type { Store } from 'yeppik-common/lib/flow-types'; import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'; import { faGlobe } from '@fortawesome/pro-regular-svg-icons/faGlobe'; import { faAngleDown } from '@fortawesome/pro-regular-svg-icons/faAngleDown'; import { faRight } from '@fortawesome/pro-solid-svg-icons/faRight'; import type { Navigation } from '../types';

import onboardingBg from '../../../assets/onboarding-bg1.webp'; import logo from '../../../assets/logoWhite.png'; import variables from '../../theme/variables/platform'; import { ButtonText } from '../common/translated';

type OwnProps = {| navigation: Navigation, |} type StateProps = {| locale: string, country: string, |};

type DispatchProps = {| handleUpdateLocale: (string) => any |};

type Props = {| ...OwnProps, ...StateProps, ...DispatchProps, |};

const styles = { imageBackground: { width: variables.deviceWidth, height: variables.deviceHeight, flex: 1, }, language: { it: 'Italiano', en: 'English', }, };

const imageHeight = variables.deviceWidth * 0.8;

const Onboarding = ({ locale, handleUpdateLocale, navigation, }: Props): Element<*> => ( <ImageBackground source={onboardingBg} style={styles.imageBackground}> <View alignContent="center" flex="1"> <VStack marginTop="5%" flex="1"> <Menu defaultIsOpen={false} trigger={triggerProps => ( <Button marginTop="15%" marginBottom="10%" alignSelf="flex-end" variant="ghost" colorScheme="primary" leftIcon={<FontAwesomeIcon icon={faGlobe} color="white" size={16} />} endIcon={<FontAwesomeIcon icon={faAngleDown} color="white" size={16} />} {...triggerProps} >

          {locale === 'en' ? 'English' : 'Italiano' }
        </Button>
      )}
    >
      <Menu.Item onPress={() => handleUpdateLocale('it')}>Italian</Menu.Item>
      <Menu.Item onPress={() => handleUpdateLocale('en')}>English</Menu.Item>
    </Menu>
    <Image alignSelf="center" source={logo} resizeMode="contain" height={imageHeight} marginTop="10%" alt="yeppik logo" />

    <View position="absolute" bottom="5%" flex="1" w={variables.deviceWidth}>
      <Button alignContent="center" marginBottom="5" marginLeft="10" marginRight="10" testID="START_" onPress={() => navigation.navigate('OnboardingWelcome')} endIcon={<FontAwesomeIcon icon={faRight} color="white" size={16} />}>
        <ButtonText color="white">START</ButtonText>
      </Button>
      <Button backgroundColor="white" marginLeft="10" testID="I_already_have_an_account" marginRight="10" onPress={() => navigation.navigate('Login')}>
        <ButtonText color="#0DA8E9">I already have an account</ButtonText>
      </Button>
    </View>

  </VStack>
</View>
);

const mapStateToProps = ({ locale, country }: Store): StateProps => ({ locale, country });

const mapDispatchToProps = (dispatch: Function): DispatchProps => ({ handleUpdateLocale: locale => dispatch(receiveLocale(locale)), });

export { Onboarding as UnconnectedOnboarding };

export default connect < Props, OwnProps, StateProps, DispatchProps, Store, _ >( mapStateToProps, mapDispatchToProps, )(Onboarding); `

asaltari avatar Dec 20 '23 09:12 asaltari

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

stale[bot] avatar Mar 17 '24 08:03 stale[bot]