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.

possible assert issue when running under different nodejs vm contexts

See original GitHub issue

The line at fails for me on NodeJS 11 and 12, even though the kwargs parameter is an object.

I gave up debugging when seeing these watch values:


It’s not necessarily an autobahn related issue, but if I change those (and all related) checks to kwargs typeof === 'object', everything works fine.

I’ve seen you already had trouble with the array checks a while back, is there any chance to use typeof for the object checks aswell? I could create a PR for it!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

kuemacommented, Feb 7, 2020

That sounds reasonable.

Up to now we have worked around the “instanceof” problem by creating the object outside the VM. But a clean solution to this would be really appreciated.

there even seems to be a library these days

We don’t use that particular contrib node. It didn’t exist back then, so we developed our own with some more advanced features.

BTW: We have been using WAMP in conjunction with Node-RED for many years now. Quite the couple these two technologies. 😄

oberstetcommented, Feb 7, 2020

I haven’t read any contribution guide, I hope all is well in the PR…

yeah, PR looked good, so merged! the issue should hence be fixed (on master)

also, no, we don’t have a contribution guide (we should … but in any case, you basically blended in code style etc into what’s there already, so cool)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Evaluate node core modules within a vm.Context #31852
js to run the corresponding setups and create a different set of builtins for the context (from the top of my head, it...
Read more >
VM (executing JavaScript) | Node.js v19.3.0 Documentation
A common use case is to run the code in a different V8 Context. This means invoked code has a different global object...
Read more >
Assert | Node.js v19.3.0 Documentation
In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, assert.deepEqual() will behave like assert.
Read more >
Errors | Node.js v19.3.0 Documentation
AssertionError s are a special class of error that can be triggered when Node.js detects an exceptional logic violation that should never occur....
Read more >
Node.js v19.3.0 Documentation
Report errors in this documentation in the issue tracker. ... Using with more than two arguments is possible but deprecated.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found