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.

sending request to unused path with popsicle causes node process to hang indefinitely

See original GitHub issue

Platform: Windows 8.1

Packages:

  • nock@9.0.9
  • popsicle@9.1.0

Requesting a url that hasn’t been registered in nock will cause the entire node process to block indefinitely until it is killed. Simple example:

const popsicle = require('popsicle');
const nock = require('nock');

let scope = nock('http://google.com')
  .get('/hello').reply(200, 'OK');

popsicle.request('http://google.com/hello').then(res => console.log(res.body)); // This works

popsicle.request('http://google.com/hi').then(res => console.log(res.body)); // Hangs

setting DEBUG=nock.* constantly spams “req.abort”. ex:

  nock.request_overrider req.abort +1ms
  nock.request_overrider req.abort +2ms
  nock.request_overrider req.abort +1ms
  nock.request_overrider req.abort +0ms
  nock.request_overrider req.abort +1ms
  nock.request_overrider req.abort +0ms
  nock.request_overrider req.abort +1ms
  nock.request_overrider req.abort +0ms
  nock.request_overrider req.abort +1ms
...

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
petersolopovcommented, Nov 6, 2017

I caught a bug in 9.0.9, but after 9.0.19 it didn’t reproduce. It seems to be a fixed in #886 .

Would be great make PR with branch bug-841-popsicle-hangs, because the branch has a useful test 👍

0reactions
lock[bot]commented, Oct 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node HTTP request hangs forever - javascript - Stack Overflow
But every once in a while, it just kinda stops. The console reports "Calling status API..." and stops there indefinitely. It doesn't even ......
Read more >
Agents - Configuration File Reference | Consul
If the specified file path already exists, Consul will attempt to clear the file ... Ensure that the JWT sub matches the node...
Read more >
Documentation - Apache Kafka
We'll call processes that publish messages to a Kafka topic producers. ... property will cause the producer to automatically retry a failed send...
Read more >
Home - Mirantis Secure Registry - Docs
The procedure to install Mirantis Secure Registry on a host is the same, ... Whenever a user pulls an image, the MSR node...
Read more >
CREAK Data Explorer - UT Computer Science
An Essay obscures information and makes it hard to read. ... Pythagoras developed his own theory to explain how music works.
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