I am trying to integrate with my existing Android application which has both Native and ReactNative components. I have followed the setup instructions in their README.
The problem seems to be that when I run detox test -c android.emu.debug
the app launches in the emulator but after some console.log statements, I found out that the test is stuck at this step:
await device.launchApp
.
Though the app is launching correctly in the emulator, detox does not seem to be able to detect that and move forward.
I can interact with the launched app in my emulator and can navigate through the activities as expected.
I can see warning this message from detox in my terminal: Message from Detox in terminal
detox[3696] WARN: [DetoxConnection.js/ERROR, #54058] Action dispatched too early, there is no session to use:
HINT: Please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues
{
messageId: -10000,
type: 'AppWillTerminateWithError',
params: [Object]
}
Here is my test:
describe('Example', () => {
beforeAll(async () => {
console.log("awaiting launch app");
await device.launchApp({
newInstance: true });
console.log("done launch app");
});
beforeEach(async () => {
console.log("Awaiting react native");
//await device.reloadReactNative();
console.log("Awaited react native");
});
it('should have welcome screen', async () => {
await expect(element(by.id('emailTag'))).toBeVisible();
});
});