You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting error - Detox worker instance has not been installed in this context (DetoxSecondaryContext) while running detox with updated globalSetup
#4308
Open
1 task done
jyotsna-hh opened this issue
Dec 22, 2023
· 6 comments
And updated the jest.config.js file with- globalSetup: "<rootDir>/e2e/envSetup.ts"
Then I have executed the test - detox test -c android.emu.release -l verbose
Got the error -
12:01:32.379 detox[18527] i ws-server Detox server listening on localhost:56172...
12:01:32.385 detox[18527] B lifecycle jest --config e2e/jest.config.js
12:01:33.847 detox[18530] i user DetoxRuntimeError: Jest: Got error running globalSetup - /Users/jyotsananamdev/detox/detox-framework/e2e/envSetup.ts, reason: Detox worker instance has not been installed in this context (DetoxSecondaryContext).
HINT: If you are using Detox with Jest according to the latest guide, please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues
Otherwise, make sure you call detox.installWorker() beforehand.
at get [worker] (/Users/jyotsananamdev/detox/detox-framework/node_modules/detox/src/realms/DetoxContext.js:119:13)
at /Users/jyotsananamdev/detox/detox-framework/node_modules/detox/src/realms/DetoxContext.js:72:36
at getter (/Users/jyotsananamdev/detox/detox-framework/node_modules/funpermaproxy/lib/permaproxy.js:10:24)
at Object.get (/Users/jyotsananamdev/detox/detox-framework/node_modules/funpermaproxy/lib/permaproxy.js:21:22)
at module.exports (/Users/jyotsananamdev/detox/detox-framework/e2e/envSetup.ts:10:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/core/build/runGlobalHook.js:109:13
at async waitForPromiseWithCleanup (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/transform/build/ScriptTransformer.js:160:5)
at async ScriptTransformer.requireAndTranspileModule (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/transform/build/ScriptTransformer.js:808:16)
at async runGlobalHook (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/core/build/runGlobalHook.js:101:9)
at async runJest (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/core/build/runJest.js:327:5)
at async _run10000 (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/core/build/cli/index.js:343:7)
at async runCLI (/Users/jyotsananamdev/detox/detox-framework/node_modules/@jest/core/build/cli/index.js:198:3)
at async Object.run (/Users/jyotsananamdev/detox/detox-framework/node_modules/jest-cli/build/run.js:130:37)
origin: at node_modules/jest-cli/build/run.js:136:15
12:01:33.991 detox[18527] E lifecycle Command failed with exit code = 1:
jest --config e2e/jest.config.js
12:01:34.094 detox[18527] i ws-server Detox server has been closed gracefully
What was the expected behaviour?
This should launch app
Was it tested on latest Detox?
I have tested this issue on the latest Detox release and it still reproduces.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.14.3
React Native version: 0.72.7
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: v18.15.0
Test-runner (select one): jest / other -jest
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste logs here!
More data, please!
No response
The text was updated successfully, but these errors were encountered:
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.
What happened?
I have created a envSetup.ts file with following content -
And updated the jest.config.js file with-
globalSetup: "<rootDir>/e2e/envSetup.ts"
Then I have executed the test -
detox test -c android.emu.release -l verbose
Got the error -
What was the expected behaviour?
This should launch app
Was it tested on latest Detox?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.14.3
React Native version: 0.72.7
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: v18.15.0
Test-runner (select one): jest / other -jest
Detox logs
Detox logs
Device logs
Device logs
More data, please!
No response
The text was updated successfully, but these errors were encountered: