question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'replace' of null

See original GitHub issue

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>

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gabegorelickcommented, May 21, 2018

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.

1reaction
jpettitcommented, Aug 4, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'replace' of null jqgrid
You should test cellvalue != null before trying to parse the value. Testing for cellvalue != null means in JavaScript the same as...
Read more >
TypeError: Cannot read property 'replace' of Undefined in JS
The "Cannot read property 'replace' of undefined" error occurs when calling the replace() method on an undefined value. To solve the error, provide...
Read more >
TypeError: Cannot read property 'replace' of null - DataTables
Link to test case: - This error was caused by an HTML table that was not wide enough for the data + a...
Read more >
[SOLVED] Cannot Read Property 'replace' of Undefined in JS
To fix the “cannot read property 'replace' of undefined” error, perform an undefined check on the variable before calling the replace() method ......
Read more >
Uncaught TypeError: Cannot read property 'replace' of null #381
I had this issue when the variable I used was equal to null. Just added a check to perform .replace if not null,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found