How to resolve "cannot pipe" issue with testcafe-hammerhead - testing

When running tests, I'm getting the following error:
1 Unhandled promise rejection:
Error: Cannot pipe, not readable
at new NodeError (node:internal/errors:387:5)
at ServerResponse.pipe (node:_http_outgoing:1070:22)
at respondOnWebSocket (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\websocket.js:56:9)
at Array.decideOnProcessingStrategy (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\stages.js:77:48)
at run (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\index.js:20:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Does anyone have a suggestion on how to resolve this?

See future updates related to this issue in this GitHub thread.

Related

"Module not found: Error: Can't resolve './iterator.js'

I am suddenly getting the follow errors and I have no clue how to fix them:
Object
loc: "1224:2-26"
message: "Module not found: Error: Can't resolve './iterator.js' in 'C:\\Users\\MyApp\\node_modules\\vega-embed\\build'"
moduleIdentifier: "C:\\Users\\MyApp\\node_modules\\#angular-devkit\\build-angular\\src\\babel\\webpack-loader.js??ruleSet[1].rules[2].use[0]!C:\\Users\\my-project\\node_modules\\#ngtools\\webpack\\src\\ivy\\index.js!C:\\Users\\MyApp\\node_modules\\source-map-loader\\dist\\cjs.js??ruleSet[1].rules[3]!C:\\Users\\MyApp\\node_modules\\vega-embed\\build\\vega-embed.module.js"
moduleName: "./node_modules/vega-embed/build/vega-embed.module.js"
[[Prototype]]: Object
./node_modules/vega-embed/build/vega-embed.module.js:1224:2-26 - Warning: Module not found: Error: Can't resolve './iterator.js' in 'C:\Users\MyApp\node_modules\vega-embed\build'
I also get the following warning when I build my app:
Warning: C:\Users\MyApp\src\app\components\vega\vega.component.ts depends on 'vega-embed'. CommonJS or AMD dependencies can cause optimization bailouts.
Can someone please help me understand what is wrong and how I can resolve fix these?

Import json Swagger to insomnia

I'm trying to import a Json file from Swagger to insomnia. To do that I use this project from NPM (I'm not familiar with NPM):
https://www.npmjs.com/package/insomnia-importers
I have npm v6.5.0 and node v11.9.0
To do that I run this command: insomnia-import /path/to/swagger-export.json > insomnia-export.json:
(node:38053) UnhandledPromiseRejectionWarning: TypeError: Cannot
convert undefined or null to object
at Function.keys ()
at object (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:300:14)
at generateParameterExample (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:332:12)
at Object.keys.forEach.propertyName (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:301:33)
at Array.forEach ()
at object (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:300:31)
at generateParameterExample (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:332:12)
at prepareBody (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:242:37)
at importRequest (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:173:11)
at tags.forEach (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:129:21)
(node:38053) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 1) (node:38053) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
What is the problem here?
Insomnia maintainer here.
Insomnia uses the insomnia-import package internally so you don't have to. You can import your Swagger file directly into Insomnia and it will import it.

Testcafe-hammerhead erorr reset-guard.ja:27

I am getting an error sometimes when I run testcafe
/opt/testcafe/node_modules/testcafe-hammerhead/lib/request-pipeline/connection-reset-guard.js:27
throw err;
^
This problem was already fixed in testcafe#0.23.1.
The commit with the fix - https://github.com/DevExpress/testcafe-hammerhead/commit/a5821a69f2d53799b1028ce459b03b1af662eb79

Unable to connect the Botium client with Google DialogFlow

Installed npm via mac terminal.
Installed botium client with npm command : npm install -g botium-cli
As directed in this tutorial :
Also have got allocated one DialogFlow instance and other details with project configuration as directed in the above linked tutorial.
Error I am getting while establishing the connection between botium client and DialogFlow :
Auth error:Error: error:0906D06C:PEM routines:PEM_read_bio:no start
line (node:25129) UnhandledPromiseRejectionWarning: Error: Cannot send
message to dialogflow container: { Error: 14 UNAVAILABLE: Getting
metadata from plugin failed with error: error:0906D06C:PEM
routines:PEM_read_bio:no start line
at Object.exports.createStatusError (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/common.js:87:15)
at Object.onReceiveStatus (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:1188:28)
at InterceptingListener._callNext (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:614:8)
at callback (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:841:24)
code: 14, metadata: Metadata { _internal_repr: {} }, details:
'Getting metadata from plugin failed with error: error:0906D06C:PEM
routines:PEM_read_bio:no start line' }
at /usr/local/lib/node_modules/botium-cli/node_modules/botium-connector-dialogflow/dist/botium-connector-dialogflow-cjs.js:222:14
(node:25129) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 12) (node:25129) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
If you need, there is also link to botium client
Can anyone help me here with the connection establishment and get going !
Same error was coming in my case when I was trying to connect botium to dialogue flow.
In my case DIALOGFLOW_PRIVATE_KEY was incorrect. Please check it, if it is starting with
------BEGIN PRIVATE KEY-----
and ends with
\n-----END PRIVATE KEY-----\n
This solved my issue:)

Node.js/ webpack/ getaddrinfo looking for internet when not needed, why?

I've got an issue with a machine that's supposed to be able to run offline.
I can pull the cable after my application is running, but during unplugged start I get the following error:
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:443
May 6 23:04:50 myco serve[4121]: at Object._errnoException (util.js:1022:11)
May 6 23:04:50 myco serve[4121]: at errnoException (dns.js:55:15)
May 6 23:04:50 myco serve[4121]: at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
May 6 23:04:50 myco serve[4121]: (node:4121) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It appears that dns.js is part of webpack/node-libs-browser but thats as far as I can seem to figure out.... I can't find GetAddrInfoReqWrap anywhere in my source tree, or getaddrinfo for that matter. Searching around there's a lot of info with people getting similar errors when deliberately trying to use npm, but thats not what I'm doing. I should have everything I need already on the machine.
Apparently this is a problem with serve.
Serve >6.5.3 apparently has an issue where it tries to contact the registry. Downgrade of serve to 6.5.3 solves this particular issue.
this is documented in https://github.com/zeit/serve/issues/348
not sure why serve would need to contact the registry.
noafterglow is right, but just for reference, rolling back to version 6.5.3 of serve can be accomplished with
npm install -g serve#6.5.3
Source: this post
I ran into exactly this error when trying to serve a VueJs app from a different VM from where the code was developed originally.
The file vue.config.js read :
module.exports = {
devServer: {
host: 'tstvm01',
port: 3030,
},
};
When served on the original machine the start up output is :
App running at:
- Local: http://tstvm01:3030/
- Network: http://tstvm01:3030/
Using the same settings on a VM tstvm07 got me a very similar error to the one the OP describes:
INFO Starting development server...
10% building modules 1/1 modules 0 activeevents.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN
at Object._errnoException (util.js:1022:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
If it ain't already obvious, changing vue.config.js to read ...
module.exports = {
devServer: {
host: 'tstvm07',
port: 3030,
},
};
... solved the problem.