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

Chimpy crashes upon app server restart with --ddp flag #145

Open
reinisriekstins opened this issue Jul 3, 2019 · 2 comments
Open

Chimpy crashes upon app server restart with --ddp flag #145

reinisriekstins opened this issue Jul 3, 2019 · 2 comments

Comments

@reinisriekstins
Copy link

The problem

I was following the instructions at https://guide.meteor.com/v1.3/testing.html#acceptance-testing to setup an acceptance testing environment with Chimpy, and upon running the command chimpy --ddp=http://localhost:3000 --mocha --watch --path=tests, everything runs correctly and the tests are executed , however upon making any changes to any client or server file in the Meteor app running on localhost:3000, when the server restart finishes, the chimpy process crashes throwing the following stack trace:

TypeError: Cannot read property 'web.browser.legacy' of undefined
    at Object.observer.changed (/path/to/project/node_modules/chimpy/dist/lib/ddp-watcher.js:114:58)
    at /path/to/project/node_modules/xolvio-ddp/lib/ddp-client.js:257:20
    at Function._.each._.forEach (/path/to/project/node_modules/ddp-underscore-patched/underscore.js:112:20)
    at DDPClient._message (/path/to/project/node_modules/xolvio-ddp/lib/ddp-client.js:256:11)
    at Client.<anonymous> (/path/to/project/node_modules/xolvio-ddp/lib/ddp-client.js:97:10)
    at Client.emit (events.js:182:13)
    at Client.EventEmitter.emit (domain.js:442:20)
    at Client.dispatchEvent (/path/to/project/node_modules/faye-websocket/lib/faye/websocket/api/event_target.js:24:10)
    at Client._receiveMessage (/path/to/project/node_modules/faye-websocket/lib/faye/websocket/api.js:134:10)
    at Client.<anonymous> (/path/to/project/node_modules/faye-websocket/lib/faye/websocket/api.js:34:49)
    at Client.emit (events.js:187:15)
    at Client.EventEmitter.emit (domain.js:442:20)
    at Client.<anonymous> (/path/to/project/node_modules/websocket-driver/lib/websocket/driver/hybi.js:460:14)
    at pipe (/path/to/project/node_modules/websocket-extensions/lib/pipeline/index.js:37:40)
    at Pipeline._loop (/path/to/project/node_modules/websocket-extensions/lib/pipeline/index.js:44:3)
    at Pipeline.processIncomingMessage (/path/to/project/node_modules/websocket-extensions/lib/pipeline/index.js:13:8)

This doesn't happen, when I run chimpy without the -ddp flag.

Also tried both running the Meteor app normally the meteor run and running with the test command and acceptance-test-driver: meteor test --full-app --driver-package tmeasday:acceptance-test-driver. Chimpy crashes in either case.

Package versions used

Meteor: 1.8.1
NodeJS bundled with Meteor: 8.11.4
Chimpy: 1.2.0
NodeJS on my machine: 10.10.0
Using MacOS High Sierra 10.13.6

@jirikrepl
Copy link

I have the same problem

@jirikrepl
Copy link

For anyone still using chimpy, I found a temporary workaround, it will disable test reloads upon code change, but at least it will not crash.
You can still trigger chimp re-run, if you change and save the test.

  1. from your error message find ddp-watcher.file
  2. Comment lines around self._triggerRerun();

Screen Shot 2021-10-19 at 17 59 15

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

No branches or pull requests

2 participants