You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By adding console.log(err); inside of process.on('unhandledRejection', (reason, promise) => {}
we will be able to print out the actual trace. I will add a PR following this issue
2017-03-25 20:14:00 DEBUG [main] - Got a msg type: 1
2017-03-25 20:14:00 INFO [main] - A message from Admin
ERR Config ###########################
ERR Config unhandledRejection: TypeError: Cannot read property 'name' of undefined [object Promise]
ERR Config ###########################
ERR Config unhandledRejection::catch(Cannot read property 'name' of undefined)
TypeError: Cannot read property 'name' of undefined
at contactToStringLong (/Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:68:19)
at /Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:164:62
at Generator.next (<anonymous>)
at /Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:7:71
at __awaiter (/Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:3:12)
at maybeBlacklistUser (/Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:150:12)
at Wechaty.<anonymous> (/Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:47:16)
at Generator.next (<anonymous>)
at fulfilled (/Users/zzn/Documents/ws/haoshiyou-bot/src/listener/message.js:4:58)
(node:59953) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
at getAsynchronousRejectionWarningObject (internal/process/promises.js:12:10)
at rejectionHandled (internal/process/promises.js:42:21)
at process.<anonymous> (internal/process/promises.js:21:7)
at Promise.then (native)
at Promise.catch (native)
at process.on (/Users/zzn/Documents/ws/haoshiyou-bot/node_modules/wechaty/dist/src/config.js:113:18)
at emitTwo (events.js:106:13)
at process.emit (events.js:194:7)
at emitPendingUnhandledRejections (internal/process/promises.js:85:22)
at runMicrotasksCallback (internal/process/next_tick.js:67:9)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
The text was updated successfully, but these errors were encountered:
Thanks for adding the detail trace log for Config.
I also have an idea of geting rid of process.on('unhandledRejection', ...) in Config, because sometimes there is no need to do this inside the FrameWork itself.
Maybe we should only enable this for DEBUG environment, like WEHATY_LOG=verbose or silly?
Right, the NodeJS has been modified to carry trace, it took me a while to
understand the processing in the Chatie itself is ignoring that trace.
It's ok to let the NodeJS level do its thing instead of do another layer of
formatting
Zainan Victor Zhou, 周载南
Senior Software Engineer, Tech Lead at Google
650-336-5691
On Sat, Mar 25, 2017 at 11:33 PM, Huan LI ***@***.***> wrote:
Thanks for adding the detail trace log for Config.
I also have an idea of geting rid of process.on('unhandledRejection', ...)
in Config, because sometimes there is no need to do this inside the
FrameWork itself.
Maybe we should only enable this for DEBUG environment, like
WEHATY_LOG=verbose or silly?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#360 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAnFRcaA4a2ymz7TqRfH7oVKOx2xoSzcks5rpgbKgaJpZM4MpTYQ>
.
By adding
console.log(err);
inside ofprocess.on('unhandledRejection', (reason, promise) => {}
we will be able to print out the actual trace. I will add a PR following this issue
Example Output:
The text was updated successfully, but these errors were encountered: