Detox: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected

Created on 12 Mar 2020  ·  19Comments  ·  Source: wix/Detox

Describe the bug
We're unable to run detox tests on android. We have detox building and running successfully on iOS. On android detox builds successfully, installs on the emulator, launches on the emulator, the app then closes, and the tests eventually times out with the below logs. We've tried debug and release mode.

We've tried all workarounds on the following threads:

To Reproduce

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

Steps to reproduce:

Run the following command: yarn run detox test -c android.emu.debug --loglevel trace
Run the following command: yarn run detox test -c android.emu.release --loglevel trace

Expected behavior
The test should kick off after the app launches

Device and Verbose Detox Logs
logs attached
detox_pid_6340.json.log
detox_pid_6340.log
emulator-5554 2020-03-12 12-18-05Z.startup.log

Environment (please complete the following information):

  • Detox: 15.5.0
  • React Native: 0.61.5
  • Node: 8.16.0
  • Device: Pixel_API_27, Pixel_2_API_28, Pixel_3_API_29 emulators
  • OS: MacOS 10.14.6
  • Test-runner (select one): Jest
triagbug android 🏚 stale

Most helpful comment

Just an update on my project (with reference to @d4vidi answer above) that I was successfully able to detect the call made to the backend and was essentially holding the unit tests.
Resolving the fetch (either manual timeout or promise race) fixes the issue.
I am using waitFor(..) function in unit tests.

Thanks again for the library !

All 19 comments

@Imtiyaazg the device startup log shows severe error in the activity's onCreate. Are you certain that the app runs well on Android? Try to revisit your implementation of DetoxTest.java and see that the intent matches something your app can support.

@d4vidi , the app runs without any issues on android. The app launches and I can use it on the emulation as normal, even on the detox build.

My android:name is .MainActivity but when I change it to that it causes issues and does not build. So I've left it as MainActivity. I see your example app does the same so I assume it's fine like this.

the is my DetoxTest.java:

```package za.co.yoco;

import com.wix.detox.Detox;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;

@RunWith(AndroidJUnit4.class)
@LargeTest
public class DetoxTest {

@Rule
// Replace 'MainActivity' with the value of android:name entry in
// <activity> in AndroidManifest.xml
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);

@Test
public void runDetoxTests() {
    Detox.runTests(mActivityRule);
}

}

and my `MainActivity`:

```package za.co.yoco;

import android.content.pm.PackageManager;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import android.view.View;
import android.widget.Toast;
import android.content.Intent;

import com.facebook.soloader.SoLoader;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.yoco.ono.common.logging.Logger;
import com.yoco.sdk.payments.YocoPaymentSDK;
import com.yoco.sdk.permissions.LocationHandler;
import com.yoco.sdk.permissions.PermissionHandler;
import com.yocopos.compatibility.InitialAppProps;
import com.yocopos.compatibility.KeyboardAssistant;
import com.yocopos.compatibility.Util;

import io.branch.rnbranch.*;

public class MainActivity extends ReactActivity {

    private static final String TAG = MainActivity.class.getSimpleName();

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "YocoPOS";
    }

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        if (hasFocus) {
            Util.goFullScreen(this);
        }
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        SoLoader.init(this, false);
        super.onCreate(savedInstanceState);
        this.uiChangeListener();
        this.compatibilityKeyboardAssistant();

        YocoPaymentSDK.getInstance().getDefaultBus().unregister(this);
    }

    @Override
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
    }

    @Override
    public void onStop() {
        super.onStop();
        Logger.INSTANCE.d(TAG, "Unregister activity");
        YocoPaymentSDK.getInstance().setCurrentActivity(null);
    }

    @Override
    public void onResume() {
        super.onResume();
        Logger.INSTANCE.d(TAG, "Register activity");
        YocoPaymentSDK.getInstance().setCurrentActivity(this);

    }

    public void uiChangeListener() {
        final View decorView = getWindow().getDecorView();
        decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
            @Override
            public void onSystemUiVisibilityChange(int visibility) {
                if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
                    Util.goFullScreen(MainActivity.this);
                }
            }
        });
    }

    private void compatibilityKeyboardAssistant() {
        getWindow().getDecorView().getViewTreeObserver().addOnGlobalLayoutListener(new KeyboardAssistant(this));
    }

    @Override
    protected ReactActivityDelegate createReactActivityDelegate() {
        return new InitialAppProps(this, getMainComponentName());
    }

    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
        Logger.INSTANCE.d(TAG, "Code: " + requestCode + " permissions: " + permissions + " grantResults: " + grantResults);

        switch (requestCode) {
            case LocationHandler.LOCATION_PERMISSION_CODE: {
                // If request is cancelled, the result arrays are empty.
                if (grantResults.length > 0
                        && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                    LocationHandler.getInstance().registerForLocation();
                } else {
                    // Yes this looks nonsensical given the above @NonNull.  However since that annotation is
                    // advisory, we still actually need to do this.  :(
                    boolean showRationale = permissions != null && permissions.length > 0 &&
                                            ActivityCompat.shouldShowRequestPermissionRationale(this, permissions[0]);

                    if (!showRationale) {
                        LocationHandler.getInstance().checkedNeverAskAgain();
                    }
                    // permission denied, boo!
                    // Keep showing Location Services Required dialog
                }
                break;
            }
            case PermissionHandler.CAMERA_PERMISSION_CODE: {
                // Yes this looks nonsensical given the above @NonNull.  However since that annotation is
                // advisory, we still actually need to do this.  :(
                if (grantResults != null && grantResults.length > 1
                        && grantResults[0] == PackageManager.PERMISSION_GRANTED
                        && grantResults[1] == PackageManager.PERMISSION_GRANTED) {
                    YocoPaymentSDK.getInstance().checkPermissions(false);
                } else {
                    // permission denied, boo!
                    boolean showRationale = permissions != null && permissions.length > 1 &&
                                            ActivityCompat.shouldShowRequestPermissionRationale( this, permissions[0] ) &&
                                            ActivityCompat.shouldShowRequestPermissionRationale( this, permissions[1] );
                    String toastText = "Permissions are required to set an image from the camera";
                    if (!showRationale) {
                        toastText = "Please enable camera and storage permissions from the Yoco app settings in order to set an image from the camera.";
                        PermissionHandler.getInstance().cameraNeverShowChecked = true;
                        YocoPaymentSDK.getInstance().checkPermissions(false);
                    }
                    Toast toast = Toast.makeText(this, toastText, Toast.LENGTH_LONG);
                    toast.show();
                }
                break;
            }
            case PermissionHandler.IMAGES_PERMISSION_CODE: {
                // If request is cancelled, the result arrays are empty.
                // Yes this looks nonsensical given the above @NonNull.  However since that annotation is
                // advisory, we still actually need to do this.  :(
                if (grantResults != null && grantResults.length > 0
                        && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                    YocoPaymentSDK.getInstance().checkPermissions(false);
                } else {
                    // permission denied, boo!
                    boolean showRationale = permissions != null && permissions.length > 0 &&
                                            ActivityCompat.shouldShowRequestPermissionRationale( this, permissions[0] );
                    String toastText = "Permissions are required to pick an image";
                    if (!showRationale) {
                        toastText = "Please enable storage permissions from the Yoco app settings in order to pick an image.";
                        PermissionHandler.getInstance().imageNeverShowChecked = true;
                        YocoPaymentSDK.getInstance().checkPermissions(false);
                    }
                    Toast toast = Toast.makeText(this, toastText, Toast.LENGTH_LONG);
                    toast.show();
                }
                break;
            }
        }
    }

    @Override
    protected void onStart() {
        super.onStart();

        RNBranchModule.initSession(getIntent().getData(), this);
    }
}

Device logs after clean build and run:

@Imtiyaazg well from the logs, this is the error:

Native stacktrace dump: java.lang.RuntimeException: Could not launch intent Intent { act=android.intent.action.MAIN flg=0x14000000 cmp=za.co.yoco/.MainActivity (has extras) } within 45 seconds. Perhaps the main thread has not gone idle within a reasonable amount of time? There could be an animation or something constantly repainting the screen. Or the activity is doing network calls on creation? See the threaddump logs. For your reference the last time the event queue was idle before your activity launch request was 1584015439284 and now the last time the queue went idle was: 1584015439284. If these numbers are the same your activity might be hogging the event queue.

As explained, you need to check whether the activity loads properly and, more importantly, that it manages to go idle (see There could be an animation or something constantly repainting the screen).

All of this happens even before Detox initializes on the device... This is pure Android testings.

I added --debug-synchronization in my detox test command. So mine looks like:

detox test -c android.emu.debug --debug-synchronization --loglevel verbose.

This worked for me after looking at all the possible solutions the author of this issue stated above.

@treynoldsAxios debug-synchronization is for debugging - i.e. not meant to be used regularly.

@Imtiyaazg may I suggest one more thing: Try to strip down part of the init's and view content in your app's initial state, see if that helps narrow it down to where the problem is.

Hi, I am having the same issue while trying to run Detox tests.

Now, I have tried the solutions proposed in #1450 that is to add network_security_config.xml under _android/app/src/debug/res/xml_ and set "android:usesCleartextTraffic="true"" in the main AndroidManifest.xml

I also tried reverting back my sdk to 27 as I am running 28 at the moment but I had no luck.
I also increased the mocha timeout to 5 mins but again no luck there.
Is there another solution to the problem and is there something else that I can investigate ?

Thanks !

----------------- update 1 ---------------------
So after removing all the code from my App.js file and replacing it with simple render component, I WAS able to get the Detox talk to the app.
My app uses the nativeBase view components that is something like this:

return (
  <Root store={this.state.store}>
  <Provider store={this.state.store}>
    <View testID="myID" style={{width: '100%', height: '100%'}}>
      <StatusBar backgroundColor="black" barStyle="light-content" />
      <AppContainer ref={nav => { this.navigator = nav; }}/>
      <ConnectionRepeater store={this.state.store} navigation={this.props.navigation} />
      <AlertMessage store={this.state.store} />
      <InfoDropDown store={this.state.store} />
    </View>
  </Provider>
  </Root>
);

how this could prevent Detox from communicating with the app ?

@amirmatin it's possible that with more UI content your app never goes idle - e.g. due to recurring animations. I know Detox should better explain that but for now when that's the case you're likely to experience with what you've described.

@d4vidi thanks for the reply, one thing I noticed is that when I remove the code I posted above and replace it with a simple text field , the test actually runs and it is successful where I can also see the name of my test suite "describe('Example', () => {". in the console.

Is there anyway to control this behaviour ? ie force the app to be idle ?
Thanks!

Just an update on my project (with reference to @d4vidi answer above) that I was successfully able to detect the call made to the backend and was essentially holding the unit tests.
Resolving the fetch (either manual timeout or promise race) fixes the issue.
I am using waitFor(..) function in unit tests.

Thanks again for the library !

@amirmatin that's good to hear! Could you share the steps you took in order to be able to pinpoint the problem?

I had an issue with the same symptoms.
Detox: 16.2.0
React Native: 0.62.2

Like @amirmatin, I tried commenting stuff in App.js and got it to work eventually. Then I put the stuff back until it no longer worked.

For me it was calling AppState.addEventListener('change', ...) directly in componentDidMount.
When wrapped in a 1ms setTimout it works as expected.

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 reporsitory, read this discussion.

@amirmatin @marinescu-sorin thanks again for sharing your solutions. Nevertheless, just to emphasize this for future readers, the problem reported here is of an early-stage app crash rather than a "disconnect" one (from the tester-host). @Imtiyaazg anything else I could to help you with this?

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 reporsitory, read this discussion.

The issue has been closed for inactivity.

Detox: 17.2.0
React Native: 0.63.2

Still not working with version 0.63.2. App.js stuff did not work for me, still getting detox[80043] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=9b2bd5d0-fcb0-57f6-b673-817daac8972a)

iOS works just fine.

Unfortunately, i'm moving to Appium :(

Had this issue for a while and even after updating to the lates Detox (v17.4.2). Tried all recommended solutions I could find but none worked. In the end I compared the detox example app with mine and it turned out I was missing the androidx dependency in the build.gradle file

implementation 'androidx.appcompat:appcompat:1.1.0'

Once I added it and rebuilt the app, it all started to work.

I am stuck on the same error - detox[9168] TRACE: [DetoxServer.js/MESSAGE] role=tester action=invoke (sessionId=07ee9bc6-745f-84a4-5616-2bcf99916b12)
detox[9168] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=07ee9bc6-745f-84a4-5616-2bcf99916b12)

Tried changing targetSdkVersion to 27, an emulator for API 27, adding dependencies from the demo-react-native project. I still end up in this error on both release and debug for android. Everything is smooth on iOS.

@d4vidi Is there any worked out solution that you can suggest for this, tried a lot of things for this role=testee not connected, cannot fw action nothing seem to work. Appreciate any help on this.

Detox version: 17.5.7
RN version 61.5

al003110145:7now mmoha070$ detox test ... -l trace --record-logs all
detox[48328] INFO: [test.js] loglevel="trace" recordLogs="all" useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1600893587829 readOnlyEmu=false reportSpecs=true jest --config e2e/config.json --testNamePattern '^((?!:ios:).)*$' --maxWorkers 1 ...
● Deprecation Warning:

Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.

Please update your configuration.

Configuration Documentation:
https://jestjs.io/docs/configuration.html

detox[48330] TRACE: [Detox.js/DETOX_CREATE] created a Detox instance with config:
{"artifactsConfig":{"rootDir":"artifacts/android.emu.debug.2020-09-23 20-39-47Z","plugins":{"log":{"enabled":true,"keepOnlyFailedTestsArtifacts":false},"screenshot":{"enabled":true,"shouldTakeAutomaticSnapshots":false,"keepOnlyFailedTestsArtifacts":false},"video":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"instruments":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"timeline":{"enabled":false}},"pathBuilder":{"_rootDir":"artifacts/android.emu.debug.2020-09-23 20-39-47Z"}},"behaviorConfig":{"init":{"reinstallApp":true,"exposeGlobals":true,"launchApp":true},"cleanup":{"shutdownDevice":false}},"cliConfig":{"recordLogs":"all","forceAdbInstall":"false","loglevel":"trace","useCustomLogger":"true"},"deviceConfig":{"binaryPath":"android/app/build/outputs/apk/qa/release/app-qa-release.apk","build":"cd android && ./gradlew installQaRelease && ./gradlew assembleAndroidTest -DtestBuildType=release && cd ..","type":"android.emulator","device":"Pixel_2_XL_API_27"},"runnerConfig":{"testRunner":"jest","runnerConfig":"e2e/config.json","specs":"e2e"},"sessionConfig":{"autoStart":true,"server":"ws://localhost:58259","sessionId":"666c589b-4e4f-6d1a-a81a-a2a889120ec6"},"errorBuilder":{"filepath":"/Users/mmoha070/7Now/package.json","contents":{"test-runner":"jest","configurations":{"android.emu.debug":{"binaryPath":"android/app/build/outputs/apk/qa/release/app-qa-release.apk","build":"cd android && ./gradlew installQaRelease && ./gradlew assembleAndroidTest -DtestBuildType=release && cd ..","type":"android.emulator","device":"Pixel_2_XL_API_27"}}},"configurationName":"android.emu.debug"}}
detox[48330] INFO: [DetoxServer.js] server listening on localhost:58259...
detox[48330] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:58259
detox[48330] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"666c589b-4e4f-6d1a-a81a-a2a889120ec6","role":"tester"},"messageId":0}
detox[48330] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6
detox[48330] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6
detox[48330] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"666c589b-4e4f-6d1a-a81a-a2a889120ec6","role":"tester"},"messageId":0}

detox[48330] DEBUG: [exec.js/EXEC_CMD, #0] "/Users/mmoha070/Library/Android/sdk/emulator/emulator" -list-avds --verbose
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #0] 4.65_720p_Galaxy_Nexus_API_29
Galaxy_Nexus_API_28
Nexus_6P_API_28
Pixel_2_XL_API_27
Pixel_2_XL_API_29

detox[48330] DEBUG: [exec.js/EXEC_CMD, #1] "/Users/mmoha070/Library/Android/sdk/emulator/emulator" -version
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #1] Android emulator version 30.0.12.0 (build_id 6466327) (CL:N/A)
Copyright (C) 2006-2017 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator (www.qemu.org).

This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

detox[48330] DEBUG: [EmulatorVersionResolver.js/EMU_BIN_VERSION_DETECT] Detected emulator binary version { major: 30, minor: 0, patch: 12, toString: [Function: toString] }
detox[48330] DEBUG: [AndroidDriver.js/ALLOCATE_DEVICE] Trying to allocate a device based on "Pixel_2_XL_API_27"
detox[48330] DEBUG: [exec.js/EXEC_CMD, #2] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" devices
detox[48330] DEBUG: [exec.js/EXEC_SUCCESS, #2] List of devices attached
emulator-5554 device
emulator-5556 device

detox[48330] TRACE: [EmulatorTelnet.js/TELNET_CONNECTING] port: 5554, host: localhost
detox[48330] DEBUG: [FreeDeviceFinder.js/DEVICE_LOOKUP] Device emulator-5554 does not match "Pixel_2_XL_API_27"
detox[48330] TRACE: [EmulatorTelnet.js/TELNET_CONNECTING] port: 5556, host: localhost
detox[48330] DEBUG: [FreeDeviceFinder.js/DEVICE_LOOKUP] Found a matching & free device emulator-5556
detox[48330] DEBUG: [AndroidDriver.js/ALLOCATE_DEVICE] Settled on emulator-5556
detox[48330] DEBUG: [exec.js/EXEC_CMD, #3] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "getprop dev.bootcomplete"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #3] 1

detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBootDevice({ coldBoot: false,
deviceId: 'emulator-5556',
type: 'Pixel_2_XL_API_27' })
detox[48330] DEBUG: [exec.js/EXEC_CMD, #4] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "getprop ro.build.version.sdk"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #4] 27

detox[48330] DEBUG: [exec.js/EXEC_CMD, #5] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "settings put global animator_duration_scale 0"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #5]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #6] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "settings put global window_animation_scale 0"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #6]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #7] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "settings put global transition_animation_scale 0"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #7]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #8] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "dumpsys power | grep \"^[ ]m[UW].=\""
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #8] mWakefulness=Awake
mWakefulnessChanging=false
mWakeLockSummary=0x0
mUserActivitySummary=0x1
mWakeUpWhenPluggedOrUnpluggedConfig=false
mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false
mUserActivityTimeoutOverrideFromWindowManager=-1
mUserInactiveOverrideFromWindowManager=false

detox[48330] DEBUG: [exec.js/EXEC_CMD, #9] "/Users/mmoha070/Library/Android/sdk/build-tools/30.0.2/aapt" dump badging "/Users/mmoha070/7Now/android/app/build/outputs/apk/qa/release/app-qa-release.apk" | grep -e "package: name="
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #9] package: name='com.seven.eleven.phoenix.qa' versionCode='2097208' versionName='3.0.8.1-qa' compileSdkVersion='29' compileSdkVersionCodename='10'

detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeUninstallApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa' })
detox[48330] DEBUG: [exec.js/EXEC_CMD, #10] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "pm list packages com.seven.eleven.phoenix.qa"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #10] package:com.seven.eleven.phoenix.qa.debug.test
package:com.seven.eleven.phoenix.qa.test
package:com.seven.eleven.phoenix.qa
package:com.seven.eleven.phoenix.qa.debug

detox[48330] DEBUG: [exec.js/EXEC_CMD, #11] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 uninstall com.seven.eleven.phoenix.qa
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #11] Success

detox[48330] DEBUG: [exec.js/EXEC_CMD, #12] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "pm list packages com.seven.eleven.phoenix.qa.test"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #12] package:com.seven.eleven.phoenix.qa.test

detox[48330] DEBUG: [exec.js/EXEC_CMD, #13] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 uninstall com.seven.eleven.phoenix.qa.test
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #13] Success

detox[48330] DEBUG: [exec.js/EXEC_CMD, #14] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "rm -fr /data/local/tmp/detox"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #14]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #15] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "mkdir -p /data/local/tmp/detox"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #15]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #16] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 push "/Users/mmoha070/7Now/android/app/build/outputs/apk/qa/release/app-qa-release.apk" "/data/local/tmp/detox/Application.apk"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #16] /Users/mmoha070/7Now/android/app/build/outputs/apk/qa/release/app-qa-release.apk: 1 file pushed, 0 skipped. 110.2 MB/s (29193588 bytes in 0.253s)

detox[48330] DEBUG: [exec.js/EXEC_CMD, #17] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #17] Success

detox[48330] DEBUG: [exec.js/EXEC_CMD, #18] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 push "/Users/mmoha070/7Now/android/app/build/outputs/apk/androidTest/qa/release/app-qa-release-androidTest.apk" "/data/local/tmp/detox/Test.apk"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #18] /Users/mmoha070/7Now/android/app/build/outputs/apk/androidTest/qa/release/app-qa-release-androidTest.apk: 1 file pushed, 0 skipped. 209.0 MB/s (756167 bytes in 0.003s)

detox[48330] DEBUG: [exec.js/EXEC_CMD, #19] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "pm install -r -g -t /data/local/tmp/detox/Test.apk"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #19] Success

detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa' })
detox[48330] DEBUG: [exec.js/EXEC_CMD, #20] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "am force-stop com.seven.eleven.phoenix.qa"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #20]
detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onTerminateApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa' })
detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa',
launchArgs:
{ detoxServer: 'ws://localhost:58259',
detoxSessionId: '666c589b-4e4f-6d1a-a81a-a2a889120ec6' } })
detox[48330] DEBUG: [exec.js/EXEC_CMD, #21] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "date +\"%m-%d %T.000\""
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #21] 09-23 15:39:55.000

detox[48330] DEBUG: [exec.js/EXEC_CMD, #22] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 reverse tcp:58259 tcp:58259
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #22]
detox[48330] DEBUG: [exec.js/EXEC_CMD, #23] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "pm list instrumentation"
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #23] instrumentation:com.android.emulator.smoketests/android.support.test.runner.AndroidJUnitRunner (target=com.android.emulator.smoketests)
instrumentation:com.seven.eleven.phoenix.qa.test/androidx.test.runner.AndroidJUnitRunner (target=com.seven.eleven.phoenix.qa)
instrumentation:com.seven.eleven.phoenix.qa.debug.test/androidx.test.runner.AndroidJUnitRunner (target=com.seven.eleven.phoenix.qa.debug)
instrumentation:org.chromium.webview_shell/.WebViewLayoutTestRunner (target=org.chromium.webview_shell)

detox[48330] DEBUG: [exec.js/SPAWN_CMD, #24] [pid=48368] /Users/mmoha070/Library/Android/sdk/platform-tools/adb -s emulator-5556 shell am instrument -w -r -e detoxServer ws://localhost:58259 -e detoxSessionId 666c589b-4e4f-6d1a-a81a-a2a889120ec6 -e debug false com.seven.eleven.phoenix.qa.test/androidx.test.runner.AndroidJUnitRunner
detox[48330] DEBUG: [exec.js/EXEC_CMD, #25] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "ps | grep \"com.seven.eleven.phoenix.qa$\""
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #25] u0_a83 5215 1569 1460516 104932 ep_poll 0 S com.seven.eleven.phoenix.qa

detox[5215] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa',
launchArgs:
{ detoxServer: 'ws://localhost:58259',
detoxSessionId: '666c589b-4e4f-6d1a-a81a-a2a889120ec6' },
pid: 5215 })
detox[48330] TRACE: [Artifact.js/START] starting ADBLogcatRecording
detox[48330] DEBUG: [exec.js/SPAWN_CMD, #26] [pid=48370] /Users/mmoha070/Library/Android/sdk/platform-tools/adb -s emulator-5556 shell "logcat -T \"09-23 15:39:55.000\" --pid=5215 -f /sdcard/153950271_0.log"
detox[48330] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[48330] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6)
detox[48330] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6)
detox[48330] TRACE: [exec.js/SPAWN_STDOUT, #24] INSTRUMENTATION_STATUS: class=com.seven.eleven.phoenix.DetoxTest
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
com.seven.eleven.phoenix.DetoxTest:
INSTRUMENTATION_STATUS: test=runDetoxTests
INSTRUMENTATION_STATUS_CODE: 1

detox[48330] DEBUG: [exec.js/EXEC_CMD, #27] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell du /sdcard/153950271_0.log
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #27] 48 /sdcard/153950271_0.log

detox[48330] INFO: at e2e/FetchPickupToken.js:41:19
All tests started
detox[48330] INFO: at e2e/FetchPickupToken.js:42:19
Before all Has started
detox[48330] INFO: at e2e/FetchPickupToken.js:70:21
Response status200
detox[48330] INFO: at e2e/FetchPickupToken.js:72:21
count1[object Object]
detox[48330] INFO: at e2e/FetchPickupToken.js:74:21
NewToken_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcl9pZCI6ImU4NjAyMWIwLWZhY2UtNDI2My1iYWMzLWY5OWYxN2NmYTQwNSIsImxveWFsdHlfaWQiOiIxNzU4NzczMzAwMzczNzc0NTcwIiwic2NvcGUiOlsic2lnbmVkSW4iXSwiYWNjZXNzX3Rva2VuIjoiamFLaTdEcGNBbnpKN1dDc3ZHYVlLMEh0NWdnZmRRIiwicmVmcmVzaF90b2tlbiI6ImlhUVR0bkFEcHBFeWRSU2F0WFU1QVBubzV2bDg2ZCIsImlhdCI6MTYwMDg5MzcxMSwiZXhwIjoxNjAwOTgwMTExfQ.O87Fi79VtzrHUkUQEUaxrD_iQNtmge4bXi8NN-DwwfQ
detox[48330] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR]
{ DetoxRuntimeError: Aborted detox.init() execution, and now running detox.cleanup()

HINT: Most likely, your test runner is tearing down the suite due to the timeout error
at Detox.[_assertNoPendingInit] (/Users/mmoha070/7Now/node_modules/detox/src/Detox.js:204:9)
at Detox.beforeEach (/Users/mmoha070/7Now/node_modules/detox/src/Detox.js:111:37)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (/Users/mmoha070/7Now/node_modules/detox/src/DetoxExportWrapper.js:87:32)
at DetoxAdapterImpl.beforeEach (/Users/mmoha070/7Now/node_modules/detox/runners/jest/DetoxAdapterImpl.js:28:22)
at process._tickCallback (internal/process/next_tick.js:68:7) name: 'DetoxRuntimeError' }
detox[48330] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ deviceId: 'emulator-5556',
bundleId: 'com.seven.eleven.phoenix.qa',
launchArgs:
{ detoxServer: 'ws://localhost:58259',
detoxSessionId: '666c589b-4e4f-6d1a-a81a-a2a889120ec6' } })
detox[48330] DEBUG: [exec.js/EXEC_CMD, #28] "/Users/mmoha070/Library/Android/sdk/platform-tools/adb" -s emulator-5556 shell "date +\"%m-%d %T.000\""
detox[48330] TRACE: [exec.js/EXEC_SUCCESS, #28] 09-23 15:41:52.000

detox[48330] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"invoke","params":{"target":{"type":"Class","value":"com.wix.detox.Detox"},"method":"launchMainActivity","args":[]},"messageId":1}
detox[48330] TRACE: [DetoxServer.js/MESSAGE] role=tester action=invoke (sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6)
detox[48330] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=666c589b-4e4f-6d1a-a81a-a2a889120ec6)

Was this page helpful?
0 / 5 - 0 ratings