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

Error attaching to target cri p [Error]: 'Network.enable' wasn't found #29876

Open
ThibautMarechal opened this issue Jul 17, 2024 · 1 comment

Comments

@ThibautMarechal
Copy link

ThibautMarechal commented Jul 17, 2024

Current behavior

when calling addModule to an AudioContext, the promise never resolve or reject.

const ctx = new AudioContext()
ctx.audioWorklet.addModule('./audio-worklet-module.js') // <-- This never resolve or rejct

Desired behavior

The promise settle

Test code to reproduce

Here is a very minimalist repo that demonstrate the bug : https://github.com/ThibautMarechal/cypress-audio-context-bug

Cypress Version

13.13.1

Node version

20.12.1

Operating System

Windows

Debug Logs

The logs are too big for the issue in github so I commited them in the repro here : https://github.com/ThibautMarechal/cypress-audio-context-bug/blob/master/test.log

But found an error that might be the one :

2024-07-17T09:26:31.760Z cypress:server:browsers:cri-client error attaching to target cri p [Error]: 'Network.enable' wasn't found
    at <embedded>:633:577907
    at _._handleMessage (<embedded>:633:580210)
    at A.<anonymous> (<embedded>:633:579849)
    at A.emit (node:events:514:28)
    at f.U (<embedded>:633:565033)
    at f.emit (node:events:514:28)
    at f.dataMessage (<embedded>:633:545408)
    at f.getData (<embedded>:633:544590)
    at f.startLoop (<embedded>:633:541297)
    at f._write (<embedded>:633:540652)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at f.write (node:internal/streams/writable:337:10)
    at Socket.W (<embedded>:633:565719)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Socket.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  request: {
    method: 'Network.enable',
    params: {
      maxTotalBufferSize: 0,
      maxResourceBufferSize: 0,
      maxPostDataSize: 0
    },
    sessionId: 'DA1675F256704B15664A6BC47E52C96F'
  },
  response: { code: -32601, message: "'Network.enable' wasn't found" }
}

Other

It was working with the version 13.3.2 of Cypress and start failing at the version 13.3.3

@ThibautMarechal
Copy link
Author

After some digging, it seems related to that change : https://github.com/cypress-io/cypress/pull/28105/files#diff-b5b66d85423fa714add2e866448d3411b0f1cdf2cb4b4a95aa80394fa3edd1b3R202

Honestly I'm a bit lost on how I can apply a fix for this, without a good knowledge on how everything is working in there 😅

@ThibautMarechal ThibautMarechal changed the title Cannot use "AudioContext.addModule" Error attaching to target cri p [Error]: 'Network.enable' wasn't found Jul 23, 2024
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

2 participants