#unhandledpromiserejection: {Symbol(realm): null, Symbol(state): Proxy, Symbol(headers): Headers}

22 messages · Page 1 of 1 (latest)

gloomy wyvern
#

i. dont know why its appearing. none of my code that ive changed has a place where this would be an issue

mental vigilBOT
#
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
gloomy wyvern
#

one sec

#

unhandledpromiserejection: {Symbol(realm): null, Symbol(state): Proxy, Symbol(headers): Headers}

whole otter
#

Log the stacktrace of the unhandledRejection too, not only the promise that rejected

gloomy wyvern
whole otter
#

And…? What’s the code on that line?

gloomy wyvern
#

that's where the trace is nod for process.on('unhandledRejection')

#

unless i'm having a dummy moment brown_bear_a_shy i have it trace on err and emit the label so i know it came from there

whole otter
#

That… doesn’t help much does it? The unhandledRejection event emits with two parameters… log the second parameter

wicked yewBOT
#

node Event: 'unhandledRejection'
The 'unhandledRejection' event is emitted whenever a Promise is rejected and no error handler is attached to the promise within a turn of the event loop. When programming with Promises, exceptions are encapsulated as "rejected promises". Rejections can be caught and handled using promise.catch() and are propagated through a Promise chain. The 'unhandledRejection' event is useful for detecting and keeping track of promises that were rejected whose rejections have not yet been handled.

whole otter
#

Or remove that event listener (comment it out for example), does your process crash then or keep on running?

gloomy wyvern
#

sorry TH_bow im super noob because i never had this issue. for context, im moving to djs v14 from v13 and rewriting accordingly. i had an issue w the undici package not installing correctly, and now this is my next issue sad

with or without the event listener, the process tries logging in again and often repeatedly (without an error if i remove the event listener)

whole otter
#

Do you use pm2 or nodemon or something like that?

gloomy wyvern
#

pm2, but currently this is being ran on my local host/laptop for beta testing

whole otter
#

And do you use pm2 on that local host too?

#

Because then you‘d need to check pm2 logs, there won’t be any errors on the terminal

gloomy wyvern
#

i use VSC debug console to run it nod

whole otter
#

With nodemon? Or what process does that actually call?

#

Running debug console on top of pm2 won’t help you much, as the output said there‘s no debugger available during your runtime

gloomy wyvern