question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mock Server not Starting

See original GitHub issue

I’m currently trying to set up pact with an Angular application and Karma. When running the karma test in which the pact is generated, I always get the error “process not found”:

Error: Command failed: taskkill /f /t /pid 13344
FEHLER: Der Prozess "13344" wurde nicht gefunden.

    at checkExecSyncError (child_process.js:472:13)
    at Object.execSync (child_process.js:512:13)
    at Server.stop (C:\daten\workspaces\pact-node-test\node_modules\@pact-foundation\pact-node\src\server.js:138:7)
    at Server.<anonymous> (C:\daten\workspaces\pact-node-test\node_modules\@pact-foundation\pact-node\src\server.js:117:8)
    at ChildProcess.g (events.js:292:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Socket.<anonymous> (internal/child_process.js:351:11)
    at emitOne (events.js:96:13)

After some digging, I realized this is just a subsequent error to the mock server not starting. With LOGLEVEL set to DEBUG, I get the following log output before the above:

[2017-10-07T14:40:44.300Z] DEBUG: pact-node@4.12.0/14532 on THEMACHINE:
    : cannot load such file -- bundler/vendor/molinillo/lib/molinillo/modules/specification_provider (LoadError)

So, there are two issues here:

  1. When the mock server isn’t starting, an error should be raised so that it’s clear what went wrong. That would have saved me some trouble finding the real cause, because I was first looking into the “process not found” error 😃.
  2. Why do I get the LoadError? Obviously is has something to do with Ruby dependencies not being satisfied, but I’m not (yet) into Ruby enough to find out what’s wrong here.

I have prepared a minimal example at https://github.com/thombergs/pact-node-test. Running npm run start I get the above error.

I would appreciate any hints on this issue 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:23 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
thombergscommented, Oct 14, 2017

I got it to work with the new version, and even through karma-pact now. Thanks a lot for your efforts.

1reaction
mboudreaucommented, Oct 13, 2017

@mefellows I’ve found several things wrong with pact-standalone. I think a lot of these bugs seems to have been when I updated pact-node to 5.1.0. I’m fixing them right now, should be out shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running MockServer
The Maven plugin has the following goals: start - start MockServer, do not block, but stop when build ends; stop - stop a...
Read more >
Docker container not starting · Issue #1177 - GitHub
Describe the issue After recent changes the docker container is not starting using the following command: docker run --rm -it -p 1080:1080 ...
Read more >
spring boot - Mockserver expectation not active - Stack Overflow
First prevent the Camel route to start (for example with the Route.configure() method),; Initialize the mocks and their expectations ...
Read more >
Requests to my mock servers aren't returning the expected ...
This error means that your mock is private and requires a Postman API key to be passed in the request header named x-api-key....
Read more >
How To Persist Expectations On Mock Server Restart - YouTube
Vlog channel Oyekool: https://www.youtube.com/c/Oyekool----------------------------------------⚙️Gears used⚙️Gimbal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found