Please answer the questions the best you can:
1) What version of bluebird is the issue happening on?
3.4.4
2) What platform and version? (For example Node.js 0.12 or Google Chrome 32)
:; node -v
v5.12.0
3) Did this issue happen with earlier version of bluebird?
No.
Our test suite explodes with new Uncaught error: -- this is using hapi, lab, and with newrelic active. I can't reproduce simply yet, though I'll update this ticket if I get a chance. I have a suspicion it's related to changes around domains in 3.4.4.
I'm experiencing the same issue in Node v4.5.0. Rolling back to 3.4.3 fixes it.
in util.js if you modify domainBind to:
return self.bind(cb); does it work?
@petkaantonov Yes, that works.
noticed the same thing in node v0.10.38 .
if you throw an error inside a .then() promise block it won't go into the .catch() block
rolling back to 3.4.3 does not produce this problem
^^ Yes, my problem was with throw as well, did not enter expected catch block.
confirmed, seeing the same error
Yea, we had this causing errors in prod on Node 6 :/ Unfortunately there's not a whole lot of information in the error, here's the full trace from within a Hapi server:
> err
{ handle: 11,
type: 'error',
className: 'Error',
constructorFunction: { ref: 16 },
protoObject: { ref: 17 },
prototypeObject: { ref: 3 },
properties:
[ { name: 'stack', attributes: 2, propertyType: 3, ref: 3 },
{ name: 'message', attributes: 2, propertyType: 0, ref: 18 },
{ name: 'data', propertyType: 0, ref: 19 },
{ name: 'isBoom', propertyType: 0, ref: 20 },
{ name: 'isServer', propertyType: 0, ref: 20 },
{ name: 'output', propertyType: 0, ref: 21 },
{ name: 'reformat', propertyType: 2, ref: 22 },
{ name: 'isDeveloperError', propertyType: 0, ref: 20 } ],
text: 'Error: Uncaught error' }
> process.stdout.write(err.stack);
< Error: Uncaught error
< at _error (/Users/copeet/Github/backend/node_modules/hapi/lib/protect.js:61:28)
< at internals.Protect._onError (/Users/copeet/Github/backend/node_modules/hapi/lib/protect.js:40:16)
< at Domain.domain.on (/Users/copeet/Github/backend/node_modules/hapi/lib/protect.js:30:21)
< at emitOne (events.js:96:13)
< at Domain.emit (events.js:188:7)
< at runBound (/Users/copeet/Github/backend/node_modules/bluebird/js/release/util.js:343:18)
< at tryCatcher (/Users/copeet/Github/backend/node_modules/bluebird/js/release/util.js:16:23)
< at Promise._settlePromiseFromHandler (/Users/copeet/Github/backend/node_modules/bluebird/js/release/promise.js:510:31)
< at Promise._settlePromise (/Users/copeet/Github/backend/node_modules/bluebird/js/release/promise.js:567:18)
< at Promise._settlePromise0 (/Users/copeet/Github/backend/node_modules/bluebird/js/release/promise.js:612:10)
< at Promise._settlePromises (/Users/copeet/Github/backend/node_modules/bluebird/js/release/promise.js:691:18)
< at Promise._fulfill (/Users/copeet/Github/backend/node_modules/bluebird/js/release/promise.js:636:18)
< at /Users/copeet/Github/backend/node_modules/bluebird/js/release/nodeback.js:42:21
Pinning Bluebird to 3.4.3 resolved the issue.
Also, everyone go do npm shrinkwrap from now on, right?! :)
https://docs.npmjs.com/cli/shrinkwrap
Wouldn't it be wise to pull this release for now?
Seeing the same issue here.
released 3.4.5 and deprecated 3.4.4
Thank you, @petkaantonov!
Most helpful comment
released 3.4.5 and deprecated 3.4.4