"Promise was collected" error message: is this a kind of timeout ?
See original GitHub issueHi, I’m using node 7 + CRI 0.18.
I encounter this error while waiting a promise completion: “Promise was collected”.
I can reproduce this issue with that code:
Runtime.evaluate({ expression:generateExpression(insertJsScript), awaitPromise:true }).then(function (response) {
console.log('response:', response);
});
/* Stringified and executed remotely in chrome headless. */
function insertJsScript() {
return new Promise(function (resolve, reject) {
setTimeout(resolve, 1000);
});
}
/* Generate an IIEF string invoking `fn` */
function generateExpression(fn) {
return '(' + fn.toString() + ')()';
}
It looks like a timeout error. When reducing timeout to 350ms, everything is fine.
So I’m wondering, is this a timeout ? And if so, how can I configure it ?
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
NodeJS Timeout a Promise if failed to complete in time
class MyPromise extends Promise { constructor(timeout, callback) { // We need to support being called with no milliseconds // value, because the various ......
Read more >Timeout error that makes unfuctional the wweb app
I'm using Angular and the auth0-spa-js SDK to authenticate. In the web application the user doesn't watch any message or page about some...
Read more >Apply Timeout to JavaScript Promises | by saransh kataria
JavaScript promises do not have any time associated with them. We can use a .then() function and wait until the promise is resolved...
Read more >A Complete Guide to Timeouts in Node.js - Better Stack
Assigning timeout values prevents network operations in Node.js from blocking indefinitely. This article provides extensive instruction on ...
Read more >How can I add a timeout to a promise in JavaScript?
There's nothing particularly complicated about this code sample, really. All it does is use the Promise constructor to wrap setTimeout() and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wi-ski the README and the wiki are good starting points, you may also want to check out the protocol documentation. 😃
No idea, sorry. Try asking in the Google Group or file an issue to the official repo.