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

ReferenceError: Extensions is not defined (hyco-https) #62

Open
TamasKeul opened this issue Oct 28, 2021 · 0 comments
Open

ReferenceError: Extensions is not defined (hyco-https) #62

TamasKeul opened this issue Oct 28, 2021 · 0 comments

Comments

@TamasKeul
Copy link

Actual Behavior

Sample script fails with the following error message upon incoming request:
The scripts connects to the relay service without problem.

C:\dev\test-azure-relay\node-relay\node_modules\hyco-https\examples\simple>node listener.js
C:\dev\test-azure-relay\node-relay\node_modules\hyco-https\lib\HybridConnectionHttpsServer.js:474
  var extensionsOffer = Extensions.parse(req.headers['sec-websocket-extensions']);
                        ^

ReferenceError: Extensions is not defined
    at accept (C:\dev\test-azure-relay\node-relay\node_modules\hyco-https\lib\HybridConnectionHttpsServer.js:474:25)
    at WebSocket.server.controlChannel.onmessage (C:\dev\test-azure-relay\node-relay\node_modules\hyco-https\lib\HybridConnectionHttpsServer.js:419:7)
    at WebSocket.onMessage (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:400:28)
    at Receiver.receiverOnMessage (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\websocket.js:789:20)
    at Receiver.emit (events.js:400:28)
    at Receiver.dataMessage (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\receiver.js:422:14)
    at Receiver.getData (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\receiver.js:352:17)
    at Receiver.startLoop (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\receiver.js:138:22)
    at Receiver._write (C:\dev\test-azure-relay\node-relay\node_modules\ws\lib\receiver.js:74:10)

Expected Behavior

The listener script should respond with the sample message written in sample listener:

res.end('<html><head><title>Hey!</title></head><body>Relayed Node.js Server!</body></html>');

Versions

  • OS platform and version: Windows 10, Docker Alpne, Docker Ubuntu 18.04
  • Node Version: v14.18.1 , v10.24.1
  • NPM package version or commit ID: hyco-https@1.4.5
@TamasKeul TamasKeul changed the title ReferenceError: Extensions is not defined ReferenceError: Extensions is not defined (hyco-https) Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant