Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot send a message over the closed web socket #4539

Open
1 of 2 tasks
Haochenyu2021 opened this issue Jul 31, 2024 · 0 comments
Open
1 of 2 tasks

Cannot send a message over the closed web socket #4539

Haochenyu2021 opened this issue Jul 31, 2024 · 0 comments

Comments

@Haochenyu2021
Copy link

What happened?

I'm trying to create Pinch feature for map automation in Android, and got following error after running the test which gave me the hint to report the issue.

Ran all test suites matching /map.test/i.
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

Cannot send a message over the closed web socket. See the payload below:

HINT: Please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues

Invoke {
type: 'invoke',
params: [Object],
messageId: undefined
}
at performPinch (/Users/.../src/Mobile/e2e/utilities/map/map.ts:142:19)
at mapZoomAndroid (/Users/.../src/Mobile/e2e/utilities/map/map.ts:76:3) {
name: 'DetoxRuntimeError'
}

What was the expected behaviour?

No response

Was it tested on latest Detox?

  • 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.20.0
React Native version: 0.73.6
Has Fabric (React Native's new rendering system) enabled: (yes/no) no
Node version: 20.13.1
Device model: Android tablet simulator
Android version: Android 14.0
Test-runner (select one): jest / other - Jest

Detox logs

Detox logs

13:29:45.905 detox[49147] i ipc dispatching event to primary-49144 /tmp/detox.primary-49144 : reportTestResults , {
testResults: [
{
success: true,
testFilePath: '/Users/.../src/Mobile/e2e/tests/map/Map.test.ts',
testExecError: undefined,
isPermanentFailure: false
}
]
}
13:29:45.905 detox[49144] i ipc received event of : reportTestResults {
testResults: [
{
success: true,
testFilePath: '/Users/.../src/Mobile/e2e/tests/map/Map.test.ts',
isPermanentFailure: false
}
]
}
13:29:45.905 detox[49144] i ipc dispatching event to socket : reportTestResultsDone {
testResults: [
{
success: true,
testFilePath: '/Users/.../src/Mobile/e2e/tests/map/Map.test.ts',
isPermanentFailure: false
}
]
}
13:29:45.905 detox[49147] i ipc ## received events ##
13:29:45.905 detox[49144] i ipc broadcasting event to all known sockets listening to /tmp/detox.primary-49144 : sessionStateUpdate {
testResults: [
{
success: true,
testFilePath: '/Users/.../src/Mobile/e2e/tests/map/Map.test.ts',
isPermanentFailure: false
}
]
}
13:29:45.905 detox[49147] i ipc detected event reportTestResultsDone {
testResults: [
{
success: true,
testFilePath: '/Users/.../Mobile/e2e/tests/map/Map.test.ts',
isPermanentFailure: false
}
]
}
13:29:45.907 detox[49147] i ipc connection closed primary-49144 /tmp/detox.primary-49144 0 tries remaining of 0
13:29:45.907 detox[49147] i ipc secondary-49147 exceeded connection rety amount of or stopRetrying flag set.
13:29:45.908 detox[49144] i ipc socket disconnected secondary-49147
13:29:45.908 detox[49147] B ws-client tap at {"x":210,"y":210}
data: {
"target": {
"type": "Class",
"value": "com.wix.detox.espresso.EspressoDetox"
},
"method": "perform",
"args": [
{
"type": "Invocation",
"value": {
"target": {
"type": "Class",
"value": "com.wix.detox.espresso.DetoxMatcher"
},
"method": "matcherForTestId",
"args": [
"MapScreen-Map",
{
"type": "boolean",
"value": false
}
]
}
},
{
"type": "Invocation",
"value": {
"target": {
"type": "Class",
"value": "com.wix.detox.espresso.DetoxAction"
},
"method": "tapAtLocation",
"args": [
{
"type": "Integer",
"value": 210
},
{
"type": "Integer",
"value": 210
}
]
}
}
]
}
stack: performPinch (/e2e/utilities/map/map.ts:142:19)
mapZoomAndroid (/e2e/utilities/map/map.ts:76:3)
13:29:45.909 detox[49147] E ws-client tap at {"x":210,"y":210}
error: Cannot send a message over the closed web socket. See the payload below:

HINT: Please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues

Invoke {
type: 'invoke',
params: [Object],
messageId: undefined
}
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

Cannot send a message over the closed web socket. See the payload below:

HINT: Please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues

Invoke {
type: 'invoke',
params: [Object],
messageId: undefined
}
at performPinch (/Users/.../src/Mobile/e2e/utilities/map/map.ts:142:19)
at mapZoomAndroid (/.../src/Mobile/e2e/utilities/map/map.ts:76:3) {
name: 'DetoxRuntimeError'
}

Node.js v20.13.1
13:29:45.925 detox[49144] E lifecycle Command failed with exit code = 1:
jest --config e2e/jest.config.js map.test
13:29:45.925 detox[49144] B device cleanup
args: ()
13:29:45.926 detox[49144] E device cleanup
13:29:45.926 detox[49144] i ws-server Detox server has been closed gracefully
13:29:45.928 detox[49144] E lifecycle node_modules/.bin/detox test --configuration android.debug.mac.sim.tablet --reuse map.test --loglevel trace

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant