Closed gezquinndesign closed 1 year ago
Found a workaround...adding this line to android/app/build.gradle
under dependencies
section...
androidTestImplementation('org.hamcrest:hamcrest:2.2')
...resulted in expected behaviour. Do you want me to update the documentation to include this line or should it go somewhere in the code?
@gezquinndesign thanks for the update! @d4vidi let's take this into consideration while working on the RN .71 upgrade for our test app.
@gezquinndesign hamcrest
comes as an indirect dependency of espresso-core
itself, which comes from Detox, and therefore is not required to be explicitly specified as a dependency. Have you by any chance added detox
to your build.gradle
in a non-standard way? Could you share a snippet of that? Alternatively, have you by any chance applied any custom gradle configurations that would affect dependency resolution (reference)
Here is the build.gradle from my repro. I followed the install instructions on the detox website.
So it's a bare npx react-native init
project with no custom additions to the config other than those required by detox. The issue only appears when react-native-track-player
is installed. Otherwise it's fine. It might be an issue with their package.
Would you mind removing androidTestImplementation('org.hamcrest:hamcrest:2.2')
, then running under android/
- ./gradlew :app:dependencies
and pasting the result?
Here you go...
Apparently there are differences dependencies-wise between Detox as a standalone project and as a library. Gradle works in mysterious ways... 😄 I'll adjust the libraries deps to require hamcrest 2.2 explicitly. Thanks!
😄 ah ha! Interesting. Happy to help. Thank you.
On Sun, 26 Feb 2023 at 20:20, d4vidi @.***> wrote:
Apparently there are differences dependencies-wise between Detox as a standalone project and as a library. Gradle works in mysterious ways... 😄 I'll adjust the libraries deps to require hamcrest 2.2 explicitly. Thanks!
— Reply to this email directly, view it on GitHub https://github.com/wix/Detox/issues/3920#issuecomment-1445457528, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZNMXHMNC3EUBE5XYHNEGTWZO3HJANCNFSM6AAAAAAUV6JLOY . You are receiving this because you were mentioned.Message ID: @.***>
@gezquinndesign please try removing androidTestImplementation('org.hamcrest:hamcrest:2.2')
with the fresh release of Detox - v20.4.0
.
Works on 20.4.0
. Thanks
What happened?
Tests are running fine until I add
react-native-track-player@3.2.0
. The app works fine, but when trying to run the tests, they fail with the above message at the top of the stack trace, failing atdevice.launchApp()
anddevice.reloadReactNative()
. If these steps are removed, the tests (creating screenshots) still work but the app doesn't open.What was the expected behaviour?
For the app to open and the tests to run (create/save a screenshot).
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
You can find the basic repo here: https://github.com/gezquinndesign/AndroidRefresh
In what environment did this happen?
Detox version: 20.1.3 React Native version: 0.71.2 Has Fabric (React Native's new rendering system) enabled: no Node version: 18.14.0 Device model: Pixel_6_API_31 Emulator Android version: 12 Test-runner (select one): jest
Detox logs
Detox logs
``` 01:16:34.376 detox[1519] B lifecycle node_modules/.bin/detox test --configuration android.emu.debug --loglevel trace data: { "id": "34dd40c2-f504-a850-871a-a9fc982ead2b", "detoxConfig": { "configurationName": "android.emu.debug", "apps": { "default": { "type": "android.apk", "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk", "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug", "reversePorts": [ 8081 ] } }, "artifacts": { "rootDir": "artifacts/android.emu.debug.2023-02-09 01-16-34Z", "plugins": { "log": { "enabled": false, "keepOnlyFailedTestsArtifacts": false }, "screenshot": { "enabled": true, "shouldTakeAutomaticSnapshots": false, "keepOnlyFailedTestsArtifacts": false }, "video": { "enabled": false, "keepOnlyFailedTestsArtifacts": false }, "instruments": { "enabled": false, "keepOnlyFailedTestsArtifacts": false }, "uiHierarchy": { "enabled": false, "keepOnlyFailedTestsArtifacts": false } } }, "behavior": { "init": { "keepLockFile": false, "reinstallApp": true, "exposeGlobals": true }, "cleanup": { "shutdownDevice": false }, "launchApp": "auto" }, "cli": { "configuration": "android.emu.debug", "loglevel": "trace" }, "device": { "type": "android.emulator", "device": { "avdName": "Pixel_6_API_31" } }, "logger": { "level": "trace", "overrideConsole": true, "options": { "showLoggerName": true, "showPid": true, "showLevel": false, "showMetadata": false, "basepath": "/Volumes/GIT/AndroidRefresh/node_modules/detox/src", "prefixers": {}, "stringifiers": {} } }, "testRunner": { "retries": 0, "forwardEnv": false, "bail": false, "jest": { "setupTimeout": 120000, "teardownTimeout": 30000, "retryAfterCircusRetries": false, "reportWorkerAssign": true }, "args": { "$0": "jest", "_": [], "config": "e2e/jest.config.js", "--": [] } }, "session": { "autoStart": true, "debugSynchronization": 10000 } }, "detoxIPCServer": "primary-1519", "testResults": [], "testSessionIndex": 0, "workersCount": 0 } 01:16:34.395 detox[1519] i ipc Server path not specified, so defaulting to ipc.config.socketRoot + ipc.config.appspace + ipc.config.id /tmp/detox.primary-1519 01:16:34.397 detox[1519] i ipc starting server on /tmp/detox.primary-1519 01:16:34.399 detox[1519] i ipc starting TLS server false 01:16:34.400 detox[1519] i ipc starting server as Unix || Windows Socket 01:16:34.417 detox[1519] i ws-server Detox server listening on localhost:53846... 01:16:34.422 detox[1519] i lifecycle Serialized the session state at: /private/var/folders/6z/zk6rx2r901d9_jq7lsn7k3vh0000gn/T/34dd40c2-f504-a850-871a-a9fc982ead2b.detox.json 01:16:34.426 detox[1519] B lifecycle jest --config e2e/jest.config.js watchman warning: Recrawled this watch 13 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Volumes/GIT/AndroidRefresh' ; watchman watch-project '/Volumes/GIT/AndroidRefresh'` Determining test suites to run...01:16:35.592 detox[1520] i ipc Service path not specified, so defaulting to ipc.config.socketRoot + ipc.config.appspace + id 01:16:35.605 detox[1520] i ipc requested connection to primary-1519 /tmp/detox.primary-1519 01:16:35.606 detox[1520] i ipc Connecting client on Unix Socket : /tmp/detox.primary-1519 01:16:35.607 detox[1519] i ipc ## socket connection to server detected ## 01:16:35.612 detox[1520] i ipc retrying reset 01:16:35.614 detox[1520] i ipc dispatching event to primary-1519 /tmp/detox.primary-1519 : registerContext , { id: 'secondary-1520' } 01:16:35.617 detox[1519] i ipc received event of : registerContext { id: 'secondary-1520' } 01:16:35.620 detox[1519] i ipc dispatching event to socket : registerContextDone { testResults: [], testSessionIndex: 0 } 01:16:35.622 detox[1520] i ipc ## received events ## 01:16:35.624 detox[1520] i ipc detected event registerContextDone { testResults: [], testSessionIndex: 0 } 01:16:35.703 detox[1520] B lifecycle e2e/starter.test.js 01:16:35.728 detox[1520] B lifecycle set up environment 01:16:35.729 detox[1520] i ipc dispatching event to primary-1519 /tmp/detox.primary-1519 : registerWorker , { workerId: 'w1' } RUNS e2e/starter.test.js 01:16:35.730 detox[1519] i ipc received event of : registerWorker { workerId: 'w1' } 01:16:35.733 detox[1519] i ipc dispatching event t01:16:35.734 detox[1520] i ipc ## received events ## 01:16:35.735 detox[1520] i ipc detected event registerWorkerDone { workersCount: 1 } RUNS e2e/starter.test.js 01:16:35.734 detox[1519] i ipc broadcasting event to all known sockets listening to /tmp/detox.prim01:16:35.957 detox[1520] i ipc ## received events ## 01:16:35.958 detox[1520] i ipc detected event sessionStateUpdate { workersCount: 1 } 01:16:35.965 detox[1520] i ws-client opened web socket to: ws://localhost:53846 RUNS e2e/starter.test.js 01:16:35.968 detox[1520] i ws-client send messaget data: {"type":"login","params":{"sessionId":"6f92a045-8925-82bd-b24c-f2f461fe96b7","role":"tester"},"messageId":0} RUNS e2e/starter.test.js 01:16:35.970 detox[1519] i ws-server@53856 get data: {"type":"login","params":{"sessionId":"6f92a045-8925-82bd-b24c-f2f461fe96b7","role":"tester"},"messageId":0} 01:16:35.972 detox[1519] i ws-server created session 6f92a045-8925-82bd-b24c-f2f461fe96b7 01:16:35.975 detox[1519] i ws-server@53856 send data: { "type": "loginSuccess", "params": { "testerConnected": true, "appConnected": false }, "messageId": 0 } 01:16:35.976 detox[1520] i ws-client get messageed data: {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":false},"messageId":0} 01:16:36.036 detox[1520] B device allocate args: ({"type":"android.emulator","device":{"avdName":"Pixel_6_API_31"}}) 01:16:36.037 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/emulator/emulator" -list-avds --verbose 01:16:36.084 detox[1520] i child-process:EXEC_SUCCESS Pixel_6_API_31 01:16:36.085 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/emulator/emulator" -version 01:16:36.172 detox[1520] i child-process:EXEC_SUCCESS Android emulator version 31.2.10.0 (build_id 8420304) (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. 01:16:36.173 detox[1520] i device Detected emulator binary version { major: 31, minor: 2, patch: 10, toString: [Function: toString] } 01:16:36.173 detox[1520] i device:ALLOCATE_DEVICE Trying to allocate a device based on "Pixel_6_API_31" 01:16:36.174 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" devices 01:16:36.217 detox[1520] i child-process:EXEC_SUCCESS List of devices attached emulator-5554 device 01:16:36.219 detox[1520] i device:TELNET_CONNECTING port: 5554, host: localhost 01:16:36.228 detox[1520] i device:DEVICE_LOOKUP Found a matching & free device emulator-5554 01:16:36.229 detox[1520] i device:ALLOCATE_DEVICE Settled on emulator-5554 01:16:36.229 detox[1520] B device _launchEmulator args: ("Pixel_6_API_31", "emulator-5554", true, {"port":null}) 01:16:36.230 detox[1520] B device _awaitEmulatorBoot args: ("emulator-5554") 01:16:36.230 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "getprop dev.bootcomplete" 01:16:36.286 detox[1520] i child-process:EXEC_SUCCESS 1 01:16:36.287 detox[1520] E device _awaitEmulatorBoot 01:16:36.287 detox[1520] B artifacts-manager onBootDevice args: ({"deviceId":"emulator-5554","type":"Pixel_6_API_31","coldBoot":false}) 01:16:36.287 detox[1520] E artifacts-manager onBootDevice 01:16:36.287 detox[1520] E device _launchEmulator 01:16:36.288 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "getprop ro.build.version.sdk" 01:16:36.336 detox[1520] i child-process:EXEC_SUCCESS 31 01:16:36.336 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "settings put global animator_duration_scale 0" 01:16:36.398 detox[1520] i child-process:EXEC_SUCCESS 01:16:36.399 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "settings put global window_animation_scale 0" 01:16:36.452 detox[1520] i child-process:EXEC_SUCCESS 01:16:36.452 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "settings put global transition_animation_scale 0" 01:16:36.506 detox[1520] i child-process:EXEC_SUCCESS 01:16:36.507 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "dumpsys power | grep \"^[ ]*m[UW].*=\"" 01:16:36.579 detox[1520] i child-process:EXEC_SUCCESS mWakefulness=Awake mWakefulnessChanging=false mWakeLockSummary=0x0 mWakeUpWhenPluggedOrUnpluggedConfig=false mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false mUserActivityTimeoutOverrideFromWindowManager=-1 mUserInactiveOverrideFromWindowManager=false mUserId=0 mWakeLockSummary=0x0 mUserInteractionBackoffMillis=60000 01:16:36.579 detox[1520] E device allocate 01:16:36.602 detox[1520] B device installUtilBinaries args: () 01:16:36.602 detox[1520] E device installUtilBinaries 01:16:36.603 detox[1520] B device selectApp args: ("default") 01:16:36.604 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/build-tools/33.0.0/aapt" dump badging "/Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/debug/app-debug.apk" 01:16:36.683 detox[1520] i child-process:EXEC_SUCCESS package: name='com.androidrefresh' versionCode='1' versionName='1.0' platformBuildVersionName='13' platformBuildVersionCode='33' compileSdkVersion='33' compileSdkVersionCodename='13' sdkVersion:'21' targetSdkVersion:'33' uses-permission: name='android.permission.SYSTEM_ALERT_WINDOW' uses-permission: name='android.permission.INTERNET' uses-permission: name='android.permission.ACCESS_WIFI_STATE' uses-permission: name='android.permission.WAKE_LOCK' uses-permission: name='android.permission.FOREGROUND_SERVICE' uses-permission: name='android.permission.ACCESS_NETWORK_STATE' uses-permission: name='com.androidrefresh.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION' application-label:'AndroidRefresh' application-label-af:'AndroidRefresh' application-label-am:'AndroidRefresh' application-label-ar:'AndroidRefresh' application-label-as:'AndroidRefresh' application-label-az:'AndroidRefresh' application-label-be:'AndroidRefresh' application-label-bg:'AndroidRefresh' application-label-bn:'AndroidRefresh' application-label-bs:'AndroidRefresh' application-label-ca:'AndroidRefresh' application-label-cs:'AndroidRefresh' application-label-da:'AndroidRefresh' application-label-de:'AndroidRefresh' application-label-el:'AndroidRefresh' application-label-en-AU:'AndroidRefresh' application-label-en-CA:'AndroidRefresh' application-label-en-GB:'AndroidRefresh' application-label-en-IN:'AndroidRefresh' application-label-en-XC:'AndroidRefresh' application-label-es:'AndroidRefresh' application-label-es-US:'AndroidRefresh' application-label-et:'AndroidRefresh' application-label-eu:'AndroidRefresh' application-label-fa:'AndroidRefresh' application-label-fi:'AndroidRefresh' application-label-fr:'AndroidRefresh' application-label-fr-CA:'AndroidRefresh' application-label-gl:'AndroidRefresh' application-label-gu:'AndroidRefresh' application-label-hi:'AndroidRefresh' application-label-hr:'AndroidRefresh' application-label-hu:'AndroidRefresh' application-label-hy:'AndroidRefresh' application-label-in:'AndroidRefresh' application-label-is:'AndroidRefresh' application-label-it:'AndroidRefresh' application-label-iw:'AndroidRefresh' application-label-ja:'AndroidRefresh' application-label-ka:'AndroidRefresh' application-label-kk:'AndroidRefresh' application-label-km:'AndroidRefresh' application-label-kn:'AndroidRefresh' application-label-ko:'AndroidRefresh' application-label-ky:'AndroidRefresh' application-label-lo:'AndroidRefresh' application-label-lt:'AndroidRefresh' application-label-lv:'AndroidRefresh' application-label-mk:'AndroidRefresh' application-label-ml:'AndroidRefresh' application-label-mn:'AndroidRefresh' application-label-mr:'AndroidRefresh' application-label-ms:'AndroidRefresh' application-label-my:'AndroidRefresh' application-label-nb:'AndroidRefresh' application-label-ne:'AndroidRefresh' application-label-nl:'AndroidRefresh' application-label-or:'AndroidRefresh' application-label-pa:'AndroidRefresh' application-label-pl:'AndroidRefresh' application-label-pt:'AndroidRefresh' application-label-pt-BR:'AndroidRefresh' application-label-pt-PT:'AndroidRefresh' application-label-ro:'AndroidRefresh' application-label-ru:'AndroidRefresh' application-label-si:'AndroidRefresh' application-label-sk:'AndroidRefresh' application-label-sl:'AndroidRefresh' application-label-sq:'AndroidRefresh' application-label-sr:'AndroidRefresh' application-label-sr-Latn:'AndroidRefresh' application-label-sv:'AndroidRefresh' application-label-sw:'AndroidRefresh' application-label-ta:'AndroidRefresh' application-label-te:'AndroidRefresh' application-label-th:'AndroidRefresh' application-label-tl:'AndroidRefresh' application-label-tr:'AndroidRefresh' application-label-uk:'AndroidRefresh' application-label-ur:'AndroidRefresh' application-label-uz:'AndroidRefresh' application-label-vi:'AndroidRefresh' application-label-zh-CN:'AndroidRefresh' application-label-zh-HK:'AndroidRefresh' application-label-zh-TW:'AndroidRefresh' application-label-zu:'AndroidRefresh' application-icon-120:'res/mipmap-mdpi-v4/ic_launcher.png' application-icon-160:'res/mipmap-mdpi-v4/ic_launcher.png' application-icon-240:'res/mipmap-hdpi-v4/ic_launcher.png' application-icon-320:'res/mipmap-xhdpi-v4/ic_launcher.png' application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png' application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png' application-icon-65534:'res/mipmap-mdpi-v4/ic_launcher.png' application: label='AndroidRefresh' icon='res/mipmap-mdpi-v4/ic_launcher.png' application-debuggable launchable-activity: name='com.androidrefresh.MainActivity' label='AndroidRefresh' icon='' feature-group: label='' uses-feature: name='android.hardware.faketouch' uses-implied-feature: name='android.hardware.faketouch' reason='default feature for all apps' uses-feature: name='android.hardware.screen.portrait' uses-implied-feature: name='android.hardware.screen.portrait' reason='one or more activities have specified a portrait orientation' uses-feature: name='android.hardware.wifi' uses-implied-feature: name='android.hardware.wifi' reason='requested android.permission.ACCESS_WIFI_STATE permission' main other-activities other-receivers other-services supports-screens: 'small' 'normal' 'large' 'xlarge' supports-any-density: 'true' locales: '--_--' 'af' 'am' 'ar' 'as' 'az' 'be' 'bg' 'bn' 'bs' 'ca' 'cs' 'da' 'de' 'el' 'en-AU' 'en-CA' 'en-GB' 'en-IN' 'en-XC' 'es' 'es-US' 'et' 'eu' 'fa' 'fi' 'fr' 'fr-CA' 'gl' 'gu' 'hi' 'hr' 'hu' 'hy' 'in' 'is' 'it' 'iw' 'ja' 'ka' 'kk' 'km' 'kn' 'ko' 'ky' 'lo' 'lt' 'lv' 'mk' 'ml' 'mn' 'mr' 'ms' 'my' 'nb' 'ne' 'nl' 'or' 'pa' 'pl' 'pt' 'pt-BR' 'pt-PT' 'ro' 'ru' 'si' 'sk' 'sl' 'sq' 'sr' 'sr-Latn' 'sv' 'sw' 'ta' 'te' 'th' 'tl' 'tr' 'uk' 'ur' 'uz' 'vi' 'zh-CN' 'zh-HK' 'zh-TW' 'zu' densities: '120' '160' '240' '320' '480' '640' '65534' native-code: 'arm64-v8a' 'armeabi-v7a' 'x86' 'x86_64' 01:16:36.684 detox[1520] E device selectApp 01:16:36.685 detox[1520] B device uninstallApp args: () 01:16:36.686 detox[1520] B artifacts-manager onBeforeUninstallApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:36.686 detox[1520] E artifacts-manager onBeforeUninstallApp 01:16:36.686 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "pm list packages com.androidrefresh" 01:16:36.743 detox[1520] i child-process:EXEC_SUCCESS package:com.androidrefresh.test package:com.androidrefresh 01:16:36.744 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 uninstall com.androidrefresh 01:16:36.886 detox[1520] i child-process:EXEC_SUCCESS Success 01:16:36.886 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "pm list packages com.androidrefresh.test" 01:16:36.963 detox[1520] i child-process:EXEC_SUCCESS package:com.androidrefresh.test 01:16:36.964 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 uninstall com.androidrefresh.test 01:16:37.120 detox[1520] i child-process:EXEC_SUCCESS Success 01:16:37.120 detox[1520] E device uninstallApp 01:16:37.121 detox[1520] B device selectApp args: ("default") 01:16:37.125 detox[1520] B device terminateApp args: () 01:16:37.126 detox[1520] B artifacts-manager onBeforeTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:37.127 detox[1520] E artifacts-manager onBeforeTerminateApp 01:16:37.128 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "am force-stop com.androidrefresh" 01:16:37.207 detox[1520] i child-process:EXEC_SUCCESS 01:16:37.208 detox[1520] B artifacts-manager onTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:37.209 detox[1520] E artifacts-manager onTerminateApp 01:16:37.210 detox[1520] E device terminateApp 01:16:37.210 detox[1520] E device selectApp 01:16:37.211 detox[1520] B device installApp args: () 01:16:37.213 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/build-tools/33.0.0/aapt" dump xmlstrings "/Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/debug/app-debug.apk" AndroidManifest.xml 01:16:37.262 detox[1520] i child-process:EXEC_SUCCESS String pool of 71 unique UTF-16 non-sorted strings, 71 entries and 0 styles using 3464 bytes: String #0: theme String #1: label String #2: icon String #3: name String #4: protectionLevel String #5: enabled String #6: debuggable String #7: exported String #8: authorities String #9: launchMode String #10: screenOrientation String #11: configChanges String #12: value String #13: minSdkVersion String #14: versionCode String #15: versionName String #16: windowSoftInputMode String #17: targetSdkVersion String #18: allowBackup String #19: usesCleartextTraffic String #20: networkSecurityConfig String #21: roundIcon String #22: compileSdkVersion String #23: compileSdkVersionCodename String #24: appComponentFactory String #25: 1.0 String #26: 13 String #27: action String #28: activity String #29: android String #30: android.intent.action.MAIN String #31: android.intent.action.MEDIA_BUTTON String #32: android.intent.category.LAUNCHER String #33: android.permission.ACCESS_NETWORK_STATE String #34: android.permission.ACCESS_WIFI_STATE String #35: android.permission.FOREGROUND_SERVICE String #36: android.permission.INTERNET String #37: android.permission.SYSTEM_ALERT_WINDOW String #38: android.permission.WAKE_LOCK String #39: androidx.core.app.CoreComponentFactory String #40: androidx.emoji2.text.EmojiCompatInitializer String #41: androidx.lifecycle.ProcessLifecycleInitializer String #42: androidx.media.session.MediaButtonReceiver String #43: androidx.startup String #44: androidx.startup.InitializationProvider String #45: androidx.test.orchestrator String #46: androidx.test.services String #47: application String #48: category String #49: com.androidrefresh String #50: com.androidrefresh.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION String #51: com.androidrefresh.MainActivity String #52: com.androidrefresh.MainApplication String #53: com.androidrefresh.androidx-startup String #54: com.doublesymmetry.trackplayer.service.MusicService String #55: com.facebook.react.devsupport.DevSettingsActivity String #56: com.google.android.apps.common.testing.services String #57: http://schemas.android.com/apk/res/android String #58: intent-filter String #59: manifest String #60: meta-data String #61: package String #62: permission String #63: platformBuildVersionCode String #64: platformBuildVersionName String #65: provider String #66: queries String #67: receiver String #68: service String #69: uses-permission String #70: uses-sdk 01:16:37.263 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/build-tools/33.0.0/aapt" dump xmlstrings "/Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" AndroidManifest.xml 01:16:37.311 detox[1520] i child-process:EXEC_SUCCESS String pool of 37 unique UTF-16 non-sorted strings, 37 entries and 0 styles using 1816 bytes: String #0: theme String #1: label String #2: name String #3: debuggable String #4: exported String #5: targetPackage String #6: handleProfiling String #7: functionalTest String #8: minSdkVersion String #9: targetSdkVersion String #10: compileSdkVersion String #11: compileSdkVersionCodename String #12: 13 String #13: Tests for com.androidrefresh String #14: action String #15: activity String #16: android String #17: android.intent.action.MAIN String #18: android.permission.REORDER_TASKS String #19: android.test.runner String #20: androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity String #21: androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity String #22: androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity String #23: androidx.test.runner.AndroidJUnitRunner String #24: application String #25: com.androidrefresh String #26: com.androidrefresh.test String #27: http://schemas.android.com/apk/res/android String #28: instrumentation String #29: intent-filter String #30: manifest String #31: package String #32: platformBuildVersionCode String #33: platformBuildVersionName String #34: uses-library String #35: uses-permission String #36: uses-sdk 01:16:37.311 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "rm -fr /data/local/tmp/detox" 01:16:37.365 detox[1520] i child-process:EXEC_SUCCESS 01:16:37.365 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "mkdir -p /data/local/tmp/detox" 01:16:37.414 detox[1520] i child-process:EXEC_SUCCESS 01:16:37.415 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 push "/Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/debug/app-debug.apk" "/data/local/tmp/detox/Application.apk" 01:16:37.632 detox[1520] i child-process:EXEC_SUCCESS /Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/debug/app-debug.apk: 1 file pushed, 0 skipped. 383.2 MB/s (63612554 bytes in 0.158s) 01:16:37.634 detox[1520] i child-process:SPAWN_CMD /Users/gez/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm install -r -g -t /data/local/tmp/detox/Application.apk 01:16:38.016 detox[1520] i child-process:SPAWN_STDOUT Success 01:16:38.020 detox[1520] i child-process:SPAWN_END /Users/gez/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm install -r -g -t /data/local/tmp/detox/Application.apk exited with code #0 01:16:38.020 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 push "/Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" "/data/local/tmp/detox/Test.apk" 01:16:38.089 detox[1520] i child-process:EXEC_SUCCESS /Volumes/GIT/AndroidRefresh/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk: 1 file pushed, 0 skipped. 358.8 MB/s (3997378 bytes in 0.011s) 01:16:38.091 detox[1520] i child-process:SPAWN_CMD /Users/gez/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm install -r -g -t /data/local/tmp/detox/Test.apk 01:16:38.207 detox[1520] i child-process:SPAWN_STDOUT Success 01:16:38.211 detox[1520] i child-process:SPAWN_END /Users/gez/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm install -r -g -t /data/local/tmp/detox/Test.apk exited with code #0 01:16:38.212 detox[1520] B device reverseTcpPort args: (8081) 01:16:38.214 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 reverse tcp:8081 tcp:8081 01:16:38.270 detox[1520] i child-process:EXEC_SUCCESS 01:16:38.270 detox[1520] E device reverseTcpPort 01:16:38.270 detox[1520] E device installApp 01:16:38.270 detox[1520] B device selectApp args: ("default") 01:16:38.271 detox[1520] B device terminateApp args: () 01:16:38.271 detox[1520] B artifacts-manager onBeforeTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:38.271 detox[1520] E artifacts-manager onBeforeTerminateApp 01:16:38.271 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "am force-stop com.androidrefresh" 01:16:38.338 detox[1520] i child-process:EXEC_SUCCESS 01:16:38.338 detox[1520] B artifacts-manager onTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:38.338 detox[1520] E artifacts-manager onTerminateApp 01:16:38.338 detox[1520] E device terminateApp 01:16:38.339 detox[1520] E device selectApp 01:16:38.339 detox[1520] E lifecycle set up environment 01:16:38.560 detox[1520] i lifecycle starter.test.js is assigned to emulator-5554 (Pixel_6_API_31) 01:16:38.562 detox[1520] B lifecycle run the tests 01:16:38.562 detox[1520] B artifacts-manager onRunDescribeStart args: ({"name":"ROOT_DESCRIBE_BLOCK"}) 01:16:38.563 detox[1520] E artifacts-manager onRunDescribeStart 01:16:38.564 detox[1520] B lifecycle Example 01:16:38.564 detox[1520] B artifacts-manager onRunDescribeStart args: ({"name":"Example"}) 01:16:38.564 detox[1520] E artifacts-manager onRunDescribeStart 01:16:38.566 detox[1520] B lifecycle beforeAll 01:16:38.566 detox[1520] i user beforeAll origin: at e2e/starter.test.js:9:13 01:16:38.572 detox[1520] B device launchApp args: () 01:16:38.573 detox[1520] B device terminateApp args: ("com.androidrefresh") 01:16:38.573 detox[1520] B artifacts-manager onBeforeTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:38.573 detox[1520] E artifacts-manager onBeforeTerminateApp 01:16:38.574 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "am force-stop com.androidrefresh" 01:16:38.636 detox[1520] i child-process:EXEC_SUCCESS 01:16:38.639 detox[1520] B artifacts-manager onTerminateApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh"}) 01:16:38.641 detox[1520] E artifacts-manager onTerminateApp 01:16:38.641 detox[1520] E device terminateApp 01:16:38.641 detox[1520] B artifacts-manager onBeforeLaunchApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh","launchArgs":{"detoxServer":"ws://localhost:53846","detoxSessionId":"6f92a045-8925-82bd-b24c-f2f461fe96b7"}}) 01:16:38.642 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "date +\"%m-%d %T.000\"" 01:16:38.695 detox[1520] i child-process:EXEC_SUCCESS 02-09 01:16:36.000 01:16:38.696 detox[1520] E artifacts-manager onBeforeLaunchApp 01:16:38.697 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 reverse tcp:53846 tcp:53846 01:16:38.740 detox[1520] i child-process:EXEC_SUCCESS 53846 01:16:38.740 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "pm list instrumentation" 01:16:38.795 detox[1520] i child-process:EXEC_SUCCESS instrumentation:com.androidrefresh.test/androidx.test.runner.AndroidJUnitRunner (target=com.androidrefresh) instrumentation:com.ngarinyin.test/androidx.test.runner.AndroidJUnitRunner (target=com.ngarinyin) 01:16:38.797 detox[1520] i child-process:SPAWN_CMD /Users/gez/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:53846 -e detoxSessionId 6f92a045-8925-82bd-b24c-f2f461fe96b7 -e debug false com.androidrefresh.test/androidx.test.runner.AndroidJUnitRunner 01:16:39.299 detox[1520] i child-process:EXEC_CMD "/Users/gez/Library/Android/sdk/platform-tools/adb" -s emulator-5554 shell "ps | grep \"com\.androidrefresh$\"" 01:16:39.371 detox[1520] i child-process:EXEC_SUCCESS u0_a231 22020 320 14878332 127644 0 0 R com.androidrefresh 01:16:39.371 detox[1520] B artifacts-manager onLaunchApp args: ({"deviceId":"emulator-5554","bundleId":"com.androidrefresh","launchArgs":{"detoxServer":"ws://localhost:53846","detoxSessionId":"6f92a045-8925-82bd-b24c-f2f461fe96b7"},"pid":22020}) 01:16:39.372 detox[1520] E artifacts-manager onLaunchApp 01:16:39.927 detox[1520] i child-process:SPAWN_STDOUT INSTRUMENTATION_STATUS: class=com.androidrefresh.DetoxTest INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS: id=AndroidJUnitRunner INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= com.androidrefresh.DetoxTest: INSTRUMENTATION_STATUS: test=runDetoxTests INSTRUMENTATION_STATUS_CODE: 1 01:16:39.935 detox[1520] i child-process:SPAWN_STDOUT INSTRUMENTATION_STATUS: class=com.androidrefresh.DetoxTest INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS: id=AndroidJUnitRunner INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stack=java.lang.NoClassDefFoundError: Failed resolution of: Lorg/hamcrest/Matchers; at androidx.test.espresso.matcher.ViewMatchers.withContentDescription(ViewMatchers.java:2) at androidx.test.espresso.Espresso.Device logs
Device logs
``` 01:18:58.242 detox[1658] B jest --config e2e/jest.config.js watchman warning: Recrawled this watch 13 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: `watchman watch-del '/Volumes/GIT/AndroidRefresh' ; watchman watch-project '/Volumes/GIT/AndroidRefresh'` 01:19:02.495 detox[1659] i starter.test.js is assigned to emulator-5554 (Pixel_6_API_31) 01:19:02.501 detox[1659] i beforeAll 01:19:03.977 detox[1659] i An error occurred while waiting for the app to become ready. Waiting for disconnection... error: Failed to run application on the device HINT: Most likely, your main activity has crashed prematurely. Native stacktrace dump: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/hamcrest/Matchers; at androidx.test.espresso.matcher.ViewMatchers.withContentDescription(ViewMatchers.java:2) at androidx.test.espresso.Espresso.More data, please!
Apologies if I should be posting on the
react-native-track-player
repo and I'm aware testing has only been done up to react-native version 0.69.7. I'm just struggling to work out why this is happening. If I remove that one package, everything works as expected so I'm assuming it's a bug. Thanks for your help on this one.