My test pipeline suddenly started failing without any apparent changes, and it has continued to fail since then. The pipeline previously succeeded with the same commit, but now it's failing during execution. Is there something that might be wrong or updated in the Bitbucket pipeline recently?
It also happened last month but got resolved after i upgrade my plan to standard, but now it getting the same error vs last month. mostly error just
Uncaught UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".
But this error is unlikely to happen and i never got this even with the same commit and configuration before or when i ran the same test on my local machine
Here's the test script I have in my Bitbucket pipeline:
image: node:16.17.0
definitions:
services:
mysql:
image: mysql:5.7.17
variables:
MYSQL_DATABASE: [hidden]
MYSQL_ROOT_PASSWORD: [hidden]
memory: 6144
docker:
memory: 3072
steps:
- step: &TestScript
size: 2x
name: Test
caches:
- node
script:
- apt-get update && apt-get install -y default-mysql-client
- mysql -h 127.0.0.1 -u root -p[hidden] -e 'SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,"ONLY_FULL_GROUP_BY",""));'
- npm install
- npm run db:test:sync
- npm run db:test:seed
- npm test
services:
- mysql
Is there any assistance or insights regarding the issues I'm encountering with this setup?
Recently I've been noticing that my pipelines started building Node 18 while I specified lower versions (12 or 14 in my case) in my image. This might also be happening to you. Maybe try echoing the node version in the pipeline. I do have to say that I haven't resolved my own issue with this yet.
@billy I'd say it's very unlikely to be related to Bitbucket the pipelines. In my experience this is usually a unnoticed difference in the environment configs or code behaving differently/unexpectedly; or just the fact that is running in a different environment which triggers a bug - quite often a race condition.
Perhaps you could try to handle the UnhandledPromiseRejection and JSON.stringify the object, which could give you more info about this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Saxea _Flowie_ thanks for replying
It's been quite frustrating scouring for changes over the past few weeks. Given that I'm the sole contributor to this repository, it's rather perplexing that out of the blue, the pipeline failed even though the same commit had sailed through just yesterday.
The testing environment operates within containers and is completely isolated. Everything takes place on the Bitbucket pipeline server.
Interestingly, I encountered a similar hiccup last month that consumed days of my time in attempts to troubleshoot. Oddly enough, the problem mysteriously vanished on its own right after I decided to upgrade my plan.🤷♂️
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.