Internal error in Node's debugger #4466

Closed
purefan opened this Issue Dec 26, 2012 · 8 comments

Projects

None yet

4 participants

@purefan
purefan commented Dec 26, 2012

I was debugging my app and this happened:

$ node debug index.js
< debugger listening on port 5858
connecting...There was an internal error in Node's debugger. Please report this bug.
Unexpected token T
SyntaxError: Unexpected token T
    at Object.parse (native)
    at Protocol.execute (_debugger.js:131:43)
    at Client.<anonymous> (_debugger.js:175:14)
    at Client.EventEmitter.emit (events.js:96:17)
    at TCP.onread (net.js:391:31)


$ node -v
v0.8.15

I dont know if anyone would need more information or if its even a current issue, it just said to report it and Im following instructions.

After I ran the exact same command a second time it worked, so probably not a big issue.

@indutny
Member
indutny commented Dec 26, 2012

Hello @purefan.

Can you post source of index.js here? (Hope it's not a private thing).

@purefan
purefan commented Dec 26, 2012

Sorry it is private, but its not anything really complex I would say, perhaps the most complex thing is copying a socket (from socket.io) to a couple of variables, other than that is plain old javascript

@indutny
Member
indutny commented Dec 26, 2012

Ok, np.

If you have some time to try reducing this file and removing private things, while making this problem reproducible, and posting it here, I would be really pleased.

@indutny indutny was assigned Dec 26, 2012
@purefan
purefan commented Dec 26, 2012

Thanks for the help indutny! since I posted the bug I have been using the same commands and just working on the project as usual but I haven't gotten any other error like this, I also tried running the same command without changing anything and it didnt happen, at this point it feels like it was just a fluke since it is the very first time I see this error myself and I have been working on this project for nearly 7 months. If I get it again I will trim it down and try to get the error once more, I just wish it were a constant problem, something I can reproduce at will

@indutny
Member
indutny commented Dec 26, 2012

Ok, sounds good to me.

@indutny
Member
indutny commented Dec 26, 2012

And thank you :)

@trevnorris

hasn't been reproduced. if it is, ping back.

@trevnorris trevnorris closed this Jul 26, 2013
@nandodrw

Hi!

I got the same error, after be using node-inspector for a while.

My app.js file is

rocess.chdir(__dirname);

// Ensure a "sails" can be located:
(function() {
  var sails;
  try {
    sails = require('sails');
  } catch (e) {
    console.error('To run an app using `node app.js`, you usually need to have a version of `sails` installed in the same directory as your app.');
    console.error('To do that, run `npm install sails`');
    console.error('');
    console.error('Alternatively, if you have sails installed globally (i.e. you did `npm install -g sails`), you can use `sails lift`.');
    console.error('When you run `sails lift`, your app will still use a local `./node_modules/sails` dependency if it exists,');
    console.error('but if it doesn\'t, the app will run with the global sails instead!');
    return;
  }

  // Try to get `rc` dependency
  var rc;
  try {
    rc = require('rc');
  } catch (e0) {
    try {
      rc = require('sails/node_modules/rc');
    } catch (e1) {
      console.error('Could not find dependency: `rc`.');
      console.error('Your `.sailsrc` file(s) will be ignored.');
      console.error('To resolve this, run:');
      console.error('npm install rc --save');
      rc = function () { return {}; };
    }
  }


  // Start server
  sails.lift(rc('sails'));
})();

A sails app.

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