Skip to content

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

@reinisriekstins

Description

@reinisriekstins

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions