Questions tagged [unhandled-promise-rejection]
84 questions
0
votes
0 answers
MongooseError: Operation `therapists.find()` buffering timed out after 10000ms
I have seen this issue published in a few places however I still don't have a solution.
I am using a node server and can connect to my database correctly with a status of 1 for connected.
However when I send requests to the mongodb database, the…

Joshua
- 1,005
- 1
- 11
- 16
0
votes
1 answer
Getting UnhandledPromiseRejectionWarning even when catching exceptions
In NodeJS, I have some code like this:
function doSomethingAsync() {
return Promise.reject("error");
}
function main() {
doSomethingAsync().catch();
}
When I run this code, I get an UnhandledPromiseRejectionWarning.
I know that making my…

pushkin
- 9,575
- 15
- 51
- 95
0
votes
1 answer
NodeJS: UnhandledPromiseRejection when promise is rejected before await
I have two promises without catch blocks in the beginning and I'm doing await on both of them later with catch blocks. Second promise rejects before first promise resolves. So, while I'm still awaiting on the first promise, second promise is…

Vasudev
- 803
- 1
- 7
- 16
0
votes
2 answers
Is it possible to "bulletproof" a try..catch in async Javascript code?
Recently I've had a very frustrating time debugging a piece of async NodeJS code: an exception that I thought was definitely going to be caught in try..catch was leaking through, resulting in an unhandled promise error outside of the async_foo…

Alexander Gonchiy
- 916
- 11
- 17
0
votes
1 answer
Why Reject of Promise giving undefined error?
I have a set of list with checkboxes, when I click 5 checkboxes an alert message to be displayed congrates you have selected 5 options. I have to do the validation using promise. If I am not using reject, it is working fine. But if I add the code as…

Elizabeth
- 35
- 1
- 7
0
votes
0 answers
What is causes of UnhandledPromiseRejectionWarning in TypeGraphql?
I have an issue with my typegraphql code. I couldn't find what is causes this error message.
The code that I shared below is my resolver and mutation which should return a ProductResponse:
@Mutation(returns => ProductResponse)
async addProduct…

Hüseyn
- 3
- 3
0
votes
3 answers
How do I fix this error when creating a candy machine with metaplex?
I am following this tutorial "https://www.youtube.com/watch?v=4LLx7SMAOag&t=446s" and at 9:28 he tells us to input this
ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/config/solana/devnet-test.json
His…

HNBL
- 37
- 1
- 10
0
votes
0 answers
Why does google reject my web extension with the reference Yellow Magnesium
This is my first time uploading an extension and it got rejected. In the email i got it said
Spam and placement in the Store Details Violation reference ID: Yellow Magnesium Violation: The item does not work. How to rectify: Ensure that your item…

Bentley100
- 1
- 1
0
votes
1 answer
React.js + Node.js - Error when responding from server. "UnhandledPromiseRejectionWarning: Error: Request failed with status code 304"
As the title suggest, I get a weird error when responding with data from my server.
In homepage.js (which I want to load after loggin in) I have this request to the server to get the posts and then set the posts to the response.
useEffect(() =>…

Kevin. J
- 35
- 8
0
votes
2 answers
why nodemailer giving error here || UnhandledPromiseRejectionWarning || No recipients defined
i am new to js and development, making node mailer to send email
after pushing payloads to db.
Error (node:8244) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
Error: No…

amit perane
- 1
- 2
0
votes
1 answer
how to solve UnhaldedPromiseRejectionWarning when rejecting a promise
I am new to JavaScript and I am learning about promises. I created a simple script similar to the example I was given that checks whether a table can be booked and resolves/rejects the promise if it can or can't at the specified time.
If the time…

Valortome
- 11
- 5
0
votes
1 answer
Postgres INSERT causing UnhandledPromiseRejectionWarning
I'm running the following code
const {Client} = require('pg');
const credentials = {
user: "username",
host: "localhost",
database: "data",
password: "password",
port: 5432,
};
async function appendDb(val1, val2, val3) {
…

Eric Zhang
- 1
- 2
0
votes
0 answers
Getting UnhandledPromiseRejectionWarning: TimeoutError
I've been trying to create a stock scraper on a couple of different websites as a personal project. Here recently I've dabbling in using Puppeteer to handle the scraping through a virtual headless browser. However, when trying to scrape Walmart, it…
0
votes
1 answer
Discord.js v12+ TypeError: Cannot read property 'channel' of undefined
So I'm overwriting permissions for a ticket feature and its giving me an error
Cannot read property 'channel' of undefined
with this line of code:
message.guild.channels.create(`create-${message.author.id}`, { type: 'text' }).then(c => {
…

cylence
- 15
- 8
0
votes
0 answers
A: Discord.js v12+ channel is not defined
I seem to be getting this error
(node:31844) UnhandledPromiseRejectionWarning: ReferenceError: channel is not defined
I don't understand why this comes up but I know the line of code.
bot.on('message', async (message) => {
if…

cylence
- 15
- 8