Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RangeError: Invalid time value #839

Closed
nodegin opened this issue Oct 16, 2024 · 13 comments
Closed

RangeError: Invalid time value #839

nodegin opened this issue Oct 16, 2024 · 13 comments

Comments

@nodegin
Copy link

nodegin commented Oct 16, 2024

When I click into "DELAYED 1" tab of the queue,
I am encountering this error:

2024-10-16 11 43 54 2024-10-16 11 52 11
@felixmosh
Copy link
Owner

Hi, thank you for reporting this bug, can you elaborate a bit,
Which queue are you using? Bull or BullMQ
Which server adapter?
What is you job data & options?

How can I reproduce this?

@Nekkiton
Copy link

Nekkiton commented Oct 16, 2024

HI @felixmosh, I have the same issue after migrting from 5.14.0 to 6.2.1 version
I'm using NestJs+bullmq
ExpressAdapter

Below you can see the data I've got for /api/queues?activeQueue=Agent.disconnected&status=delayed&page=1&jobsPerPage=10 request

{
     "name": "Agent.disconnected",
     "statuses": [
       "latest",
       "active",
       "waiting",
       "waiting-children",
       "prioritized",
       "completed",
       "failed",
       "delayed",
       "paused"
     ],
     "counts": {
       "active": 0,
       "completed": 41,
       "delayed": 1,
       "failed": 1,
       "paused": 0,
       "prioritized": 0,
       "waiting": 0,
       "waiting-children": 0
     },
     "jobs": [
       {
         "id": "54",
         "timestamp": 1729072848292,
         "processedOn": 1729073751539,
         "progress": 0,
         "attempts": 16,
         "delay": 60000,
         "failedReason": "The agent is still unavailable",
         "stacktrace": [
           // some stacktrace
         ],
         "opts": {
           "attempts": 4320,
           "removeOnFail": 10000,
           "removeOnComplete": 10000,
           "backoff": {
             "delay": 60000,
             "type": "fixed"
           }
         },
         "data": {
           // some data
         },
         "name": "Agent.disconnected",
         "returnValue": null,
         "isFailed": true
       }
     ],
     "pagination": {
       "pageCount": 1,
       "range": {
         "start": 0,
         "end": 9
       }
     },
     "readOnlyMode": false,
     "allowRetries": true,
     "allowCompletedRetries": true,
     "isPaused": false,
     "type": "bullmq"
   }

@felixmosh
Copy link
Owner

I've injected your data, it works for me...
image

@Nekkiton
Copy link

Nekkiton commented Oct 17, 2024

I see that issue only on "DELAYED" tab, other tabs work great

upd: tried to add from ui and got the same error

@felixmosh
Copy link
Owner

felixmosh commented Oct 20, 2024

@Nekkiton can you provide the job options that you are creating a job with?

I'm still can't reproduce it.
image

@Nekkiton
Copy link

Nekkiton commented Oct 20, 2024

quite strange I use next job options:

{
           "attempts": 4320,
           "removeOnFail": 10000,
           "removeOnComplete": 10000,
           "backoff": {
             "delay": 60000,
             "type": "fixed"
           }
}

And that I see:
screen

@felixmosh
Copy link
Owner

felixmosh commented Oct 21, 2024

This is weird, why It get added with the delayed status? there is no delay property in your options...
When I add a job with your options, it get started immediatetly...

Screen.Recording.2024-10-21.at.9.55.21.mov

Can you double check that you are using bullMQ adapter with the BullMQ queue (or the Bull Adapter with the Bull Queue)

@Nekkiton
Copy link

Nekkiton commented Oct 21, 2024

why It get added with the delayed status? there is no delay property in your options...

this is because of custom logic inside the processor. It failed almost immediately since I didn't pass necessary data

Can you double check that you are using bullMQ adapter with the BullMQ queue (or the Bull Adapter with the Bull Queue)

Yes, I've checked that right now. everything is ok, in general queues work as expected, only "delayed" tab on ui doesn't work :(

p.s.
I'm using NestJs+bullmq + ExpressAdapter

@felixmosh
Copy link
Owner

It is still works for me... :|
I've added a throw in the job processor, it gets delayes, as it is on your video, but everything just works.

Can you open the network tab, and provide me the JSON?
This is a client side error, which throws when some number is null (probably).

@Nekkiton
Copy link

Nekkiton commented Oct 21, 2024

Not sure which JSON you mean

But below is a JSON I've got for api/queues?activeQueue=UPD.validatorQueue&status=latest&page=1&jobsPerPage=10 request

latest.json

@Segfaultd
Copy link

Can confirm same issue here. Happy that you fixed it. Any idea about a release timeframe?

@felixmosh
Copy link
Owner

@Nekkiton thank you for that json, it helped me to track the issue... (not sure how it can happend)...
Fixed in v6.2.4

@Nekkiton
Copy link

Awesome! Thank you for quick fix here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants