question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

elemental2.dom.WebSocket#close(int code, String reason) throws InvalidAccessError: A parameter or an operation is not supported by the underlying object

See original GitHub issue

The two methods elemental2.dom.WebSocket#close(int code, String reason) and elemental2.dom.WebSocket#close(int code) both throw an InvalidAccessError in Firefox (don’t know if other Browsers work) elemental2.dom.WebSocket#close() is working as intended.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
realityforgecommented, Jan 28, 2020

I have done exactly the same thing … multiple times. Hence how I could guess 😉

0reactions
realityforgecommented, Jan 28, 2020

I am not sure what you mean. onclose is called with a CloseEvent and I believe that is still invoked, even if you initiate the close. If you use the more generic addEventListener then you may need to cast the event to the correct type.

Although it has been a while since I looked at the code so it may be that the Elemental2 externs don’t specify the types tightly enough and you ay need to always do a cast

Read more comments on GitHub >

github_iconTop Results From Across the Web

Evil Firefox Error -- "A parameter or an operation is not ...
Since this is the first duckduckgo result for InvalidAccessError: A parameter or an operation is not supported by the underlying object I ...
Read more >
DOMException - Web APIs | MDN
(Legacy code value: 14 and legacy constant name: NAMESPACE_ERR ). InvalidAccessError. The object does not support the operation or argument.
Read more >
WebSocket - Adobe Developer
Returns: string - returns a string indicating the name of the sub-protocol the server selected; this will be one of the strings specified...
Read more >
18 Using the WebSocket Protocol in WebLogic Server
Typically the WebSocket protocol is not supported either because the WebSocket object is not available or because WebSocket frames are blocked by a...
Read more >
python-websockets(1) - Arch manual pages
The WebSocket server loads the Python code in app.py then serves every WebSocket request with ... throw new Error(`Unsupported event type: ${event.type}.`);
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found