bee-queue / arena

An interactive UI dashboard for Bee, Bull and BullMQ packages
MIT License
860 stars 234 forks source link

TypeError: Cannot read property 'replace' of null #95

Open gabegorelick opened 6 years ago

gabegorelick commented 6 years ago

I'm getting the following error a lot when trying to access pages in the web UI:

TypeError: Cannot read property 'replace' of null
    at Object.encodeIdAttr (/node_modules/bull-arena/src/server/views/helpers/handlebars.js:43:15)
    at eval (eval at createFunctionContext (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:8:82)
    at prog (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:221:12)
    at execIteration (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:51:19)
    at Object.<anonymous> (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:61:13)
    at Object.eval [as main] (eval at createFunctionContext (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:78:31)
    at main (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:175:32)
    at ret (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:178:12)
    at ret (/node_modules/bull-arena/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:526:21)
    at ExpressHandlebars._renderTemplate (/node_modules/express-handlebars/lib/express-handlebars.js:247:12)
    at ExpressHandlebars.<anonymous> (/node_modules/express-handlebars/lib/express-handlebars.js:173:21)
    at <anonymous>
ttacon commented 6 years ago

Thanks for the report! Which pages is this occurring for you on? Are you running this for bull or bee-queue? What does your config look like? Excited to get to the bottom of this!

gabegorelick commented 6 years ago

Happens on pretty much all pages, but randomly. I’m using bull.

On Sun, May 13, 2018 at 1:25 PM Trey Tacon notifications@github.com wrote:

Thanks for the report! Which pages is this occurring for you on? Are you running this for bull or bee-queue? What does your config look like? Excited to get to the bottom of this!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bee-queue/arena/issues/95#issuecomment-388646168, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlPUSaNEqFgjxz0_h35hZGR7rUGuIV6ks5tyHqEgaJpZM4T79A6 .

ttacon commented 6 years ago

Ah, we're using bee-queue primarily which could explain why I've never seen this. Could you attach an image of a console shot as well as how you're running arena (container vs full app)? Thanks!

gabegorelick commented 6 years ago

Could you attach an image of a console shot

It just has the same stacktrace I posted above. No other logs.

how you're running arena (container vs full app)

We're not running inside a container. Just mounting it with express:

const http = require('http');
const express = require('express');
const arena = require('bull-arena');

const arenaConfig = {
  queues: ...
};
const app = express().use(arena(arenaConfig, {disableListen: true}));

http
    .createServer(app)
    .listen(9000);

We're also seeing some weird jobs in Bull. It may be that Arena doesn't like that. I can provide more detail once I can figure out what's going on in Bull.

marano commented 6 years ago

I am seeing this issue specifically on the completed jobs page. I am using Bull. Also I it started to happen after I had jobs with somewhat big return values.

jpettit commented 4 years ago

Any update on this? Hitting this with Bull. Similar callstack:

TypeError: Data must be a string or a buffer
    at Hash.update (crypto.js:99:16)
    at Object.hashIdAttr (/opt/arena/src/server/views/helpers/handlebars.js:44:40)
    at eval (eval at createFunctionContext (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:257:23), <anonymous>:8:78)
    at prog (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:221:12)
    at execIteration (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:51:19)
    at Object.<anonymous> (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:61:13)
    at Object.eval [as main] (eval at createFunctionContext (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:257:23), <anonymous>:86:31)
    at main (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:175:32)
    at ret (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/runtime.js:178:12)
    at ret (/opt/arena/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:526:21)
    at ExpressHandlebars._renderTemplate (/opt/arena/node_modules/express-handlebars/lib/express-handlebars.js:247:12)
    at ExpressHandlebars.<anonymous> (/opt/arena/node_modules/express-handlebars/lib/express-handlebars.js:173:21)
    at <anonymous>
skeggse commented 4 years ago

@jpettit that looks more like #148 - does that sound right?

jpettit commented 4 years ago

@skeggse Are you asking me if I remember something from 7m ago? 🤣

IIRC I looked at the code then and there was something fishy going on related to this issue. You'll see I posted Jan 30th, 2020, and #148 was posted Feb 1, 2019. The issue is the same as #148 certainly, but might have been caused by this issue. I don't know.

But, when we're talking a turnaround time of nearly two years to triage bugs, your guess is as good as mine.

skeggse commented 4 years ago

But, when we're talking a turnaround time of nearly two years to triage bugs, your guess is as good as mine.

Yeah, we don't really have this project resourced :(