ember-cli-code-coverage icon indicating copy to clipboard operation
ember-cli-code-coverage copied to clipboard

Request aborted - BadRequestError seen from v2.0.0-beta.2

Open omarhamdan opened this issue 2 years ago • 6 comments

This appeared when upgrading from v2.0.0-beta.1 to v2.0.0-beta.2 and consequent versions. We're using ember-cli at 3.23.0.

This issue, seems to be similar although pretty old. I haven't dived into it yet, but I'll try to get a repro on a new ember app.

BadRequestError: request aborted
    at IncomingMessage.onAborted (/home/circleci/project/node_modules/raw-body/index.js:238:10)
    at IncomingMessage.emit (events.js:315:20)
    at abortIncoming (_http_server.js:561:9)
    at socketOnClose (_http_server.js:554:3)
    at Socket.emit (events.js:327:22)
    at TCP.<anonymous> (net.js:673:12

Update: We are running our tests in CircleCi, and we parallelize the tests across CI containers. This error appears only on some containers and not others.

omarhamdan avatar Jul 01 '22 12:07 omarhamdan

Seeing the same case in this environment: Ember 3.28.5 Node 16.14.2 alpine 3.14 Packaged using 16.16.0 node

Coverage works with 1.0.3 and no embroider, with embroider and with the beta.4 version of the addon, seeing either this same error above or the tests report Unknown%(0/0)

ztjohns avatar Jul 27 '22 21:07 ztjohns

@omarhamdan were you able to reproduce this with a new app? Getting a minimal reproduction would be quite helpful for working out what the issue is here

acorncom avatar Jul 28 '22 03:07 acorncom

A related question. Is this only happening if you’re also using Ember exam (I’m assuming that’s how parallelizing is occurring)? Or is this steadily reproducible with the native test runner?

acorncom avatar Jul 28 '22 03:07 acorncom

@acorncom We are not using ember exam, but we are using ember-cli-mirage 2.4.0. We have about 900 tests that run in total in our project.

ztjohns avatar Jul 28 '22 11:07 ztjohns

Ok was able to run it this morning, and hee is the full stack error that I get:

BadRequestError: request aborted
at IncomingMessgae.onAborted (...node_modeules/raw-body/index.js:238:10)
at IncomingMessgae.emit (node:events:527:28)
at IncomingMessgae.emit (node:domain:475:12)
at IncomingMessgae._destroy (node:_http_incoming:179:10)
at _destroy (node:internal/streams/destroy:102:25)
at IncomingMessgae.destroy (node:internal/streams/destroy:64:5)
at abortIncoming (node:_http_server:602:9)
at socketOnClose (node:_http_server:596:3)
at Socket.emit (node:events:539:35)
at Socket.emit (node:domain:475:12)
at TCP.<anonymous> (node:net:709:12)

apologies if things have typos, I cannot copy and paste :D

ztjohns avatar Jul 28 '22 11:07 ztjohns

I had a good lead for a while that things were failing because crypto and other node polyfills are no longer included in webpack 5, but after pulling all those in, I still got the same issue unfortunately.

ztjohns avatar Jul 28 '22 14:07 ztjohns