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

Invalid Time Value #203

Closed
lukepolo opened this issue Dec 18, 2020 · 23 comments
Closed

Invalid Time Value #203

lukepolo opened this issue Dec 18, 2020 · 23 comments

Comments

@lukepolo
Copy link

I am currently running into an error

vendor.9ab39863a68553288dec.js:2 RangeError: Invalid time value
    at V (vendor.9ab39863a68553288dec.js:2)
    at G (main.5c5b0f89ccd1be55a12f.js:1)
    at X (main.5c5b0f89ccd1be55a12f.js:1)
    at ni (vendor.9ab39863a68553288dec.js:2)
    at Bl (vendor.9ab39863a68553288dec.js:2)
    at ku (vendor.9ab39863a68553288dec.js:2)
    at bu (vendor.9ab39863a68553288dec.js:2)
    at yu (vendor.9ab39863a68553288dec.js:2)
    at du (vendor.9ab39863a68553288dec.js:2)
    at vendor.9ab39863a68553288dec.js:2

We should probably not render the whole page cause of an invalid time.

@felixmosh
Copy link
Owner

felixmosh commented Dec 18, 2020

Can you elaborate please?

@lukepolo
Copy link
Author

Sure, im not 100% sure what happened, (hence few details). I got into a bad state where I was having too many connections on my queue and I started to have lots of delayed / waiting jobs.

This is much as I have to go off, feel free to close, but I figured we could at least catch the exception and gracefully fail so we can view which jobs are the culprits.

@felixmosh
Copy link
Owner

Hi, I've saw the same issue, it happened when I've added a delayed task (using the example) since the endpoint config, the delay at the server side comes as a string (which is invalid).

I've made a PR to fix the example.

Let me know if you have the same / similar issue.

@Jivings
Copy link
Contributor

Jivings commented Jan 2, 2021

Also getting this error when I have stalled jobs 👍

@felixmosh
Copy link
Owner

@Jivings how can I reproduce this issue? can you provide a small reproduction repo?

@Jivings
Copy link
Contributor

Jivings commented Jan 4, 2021

I'm not certain, but it was definitely happening when I had some stalled jobs. But also could have been a 2020/2021 issue becuase stalled jobs were from before the year date line 😅

Now it's not happening, so not sure how to reproduce.

@Jivings
Copy link
Contributor

Jivings commented Jan 6, 2021

Just got it now and it looks like one of the Jobs in the response doesn't have any data so I guess that will do it!

image

@felixmosh
Copy link
Owner

@Jivings thank you, but how this can happen?

@leorcvargas
Copy link

Just got it now and it looks like one of the Jobs in the response doesn't have any data so I guess that will do it!

I'm also facing this problem, but I'm not sure what makes it happens

image

@deanshub
Copy link

Hey man,
first of all, awesome project, helped me a-lot!
I tried version 1.4.1 but I still get the exception and the white screen
image
Anything I can do to help?

@felixmosh
Copy link
Owner

felixmosh commented Feb 26, 2021

@deanshub I'm glad it helps you!

I've tested this case (timestamp = null), and every thing is working as expected
image

Can you add here an entire queue object, so I will test with it? or any other method that I will be able to reproduce it on my machine :]

@felixmosh felixmosh reopened this Feb 26, 2021
@deanshub
Copy link

deanshub commented Feb 27, 2021

{
  "stats": {
    "redis_version": "4.0.11",
    "used_memory": "1001928",
    "mem_fragmentation_ratio": "6.81",
    "connected_clients": "7",
    "blocked_clients": "0",
    "total_system_memory": "16521273344"
  },
  "queues": [
    {
      "name": "plugin-execution",
      "counts": {
        "waiting": 0,
        "active": 0,
        "completed": 0,
        "failed": 1,
        "delayed": 0,
        "paused": 0
      },
      "jobs": [
        {
          "id": "b8676711-f817-4f34-a588-e59aeae80f47",
          "timestamp": null,
          "processedOn": 1614203068243,
          "finishedOn": 1614203068358,
          "progress": 0,
          "attempts": 1,
          "delay": 0,
          "failedReason": "Cloning into '.'...\nremote: Repository not found.\nfatal: repository 'https://x-access-token:[email protected]/undefined/undefined.git/' not found\n",
          "stacktrace": [
            "Error: Cloning into '.'...\nremote: Repository not found.\nfatal: repository 'https://**:**@github.com/undefined/undefined.git/' not found\n\n    at toError (/app/node_modules/simple-git/promise.js:90:14)\n    at /app/node_modules/simple-git/promise.js:61:36\n    at Git.<anonymous> (/app/node_modules/simple-git/src/git.js:214:18)\n    at Function.Git.fail (/app/node_modules/simple-git/src/git.js:1475:18)\n    at fail (/app/node_modules/simple-git/src/git.js:1433:20)\n    at /app/node_modules/simple-git/src/git.js:1442:16\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
          ],
          "opts": {
            "attempts": 1,
            "delay": 0,
            "timestamp": 1614370058912
          },
          "data": {},
          "name": "__default__",
          "returnValue": null
        }
      ],
      "readOnlyMode": false
    }
  ]
}

@felixmosh
Copy link
Owner

I've tried your json, and it loads as expected, (pay attention that the start time is 1970, since timestamp field is null)

image

@deanshub
Copy link

Sorry, GAing issues, thanks!

@felixmosh
Copy link
Owner

Sorry, GAing issues, thanks!

So, it works? :)

@deanshub
Copy link

So, it works? :)

Perfectly

@deanshub
Copy link

I want to add A PR but not sure how it would best be implemented

@deanshub
Copy link

I'll open a new issue so we can discuss it

@PlkMarudny
Copy link

I just add a repeatable job and it goes to the "DELAYED" tab, clicking on it produces:

image

Data:

{
  "data": {
    "marketCode": "XADS",
    "marketName": "Abu Dhabi Securities Exchange",
    "tickerCode": "ADAVIATI",
    "type": "MINMAX",
    "data": {
      "timePeriod": {
        "id": 3,
        "value": "52 weeks"
      },
      "option": true
    },
    "destinations": [
      {
        "id": 1,
        "handle": "@first"
      }
    ]
  },
  "returnValue": null
}

Options:

{
  "attempts": 1,
  "delay": 164999195991598050,
  "repeat": {
    "count": 1,
    "key": "__default__:6920637091843936256::60000",
    "every": "60000",
    "jobId": "6920637091843936256"
  },
  "jobId": "repeat:254c393220ad65e02a77708fe6e39344:165000846000060000",
  "timestamp": 1650008461958,
  "prevMillis": "165000846000060000"
}

@PlkMarudny
Copy link

A job submitted with 'cron' option however, does not produce an error:

{
  "attempts": 1,
  "delay": 182326,
  "repeat": {
    "count": 1,
    "key": "__default__:6920639842099400704:::*/5 * * * *",
    "cron": "*/5 * * * *",
    "jobId": "6920639842099400704"
  },
  "jobId": "repeat:b9f81f6ee398a0ca527fad568357688f:1650009300000",
  "timestamp": 1650009117674,
  "prevMillis": 1650009300000
}

@PlkMarudny
Copy link

OK, "every" should be a number, not a string. This is the source of an error.

@felixmosh
Copy link
Owner

@PlkMarudny if this is a new bug, pls open a new ticket with reproduction steps

@PlkMarudny
Copy link

PlkMarudny commented Oct 11, 2022 via email

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

6 participants