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

Wallaby errors on stop and restart. #66

Closed
sheltonial opened this issue Apr 14, 2015 · 26 comments
Closed

Wallaby errors on stop and restart. #66

sheltonial opened this issue Apr 14, 2015 · 26 comments
Labels

Comments

@sheltonial
Copy link

This is a strange one... running Wallaby.js works perfectly the fist time with no errors. Stopping Wallaby and re-running gives the following error:

Failed to execute start operation, Error: Failed to parse path/to/a/file.html, SyntaxError: Unexpected token (1:1)
  at emitTwo (events.js:87:13)
  at process.emit (events.js:169:7)
  at handleMessage (child_process.js:306:10)
  at Pipe.channel.onread (child_process.js:334:11)
From previous event:
  at EventEmitter._.extend.start (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\server.js:9:27496)
  at WebSocket.<anonymous> (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\server.js:8:1248)
  at emitTwo (events.js:87:13)
  at WebSocket.emit (events.js:169:7)
  at Receiver.self._receiver.ontext (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\WebSocket.js:682:10)
  at Receiver.opcodes.1.finish (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:391:14)
  at Receiver.expectHandler (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:372:33)
  at Receiver.add (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:87:24)
  at Socket.firstHandler (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\WebSocket.js:663:22)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:166:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:109:10)
  at TCP.onread (net.js:517:20)

Running again gives a different error:

wallaby.js started
TypeError: Cannot read property '_session' of null
  at Server.handler (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\index.js:10:33)
  at emitOne (events.js:77:13)
  at Server.emit (events.js:166:7)
  at App.emit (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27)
  at Session.emit_open (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23)
  at process._tickCallback (node.js:340:13)

Failed to execute start operation, Error: Failed to parse path/to/a/different/file.html, SyntaxError: Expected corresponding JSX closing tag for <input> (21:0)
  at emitTwo (events.js:87:13)
  at process.emit (events.js:169:7)
  at handleMessage (child_process.js:306:10)
  at Pipe.channel.onread (child_process.js:334:11)
From previous event:
  at EventEmitter._.extend.start (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\server.js:9:27496)
  at WebSocket.<anonymous> (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\server.js:8:1248)
  at emitTwo (events.js:87:13)
  at WebSocket.emit (events.js:169:7)
  at Receiver.self._receiver.ontext (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\WebSocket.js:682:10)
  at Receiver.opcodes.1.finish (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:391:14)
  at Receiver.expectHandler (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:372:33)
  at Receiver.add (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\Receiver.js:87:24)
  at Socket.firstHandler (C:\Users\ashelton\.WebStorm10\system\wallaby\wallaby\node_modules\ws\lib\WebSocket.js:663:22)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:166:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:109:10)
  at TCP.onread (net.js:517:20)
phantom stdout: Incompatibile SockJS! Main site uses: "0.3.1.7.ga67f.dirty", the iframe: "0.3.4".

I've had a few different combinations of the error...

My workaround is when I edit the wallaby.conf.js file and run Wallaby again, everything works fine. For example, if I add the following bogus line into my files array:
{ pattern: 'something-totally-bogus', ignore: true }. I just have to continuously change this bogus value when stopping and starting wallaby.

@sheltonial sheltonial changed the title Wallaby errors on stop and start. Wallaby errors on stop and restart. Apr 14, 2015
@ArtemGovorov
Copy link
Member

Reproduced, will be fixing it shortly.

A better workaround for now is to set instrument: false for your html files: {pattern: "**/*.html", instrument: false}

@ArtemGovorov
Copy link
Member

Fixed.

@behrangsa
Copy link

@ArtemGovorov Is this fixed? If I don't disable instrumenting for HTML files, I still get a similar error in WebStorm:

wallaby.js started
core v1.0.63
TypeError: Cannot read property '_session' of null
  at Server.handler (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\index.js:10:33)
  at emitOne (events.js:77:13)
  at Server.emit (events.js:166:7)
  at App.emit (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27)
  at Session.emit_open (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23)
  at process._tickCallback (node.js:340:13)

phantom stdout: Incompatibile SockJS! Main site uses: "0.3.1.7.ga67f.dirty", the iframe: "0.3.4".

@ArtemGovorov
Copy link
Member

@behrangsa Could you please share your wallaby.js config file?

@behrangsa
Copy link

Hi Artem,

If you give me your email I can send it to you tomorrow.

Cheers,
Behrang

On Mon, 15 Jun 2015 at 5:58 pm Artem Govorov notifications@github.com
wrote:

@behrangsa /~https://github.com/behrangsa Could you please share your
wallaby.js config file?


Reply to this email directly or view it on GitHub
#66 (comment).

Best regards,
Behrang Saeedzadeh

@ArtemGovorov
Copy link
Member

ArtemGovorov commented Jun 15, 2015

@behrangsa please send it to hello@wallabyjs.com

@splintor
Copy link

What is the status of this?

@ArtemGovorov
Copy link
Member

The original issue was fixed back in April.

If the issue is reproducible, please share a sample repository with a wallaby configuration where I could reproduce it to fix it.

@behrangsa
Copy link

Hi @ArtemGovorov,

Apologies for the very long delay. Just tried v1.0.81 and this is not happening anymore. So no need to reopen it.

Thanks,
Behrang

@splintor
Copy link

It is now working well for me as well. Thanks!

@dymank
Copy link

dymank commented Sep 30, 2015

I have the same issue.
This is my console output:
wallaby.js started core v1.0.118 TypeError: Cannot read property '_session' of null at Server.handler (C:\Users\Agnieszka\.wallaby\core\node_modules\phantom\node_modules\shoe\index.js:10:33) at emitOne (events.js:77:13) at Server.emit (events.js:166:7) at App.emit (C:\Users\Agnieszka\.wallaby\core\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27) at Session.emit_open (C:\Users\Agnieszka\.wallaby\core\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23) at process._tickCallback (node.js:340:13)

It happens everytime when I restart Visual Studio and try to start Wallaby until I make any change in wallaby.conf.js, save and undo it immediately. Repo which I prepared for sharing works fine. Also I found out that when I start Wallaby in this small repo and then try to start it in big one everything is ok and Wallaby works in both repos. So I think there is some problem in configuration somewhere, but wallaby.conf.js from both projects are similar. Is there any other file where I should look for differences?

@ArtemGovorov
Copy link
Member

@aanklewicz92 it is an error in one of the third party node modules that wallaby.js is using (happens mostly on Windows), I'm not sure why it happens and why changing wallaby config affects it. Try stopping wallaby and then killing all phantomjs and iojs processes if there're any.

@ArtemGovorov
Copy link
Member

@aanklewicz92 while I'm investigating the issue reason, please let me know if you spot any phantomjs/iojs processes after you stop wallaby.js (unless you have other apps spawning those processes).

@ArtemGovorov
Copy link
Member

I have made some changes in core v.1.0.119 that should hopefully make the issue go. Please let me know if you still see and I'll keep chasing down.

@dymank
Copy link

dymank commented Oct 5, 2015

For now I haven't got this problem

@behrangsa
Copy link

I just upgraded Wallaby and it is still showing this error when it starts up:

wallaby.js started
core v1.0.127
TypeError: Cannot read property '_session' of null
  at Server.handler (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\index.js:10:33)
  at emitOne (events.js:77:13)
  at Server.emit (events.js:166:7)
  at App.emit (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27)
  at Session.emit_open (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23)
  at process._tickCallback (node.js:340:13)

TypeError: Cannot read property '_session' of null
  at Server.handler (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\index.js:10:33)
  at emitOne (events.js:77:13)
  at Server.emit (events.js:166:7)
  at App.emit (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27)
  at Session.emit_open (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23)
  at process._tickCallback (node.js:340:13)

Execution progress: 50 tests
Execution progress: 100 tests
Execution progress: 150 tests
Execution progress: 200 tests
Execution progress: 250 tests
Execution progress: 300 tests
Execution progress: 350 tests
Execution progress: 400 tests
Execution progress: 450 tests
Execution progress: 500 tests
Execution progress: 550 tests
Execution progress: 600 tests
Execution progress: 650 tests
Execution progress: 700 tests
Execution progress: 750 tests
Execution progress: 800 tests
Execution progress: 850 tests
Execution progress: 900 tests
Execution progress: 950 tests
Execution progress: 1000 tests
Execution progress: 1050 tests
Execution progress: 1100 tests
Execution progress: 1150 tests
Execution progress: 1200 tests
Execution progress: 1250 tests
Execution progress: 1300 tests
Execution progress: 1350 tests
Execution progress: 1400 tests
Execution progress: 1450 tests
Execution progress: 1500 tests
Execution progress: 1550 tests
Execution progress: 1600 tests
Execution progress: 1650 tests
Execution progress: 1700 tests
Execution progress: 1750 tests
Execution progress: 1800 tests
Execution progress: 1850 tests
Execution progress: 1900 tests
Execution progress: 1950 tests
Execution progress: 2000 tests
Execution progress: 2050 tests
Execution progress: 2100 tests
Execution progress: 2150 tests

It doesn't prevent tests from running, but it is a bit disappointing to say the least.

IDE: WebStorm 10.0.4
OS: Windows Server 2008 R2 Standard Service Pack 1
Java: 1.8.0_60 64-bit
Node version: 4.0.0

@behrangsa
Copy link

Actually it is not working fine either. Changes are not picked up, tests are not automatically executed, files are not annotated, etc.

@ArtemGovorov
Copy link
Member

@behrangsa Did it stop working after the update and was working before? Please restart your IDE, update to suggested version again and start wallaby. Let me know if it starts working or not.

@behrangsa
Copy link

I hadn't used it for a while so I don't know if it was working before or not. Restarting the IDE didn't make any difference either.

@ArtemGovorov
Copy link
Member

Please send me idea.log (IDE - menu Help - Show Log...), also in your config file please add debug flag, restart wallaby and send me a few lines at the end of the Wallaby Console Output:

module.exports = function () {
    return {
        debug: true,
        workers: { ...

@ArtemGovorov
Copy link
Member

Also try stopping wallaby and killing all phantomjs/iojs processes after you stop wallaby.js if there're any (unless you have other apps spawning those processes), then start it again.

@behrangsa
Copy link

I just restarted the IDE again, no prompts for a new version to install. The installed version is not the same as the one that is reported in Wallaby Console:

Plugin info:

wallaby

Wallaby console:

wallaby.js started
core v1.0.127

I will email you the logs in a moment.

@ArtemGovorov
Copy link
Member

@behrangsa Re: version - it's expected, latest plugin version is 1.0.36 and latest core version is 1.0.127.

@behrangsa
Copy link

I just deleted C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\. I'll let you know if it fixes the problem. Downloading dependencies is in progress.

@behrangsa
Copy link

Deleting didn't fix the problem, but the session error is now only reported once:

wallaby.js started
core v1.0.127
TypeError: Cannot read property '_session' of null
  at Server.handler (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\index.js:10:33)
  at emitOne (events.js:77:13)
  at Server.emit (events.js:166:7)
  at App.emit (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\sockjs.js:182:27)
  at Session.emit_open (C:\Users\bsaeedzadeh\.WebStorm10\system\wallaby\wallaby\node_modules\phantom\node_modules\shoe\node_modules\sockjs\lib\transport.js:107:23)
  at process._tickCallback (node.js:340:13)

@ArtemGovorov
Copy link
Member

Thanks Behrang, the error message is harmless, it's just a third party module exception that doesn't affect anything, so you may ignore it for now. I'll keep investigating how to remove it. Let's move the conversation to email and try to find out why 1.0.36 doesn't show coverage and doesn't do change tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants