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

Shell throws an exception when a key is pressed during Meteor's rebuild #7312

Closed
kachkaev opened this issue Jun 27, 2016 · 2 comments
Closed

Comments

@kachkaev
Copy link

kachkaev commented Jun 27, 2016

I've been seeing this for a while and finally decided to report. This is probably applicable to any Meteor 1.3.*

The following exception frequently occurs when Meteor shell is interacted while Meteor is rebuilding itself:

W20160627-11:35:56.831(1)? (STDERR)
W20160627-11:35:56.936(1)? (STDERR) /path/to/project/.meteor/local/build/programs/server/shell-server.js:164
W20160627-11:35:56.936(1)? (STDERR)     if (options.key !== self.key) {
W20160627-11:35:56.936(1)? (STDERR)                ^
W20160627-11:35:56.937(1)? (STDERR) TypeError: Cannot read property 'key' of undefined
W20160627-11:35:56.937(1)? (STDERR)     at /path/to/project/.meteor/local/build/programs/server/shell-server.js:164:16
W20160627-11:35:56.938(1)? (STDERR)     at finish (/path/to/project/.meteor/local/build/programs/server/shell-server.js:130:7)
W20160627-11:35:56.938(1)? (STDERR)     at Socket.onClose (/path/to/project/.meteor/local/build/programs/server/shell-server.js:120:5)
W20160627-11:35:56.938(1)? (STDERR)     at Socket.emit (events.js:117:20)
W20160627-11:35:56.938(1)? (STDERR)     at TCP.close (net.js:466:12)

I'm experiencing this when running both the shell and meteor itself in a single terminal tab, but I guess the exception will still trigger regardless of this.

Steps to reproduce

  1. Run meteor run & meteor shell; lsof -P | grep ':3000' | awk '{print $2}' | xargs kill -9 – this will start Meteor in the background and will then open the shell in the foreground. This lets you see the console output without switching between the tabs. When the shell is closed with ^C, meteor server is also killed.
  2. Play a bit with the shell.
  3. Change one of the project files so that Meteor started to rebuild.
  4. While rebuild is taking place, pass any key press to the shell (I often accidentally press up trying to bring up previous shell commands because I think that Meteor has already stopped building, but it has not).
  5. See the above error once Meteor build has finished.

Every time the exception occurs I have to restart the server because the shell quits and therefore Meteor's background process gets killed.

Any thoughts?

@abernix
Copy link
Contributor

abernix commented Jun 28, 2016

Thanks for opening this. I've experienced this too and I can confirm that your reproduction steps are accurate.

@benjamn benjamn added this to the Release 1.4 milestone Jun 28, 2016
@benjamn benjamn self-assigned this Jun 28, 2016
benjamn added a commit that referenced this issue Jun 29, 2016
Also don't ignore the `error` parameter passed to the readJSONFromStream
callback function.

Fixes #7312.
@benjamn
Copy link
Contributor

benjamn commented Jun 29, 2016

This should be fixed if you do meteor update --release 1.4-beta.5.

@benjamn benjamn closed this as completed Jun 29, 2016
benjamn added a commit that referenced this issue Jul 1, 2016
Also don't ignore the `error` parameter passed to the readJSONFromStream
callback function.

Fixes #7312.
benjamn added a commit that referenced this issue Jul 7, 2016
Also don't ignore the `error` parameter passed to the readJSONFromStream
callback function.

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

No branches or pull requests

3 participants