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

can't list failed jobs because of exception : The \"data\" argument must be one of type [...] #181

Closed
delmotte opened this issue Aug 28, 2019 · 5 comments
Assignees
Labels
Milestone

Comments

@delmotte
Copy link

delmotte commented Aug 28, 2019

TypeError [ERR_INVALID_ARG_TYPE]: The \"data\" argument must be one of type string, TypedArray, or DataView. Received type object
    at Hash.update (internal/crypto/hash.js:58:11)
    at Object.hashIdAttr (~/my-amazing-project/node_modules/bull-arena/src/server/views/helpers/handlebars.js:44:40)
    at eval (eval at createFunctionContext (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:257:23), <anonymous>:8:78)
    at prog (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/runtime.js:221:12)
    at execIteration (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:51:19)
    at Object.<anonymous> (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:61:13)
    at Object.eval [as main] (eval at createFunctionContext (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:257:23), <anonymous>:86:31)
    at main (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/runtime.js:175:32)
    at ret (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/runtime.js:178:12)
    at ret (~/my-amazing-project/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:526:21)
    at ExpressHandlebars._renderTemplate (~/my-amazing-project/node_modules/express-handlebars/lib/express-handlebars.js:250:12)
    at ExpressHandlebars.<anonymous> (~/my-amazing-project/node_modules/express-handlebars/lib/express-handlebars.js:173:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Does someone know how to fix this ?
It's really annoying and blocking because I can't restart failed jobs through UI

@ttacon
Copy link
Contributor

ttacon commented Aug 30, 2019

Hi there! This looks like the hashIdAttr handlebars helper isn't super happy with what's being passed in, however, it's a bit interesting how it's being surfaced.

Can you provide the following information to help us debug:

  • Are you using Bull or Bee-queue?
  • Which version of the above?
  • Which version of Arena are you on?
  • Can you provide the structure of the job data that that jobs has (i.e. the key names and field types, please redact sensitive information as needed)?

Cheers - keen to get this resolved for you!

@delmotte
Copy link
Author

Hello,

I'am using bull ^3.10.0 and bull-arena ^2.6.3, the job data is simple, a single string field uid.
After investigation, when I retrieve failed jobs, I got some that are equals to null.
So, obviously, when browsing failed jobs through arena, it crashes.

@amrendra007
Copy link

same issue with me also , While accessing, queue active or failed , i was getting something went wrong as response from arena with this error

@richardbiddle
Copy link

same issue here. bull "3.11.0" "bull-arena": "2.6.4"

@skeggse skeggse added the bug label Aug 5, 2020
@skeggse skeggse self-assigned this Aug 5, 2020
@skeggse
Copy link
Member

skeggse commented Aug 5, 2020

It seems like a data error to have id fields that are null, but it also seems reasonable to still have arena show that.

@skeggse skeggse added this to the 3.2.1 milestone Aug 5, 2020
@skeggse skeggse closed this as completed in 9415643 Aug 5, 2020
beequeueci pushed a commit that referenced this issue Aug 5, 2020
### [3.2.1](v3.2.0...v3.2.1) (2020-08-05)

### Bug Fixes

* **queue-view:** improve handling of falsy job.id values ([9415643](9415643)), closes [#181](#181)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants