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

Internal Error: Illegal Access #864

Open
griffinmacias opened this Issue May 5, 2016 · 35 comments

Comments

Projects
None yet
@griffinmacias

griffinmacias commented May 5, 2016

Node version 6.0.0
Node Inspector 0.12.8
Express 4.13.4

screen shot 2016-05-05 at 9 37 54 am

  1. node-debug app.js
  2. open the inspector and press play
  3. open the localhost:3000
  4. works then set breakpoint on 'res.send() line';
  5. reload localhost:3000
  6. internal error: illegal access

I am aware of the issue #413 and my issue might be related. Why am I getting this error, I am not able to set a breakpoint anywhere.

@LeandroFavero

This comment has been minimized.

Show comment
Hide comment
@LeandroFavero

LeandroFavero May 5, 2016

Same problem, and happens only with Node 6.0

LeandroFavero commented May 5, 2016

Same problem, and happens only with Node 6.0

@chippawah

This comment has been minimized.

Show comment
Hide comment
@chippawah

chippawah May 5, 2016

Same here.

chippawah commented May 5, 2016

Same here.

@theHazzard

This comment has been minimized.

Show comment
Hide comment
@theHazzard

theHazzard May 5, 2016

Same Problem

theHazzard commented May 5, 2016

Same Problem

@MKHenson

This comment has been minimized.

Show comment
Hide comment
@MKHenson

MKHenson May 5, 2016

Same here

MKHenson commented May 5, 2016

Same here

@wokalski

This comment has been minimized.

Show comment
Hide comment
@wokalski

wokalski May 8, 2016

I have this issue only if I try to debug ES6 code. I run node-inspector and then invoking babel-node debug -- myscript.js. It breaks on the first line of a script and everything seems fine, but then it hangs and after some times outputs the error message.

Do you know any workarounds?


Sorry for any misleading thoughts. I'm completely new to the whole js stack.

wokalski commented May 8, 2016

I have this issue only if I try to debug ES6 code. I run node-inspector and then invoking babel-node debug -- myscript.js. It breaks on the first line of a script and everything seems fine, but then it hangs and after some times outputs the error message.

Do you know any workarounds?


Sorry for any misleading thoughts. I'm completely new to the whole js stack.

@rcosnita

This comment has been minimized.

Show comment
Hide comment
@rcosnita

rcosnita May 10, 2016

As a work around you can use --debug-brk argument which will enable a breakpoint on the first line of the script you run. Your debug session will work as expected.

rcosnita commented May 10, 2016

As a work around you can use --debug-brk argument which will enable a breakpoint on the first line of the script you run. Your debug session will work as expected.

@griffinmacias

This comment has been minimized.

Show comment
Hide comment
@griffinmacias

griffinmacias May 10, 2016

Thanks @rcosnita, that works

griffinmacias commented May 10, 2016

Thanks @rcosnita, that works

@theHazzard

This comment has been minimized.

Show comment
Hide comment
@theHazzard

theHazzard May 13, 2016

it didn't work for me
every time that I try to debug inside a callback from requestjs it throws Illegal Access

theHazzard commented May 13, 2016

it didn't work for me
every time that I try to debug inside a callback from requestjs it throws Illegal Access

@bmcswee

This comment has been minimized.

Show comment
Hide comment
@bmcswee

bmcswee May 13, 2016

Also not working for me - already using --debug-brk.

Error gets thrown no matter where I put my breakpoint.

bmcswee commented May 13, 2016

Also not working for me - already using --debug-brk.

Error gets thrown no matter where I put my breakpoint.

@alfg

This comment has been minimized.

Show comment
Hide comment
@alfg

alfg May 13, 2016

Same problem here. Node 6+ when setting breakpoint on a callback.

alfg commented May 13, 2016

Same problem here. Node 6+ when setting breakpoint on a callback.

@griffinmacias griffinmacias reopened this May 13, 2016

@jaredwy

This comment has been minimized.

Show comment
Hide comment
@jaredwy

jaredwy May 13, 2016

As part of my work i've had to track down what was causing this issue in our setup (not node, but we use node inspector). The culmination of that investigation was https://bugs.chromium.org/p/v8/issues/detail?id=5010.The symptoms were the same, and as @rcosnita they seemed to improved when using --debug-brk in some cases. So i suspect they are likely the same, im going to start looking to fix this on monday.

jaredwy commented May 13, 2016

As part of my work i've had to track down what was causing this issue in our setup (not node, but we use node inspector). The culmination of that investigation was https://bugs.chromium.org/p/v8/issues/detail?id=5010.The symptoms were the same, and as @rcosnita they seemed to improved when using --debug-brk in some cases. So i suspect they are likely the same, im going to start looking to fix this on monday.

@blake-regalia

This comment has been minimized.

Show comment
Hide comment
@blake-regalia

blake-regalia May 14, 2016

Same error here on node v6.1.0 & node-inspector v0.12.8; using --debug-break

As @alfg noted, it only happens (for me at least) when the breakpoint is within a callback that is reached after a different breakpoint outside the callback is encountered. Trying now to make a reproducible example

blake-regalia commented May 14, 2016

Same error here on node v6.1.0 & node-inspector v0.12.8; using --debug-break

As @alfg noted, it only happens (for me at least) when the breakpoint is within a callback that is reached after a different breakpoint outside the callback is encountered. Trying now to make a reproducible example

@blake-regalia

This comment has been minimized.

Show comment
Hide comment
@blake-regalia

blake-regalia May 14, 2016

Got it. It happens when trying to inspect a variable that is the result from calling bind on a function:

let crash_inspector = (function(){}).bind({});
debugger;

To prove that inspecting it is the culprit, you can see it happen like this:

(() => {
    let try_to_inspect_this_variable = {
        crash_inspector: (function(){}).bind({}),
    };
    debugger;
})();

blake-regalia commented May 14, 2016

Got it. It happens when trying to inspect a variable that is the result from calling bind on a function:

let crash_inspector = (function(){}).bind({});
debugger;

To prove that inspecting it is the culprit, you can see it happen like this:

(() => {
    let try_to_inspect_this_variable = {
        crash_inspector: (function(){}).bind({}),
    };
    debugger;
})();
@jaredwy

This comment has been minimized.

Show comment
Hide comment
@jaredwy

jaredwy May 14, 2016

Yup. I've got a patch in progress for v8. Will update this issue as it lands.

jaredwy commented May 14, 2016

Yup. I've got a patch in progress for v8. Will update this issue as it lands.

@theHazzard

This comment has been minimized.

Show comment
Hide comment
@theHazzard

theHazzard May 17, 2016

Hi!

it always throws while debugging inside a request callback

const request = require('request');

request.get('http://www.google.com', (err, res, body) => {
    debugger;
});

theHazzard commented May 17, 2016

Hi!

it always throws while debugging inside a request callback

const request = require('request');

request.get('http://www.google.com', (err, res, body) => {
    debugger;
});
@eugenioclrc

This comment has been minimized.

Show comment
Hide comment
@eugenioclrc

eugenioclrc commented May 17, 2016

+1

@blake-regalia

This comment has been minimized.

Show comment
Hide comment
@blake-regalia

blake-regalia May 18, 2016

This is a v8 problem that was addressed with this commit:
v8/v8@246d5bb

Now you'll have to wait until this v8 dep appears in a node.js upgrade

blake-regalia commented May 18, 2016

This is a v8 problem that was addressed with this commit:
v8/v8@246d5bb

Now you'll have to wait until this v8 dep appears in a node.js upgrade

@jaredwy

This comment has been minimized.

Show comment
Hide comment
@jaredwy

jaredwy May 19, 2016

FYI I have informed node of the problem and they will pick up the patch when it lands on the right branch in v8.
On Thu, 19 May 2016 at 9:50 AM blake-regalia notifications@github.com
wrote:

This is a v8 problem that was addressed with this commit:
v8/v8@246d5bb
v8/v8@246d5bb

Now you'll have to wait until this v8 dep appears in a node.js upgrade


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

jaredwy commented May 19, 2016

FYI I have informed node of the problem and they will pick up the patch when it lands on the right branch in v8.
On Thu, 19 May 2016 at 9:50 AM blake-regalia notifications@github.com
wrote:

This is a v8 problem that was addressed with this commit:
v8/v8@246d5bb
v8/v8@246d5bb

Now you'll have to wait until this v8 dep appears in a node.js upgrade


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

@LeandroFavero

This comment has been minimized.

Show comment
Hide comment
@LeandroFavero

LeandroFavero May 19, 2016

I updated to 6.2.0, but there are other issue:

Cannot find module '/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.7.3/node-v48-darwin-x64/debug.node'

LeandroFavero commented May 19, 2016

I updated to 6.2.0, but there are other issue:

Cannot find module '/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.7.3/node-v48-darwin-x64/debug.node'

@wokalski

This comment has been minimized.

Show comment
Hide comment
@wokalski

wokalski May 19, 2016

@LeandroFavero remove node_modules and run npm install. (Or just remove the node-inspector module)

wokalski commented May 19, 2016

@LeandroFavero remove node_modules and run npm install. (Or just remove the node-inspector module)

@superclarkk

This comment has been minimized.

Show comment
Hide comment
@superclarkk

superclarkk May 19, 2016

@wokalski That is not the answer. The v8 fix has not been integrated into node yet.

superclarkk commented May 19, 2016

@wokalski That is not the answer. The v8 fix has not been integrated into node yet.

@theHazzard

This comment has been minimized.

Show comment
Hide comment
@theHazzard

theHazzard May 19, 2016

I'm still having the same issue with node 6.2, illegal access while
debugging inside of a request callback :(

Enzo Luis Stróngoli
NodeJS Developer
http://www.turismocity.com.ar http://www.turismocity.com.ar/
https://www.linkedin.com/in/enzostrongoli
https://www.linkedin.com/in/enzostrongoli

strongolienzo@gmail.com strongolienzo@gmail.com
enzo@turismocity.com enzo@turismocity.com

2016-05-19 12:02 GMT-03:00 Wojtek Czekalski notifications@github.com:

@LeandroFavero https://github.com/LeandroFavero remove node_modules and
run npm install. (Or just remove the node-inspector module)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

theHazzard commented May 19, 2016

I'm still having the same issue with node 6.2, illegal access while
debugging inside of a request callback :(

Enzo Luis Stróngoli
NodeJS Developer
http://www.turismocity.com.ar http://www.turismocity.com.ar/
https://www.linkedin.com/in/enzostrongoli
https://www.linkedin.com/in/enzostrongoli

strongolienzo@gmail.com strongolienzo@gmail.com
enzo@turismocity.com enzo@turismocity.com

2016-05-19 12:02 GMT-03:00 Wojtek Czekalski notifications@github.com:

@LeandroFavero https://github.com/LeandroFavero remove node_modules and
run npm install. (Or just remove the node-inspector module)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

@wokalski

This comment has been minimized.

Show comment
Hide comment
@wokalski

wokalski May 19, 2016

@superclarkk It is not a fix for illegal access, but it is a fix for @LeandroFavero issue, as far as I know.

wokalski commented May 19, 2016

@superclarkk It is not a fix for illegal access, but it is a fix for @LeandroFavero issue, as far as I know.

@theHazzard

This comment has been minimized.

Show comment
Hide comment
@theHazzard

theHazzard May 19, 2016

sorry, I thought that was for this issue

Enzo Luis Stróngoli
NodeJS Developer
http://www.turismocity.com.ar http://www.turismocity.com.ar/
https://www.linkedin.com/in/enzostrongoli
https://www.linkedin.com/in/enzostrongoli

strongolienzo@gmail.com strongolienzo@gmail.com
enzo@turismocity.com enzo@turismocity.com

2016-05-19 14:30 GMT-03:00 Wojtek Czekalski notifications@github.com:

@superclarkk https://github.com/superclarkk It is not a fix for illegal
access, but it is a fix for @LeandroFavero
https://github.com/LeandroFavero issue, as far as I know.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

theHazzard commented May 19, 2016

sorry, I thought that was for this issue

Enzo Luis Stróngoli
NodeJS Developer
http://www.turismocity.com.ar http://www.turismocity.com.ar/
https://www.linkedin.com/in/enzostrongoli
https://www.linkedin.com/in/enzostrongoli

strongolienzo@gmail.com strongolienzo@gmail.com
enzo@turismocity.com enzo@turismocity.com

2016-05-19 14:30 GMT-03:00 Wojtek Czekalski notifications@github.com:

@superclarkk https://github.com/superclarkk It is not a fix for illegal
access, but it is a fix for @LeandroFavero
https://github.com/LeandroFavero issue, as far as I know.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#864 (comment)

@superclarkk

This comment has been minimized.

Show comment
Hide comment
@superclarkk

superclarkk May 19, 2016

@wokalski I have the same issue as @LeandroFavero and also the illegal access issue (I presume they are connected). Deleting and reinstalling all modules does not fix it.

superclarkk commented May 19, 2016

@wokalski I have the same issue as @LeandroFavero and also the illegal access issue (I presume they are connected). Deleting and reinstalling all modules does not fix it.

@wokalski

This comment has been minimized.

Show comment
Hide comment
@wokalski

wokalski May 19, 2016

@superclarkk No, they are not connected afaik. I had this issue because I installed node-inspector with some version of node and used it with other. I'm sorry if my tip is misleading!

wokalski commented May 19, 2016

@superclarkk No, they are not connected afaik. I had this issue because I installed node-inspector with some version of node and used it with other. I'm sorry if my tip is misleading!

@nicobevilacqua

This comment has been minimized.

Show comment
Hide comment
@nicobevilacqua

nicobevilacqua May 20, 2016

Same problem here with node 6.2 and node-inspector 0.12.8

nicobevilacqua commented May 20, 2016

Same problem here with node 6.2 and node-inspector 0.12.8

@jaredwy

This comment has been minimized.

Show comment
Hide comment
@jaredwy

jaredwy May 23, 2016

nodejs/node#6928 is up that will include the v8 fix that is required to fix this.

jaredwy commented May 23, 2016

nodejs/node#6928 is up that will include the v8 fix that is required to fix this.

@sunilalgos

This comment has been minimized.

Show comment
Hide comment
@sunilalgos

sunilalgos May 30, 2016

Am also facing same problem with node 6.2.0 and node-inspector 0.12.8 version. This is not working with --debug and -debug-brk flag too. Are there any alternatives in solving this problem like using earlier versions like so ? If possible please update me.

sunilalgos commented May 30, 2016

Am also facing same problem with node 6.2.0 and node-inspector 0.12.8 version. This is not working with --debug and -debug-brk flag too. Are there any alternatives in solving this problem like using earlier versions like so ? If possible please update me.

@kunal-mandalia

This comment has been minimized.

Show comment
Hide comment
@kunal-mandalia

kunal-mandalia May 31, 2016

Same as a bunch of other folk. Node 6.2.0, node-inspector 0.12.8.
Getting 'Internal error: illegal access' after running 'node-inspector' and 'node --debug-brk index.js' (or node --debug index.js) and setting a breakpoint on the following code:

var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('Hello World!'); <-- breakpoint set here
});

app.listen(3003, function () {
  console.log('Example app listening on port 3003!');
});

Hope the JavaScript Gods heed the call of the humble debuggers!

kunal-mandalia commented May 31, 2016

Same as a bunch of other folk. Node 6.2.0, node-inspector 0.12.8.
Getting 'Internal error: illegal access' after running 'node-inspector' and 'node --debug-brk index.js' (or node --debug index.js) and setting a breakpoint on the following code:

var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('Hello World!'); <-- breakpoint set here
});

app.listen(3003, function () {
  console.log('Example app listening on port 3003!');
});

Hope the JavaScript Gods heed the call of the humble debuggers!

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jun 3, 2016

Node 6.2.1 has been released and is supposed to fix this issue.

mgol commented Jun 3, 2016

Node 6.2.1 has been released and is supposed to fix this issue.

@kunal-mandalia

This comment has been minimized.

Show comment
Hide comment
@kunal-mandalia

kunal-mandalia Jun 3, 2016

I can confirm node 6.2.1 lets node-inspector work as expected 👍

kunal-mandalia commented Jun 3, 2016

I can confirm node 6.2.1 lets node-inspector work as expected 👍

lukesampson added a commit to lukesampson/scoop that referenced this issue Jun 4, 2016

Update NodeJs to 6.2.1 (security update) (#891)
# Notable changes

## Notable changes

* **buffer**: Ignore negative lengths in calls to `Buffer()` and `Buffer.allocUnsafe()`. This fixes a possible security concern (reported by Feross Aboukhadijeh) where user input is passed unchecked to the Buffer constructor or `allocUnsafe()` as it can expose parts of the memory slab used by other Buffers in the application. Note that negative lengths are not supported by the Buffer API and user input to the constructor should always be sanitised and type-checked. (Anna Henningsen) [#7051](nodejs/node#7051)
* **npm**: Upgrade npm to 3.9.3 (Kat Marchán) [#7030](nodejs/node#7030)
  - [`npm/npm@42d71be`](npm/npm@42d71be) [npm/npm#12685](npm/npm#12685) When using `npm ls <pkg>` without a semver specifier, `npm ls` would skip any packages in your tree that matched by name, but had a prerelease version in their `package.json`. ([@zkat](https://github.com/zkat))
  - [`npm/npm@f04e05`](npm/npm@df04e05) [npm/npm#10013](npm/npm#10013) `read-package-tree@5.1.4`: Fixes an issue where `npm install` would fail if your `node_modules` was symlinked. ([@iarna](https://github.com/iarna))
  - [`b894413`](npm/npm@b894413) [#12372](npm/npm#12372) Changing a nested dependency in an `npm-shrinkwrap.json` and then running `npm install` would not get up the updated package. This corrects that. ([@misterbyrne](https://github.com/misterbyrne))
  - This release includes `npm@3.9.0`, which is the result of our Windows testing push -- the test suite (should) pass on Windows now. We're working on getting AppVeyor to a place where we can just rely on it like Travis.
* **tty**: Default to blocking mode for stdio on OS X. A bug fix in libuv 1.9.0, introduced in Node.js v6.0.0, exposed problems with Node's use of non-blocking stdio, particularly on OS X which has a small output buffer. This change should fix CLI applications that have been having problems with output since Node.js v6.0.0 on OS X. The core team is continuing to address stdio concerns that exist across supported platforms and progress can be tracked at <nodejs/node#6980>. (Jeremiah Senkpiel) [#6895](nodejs/node#6895)
* **V8**: Upgrade to V8 5.0.71.52. This includes a fix that addresses problems experienced by users of node-inspector since Node.js v6.0.0, see <node-inspector/node-inspector#864> for details. (Michaël Zasso) [#6928](nodejs/node#6928)

enlight added a commit to debugworkbench/hydragon that referenced this issue Jun 8, 2016

Upgrade to Electron v1.2.1
There was a bug in the V8 version in Electron v1.1.0 that made debugging
the main process rather impractical because the `node-inspector` UI
often blew up with an `Internal Error: Invalid Acccess` error when a
breakpoint was hit in the main process.

Relevant `node-inspector` issue:
node-inspector/node-inspector#864
@rohitsi

This comment has been minimized.

Show comment
Hide comment
@rohitsi

rohitsi Jun 16, 2016

After updating to node 6.2.1, was able to debug a strongloop app... Great work guys. Thanks a ton!

rohitsi commented Jun 16, 2016

After updating to node 6.2.1, was able to debug a strongloop app... Great work guys. Thanks a ton!

@aa6

This comment has been minimized.

Show comment
Hide comment
@aa6

aa6 Jun 22, 2016

On node v6.2.1 I still have a problem debugging this code:

var Human = function(name)
{
    this.name = name
}
Human.prototype.speak = function(cb)
{
    console.log("My name is " + this.name)
}

var humanHandler =
{
    apply: function(target, this_arg, args) 
    {
        return new (Function.prototype.bind.apply(Human, [null].concat(Array.prototype.slice.call(args)))) 
    }
}

var ProxyHuman = new Proxy(function(){},humanHandler)

var tony = ProxyHuman("Tony")
tony.speak()

It gives Internal error: illegal access in the debugger if I resume script execution.

me@me:~/tst/openca$ node --version
v6.2.1
me@me:~/tst/openca$ node-inspector --version
Node Inspector v0.12.8
me@me:~/tst/openca$ node bug.js
My name is Tony
me@me:~/tst/openca$ node-debug bug.js
Node Inspector v0.12.8
Visit http://127.0.0.1:8080/?port=5858 to start debugging.
Debugging `bug.js`

Debugger listening on port 5858

aa6 commented Jun 22, 2016

On node v6.2.1 I still have a problem debugging this code:

var Human = function(name)
{
    this.name = name
}
Human.prototype.speak = function(cb)
{
    console.log("My name is " + this.name)
}

var humanHandler =
{
    apply: function(target, this_arg, args) 
    {
        return new (Function.prototype.bind.apply(Human, [null].concat(Array.prototype.slice.call(args)))) 
    }
}

var ProxyHuman = new Proxy(function(){},humanHandler)

var tony = ProxyHuman("Tony")
tony.speak()

It gives Internal error: illegal access in the debugger if I resume script execution.

me@me:~/tst/openca$ node --version
v6.2.1
me@me:~/tst/openca$ node-inspector --version
Node Inspector v0.12.8
me@me:~/tst/openca$ node bug.js
My name is Tony
me@me:~/tst/openca$ node-debug bug.js
Node Inspector v0.12.8
Visit http://127.0.0.1:8080/?port=5858 to start debugging.
Debugging `bug.js`

Debugger listening on port 5858

thinkbase added a commit to platbase/devops-dockerfiles that referenced this issue Nov 11, 2016

@iyobo

This comment has been minimized.

Show comment
Hide comment
@iyobo

iyobo May 6, 2017

Just verified that this is be resolved in node 7.7+

iyobo commented May 6, 2017

Just verified that this is be resolved in node 7.7+

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