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.

[core-https] "write after end" test failure on Node 14

See original GitHub issue

Two tests in core-https are failing on Node 14:

  1) NodeHttpsClient
       should report upload and download progress:
     RestError: write after end
      at FakeRequest.<anonymous> (src/nodeHttpsClient.ts:139:18)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:80:21)

  2) NodeHttpsClient
       should fail if progress callbacks throw:
     Uncaught Error: it failed horribly!
      at ReportTransform.onUploadProgress (test/node/nodeHttpsClient.spec.ts:133:15)
      at ReportTransform._transform (src/nodeHttpsClient.ts:37:12)
      at ReportTransform.Transform._read (_stream_transform.js:205:10)
      at ReportTransform.Transform._write (_stream_transform.js:193:12)
      at writeOrBuffer (_stream_writable.js:352:12)
      at ReportTransform.Writable.write (_stream_writable.js:303:10)
      at ReportTransform.Writable.end (_stream_writable.js:567:10)
      at NodeHttpsClient.<anonymous> (src/nodeHttpsClient.ts:102:28)
      at Generator.next (<anonymous>)
      at /home/vsts/work/1/s/common/temp/node_modules/.pnpm/tslib@2.0.3/node_modules/tslib/tslib.js:114:75
      at new Promise (<anonymous>)
      at Object.__awaiter (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/tslib@2.0.3/node_modules/tslib/tslib.js:110:16)
      at NodeHttpsClient.sendRequest (dist-test/index.node.js:1339:22)
      at Context.<anonymous> (test/node/nodeHttpsClient.spec.ts:136:28)
      at Generator.next (<anonymous>)
      at /home/vsts/work/1/s/common/temp/node_modules/.pnpm/tslib@2.0.3/node_modules/tslib/tslib.js:114:75
      at new Promise (<anonymous>)
      at Object.__awaiter (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/tslib@2.0.3/node_modules/tslib/tslib.js:110:16)
      at Context.<anonymous> (dist-test/index.node.js:2829:22)
      at processImmediate (internal/timers.js:461:21)

https://dev.azure.com/azure-sdk/public/_build/results?buildId=576983&view=logs&j=5156becd-11a6-53cb-b80b-50fcb338b499&t=96b03519-0d03-5e92-2355-2d37223b59da&l=1967

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
xirzeccommented, Oct 19, 2020

I have a fix, just need to get out of meeting to push the PR

0reactions
xirzeccommented, Oct 20, 2020

Do we need similar fix in core-http?

Nah, this is in the new client built directly on top of the https module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write After End error in node.js webserver - Stack Overflow
I am struggling with my node.js hobby project due to a "write after end" Error. I have a created a node.js webserver that...
Read more >
Creating an Application Performance Monitor Using Node 14 ...
I'll cover the following Node.js features in this app: ... As a test failed, it will trigger also an uncaught exception so in...
Read more >
HTTPS | Node.js v19.3.0 Documentation
In Node.js this is implemented as a separate module. ... When using CommonJS, the error thrown can be caught using try/catch: ... Added...
Read more >
Testing Node.js with Mocha and Chai - LogRocket Blog
Running a Mocha test in Node.js; Writing tests with Mocha ... callback with the error if any // to terminate the test with...
Read more >
Changelog - Node Tap
See testing with fixtures. Capture the stack trace more helpfully in "subtest after end" errors. Expose timing info on all test objects; Expose...
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