felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.24k stars 354 forks source link

White page with loading text #435

Closed FlorimJeque closed 2 years ago

FlorimJeque commented 2 years ago

Hello, I'm having a problem with loading the bull-board UI. My screen just goes white and only the loading message appears. On my console I have 404 errors. Can i please have some help on this?

createBullBoard({
  queues: QueueService.queues.map((queue) => new BullAdapter(new Queue(queue.name, { redis: redisConfig }))),
  serverAdapter: serverAdapter,
});
serverAdapter.setBasePath('/queue');
app.use('/queues', serverAdapter.getRouter());

Screenshot-20220726125406-843x229 Screenshot-20220726125336-2051x942

felixmosh commented 2 years ago

Hi,

Looks like your ejs doesn't changes <%= basePath %> to its value. Can you make a small reproduction repo so I'll be able to poke around?

Can you elaborate regarding the setup? what version are you using? do you use expressAdapter or other framework?

FlorimJeque commented 2 years ago

Hi,

Looks like your ejs doesn't changes <%= basePath %> to its value. Can you make a small reproduction repo so I'll be able to poke around?

Can you elaborate regarding the setup? what version are you using? do you use expressAdapter or other framework?

"dependencies": { "@bull-board/express": "^4.0.1", "@sendgrid/mail": "^7.2.5", "aws-sdk": "^2.1070.0", "badwords-filter": "^1.3.0", "bcrypt": "^5.0.1", "bull": "^3.22.6", "cors": "^2.8.5", "dotenv": "^8.2.0", "ejs": "^3.1.5", "express": "^4.17.1", "express-useragent": "^1.0.15", "helmet": "^5.1.0", "http": "0.0.1-security", "ioredis": "^5.2.2", "jsonwebtoken": "^8.5.1", "mailgun-js": "^0.22.0", "moment": "^2.29.3", "mongoose": "^5.10.5", "morgan": "^1.10.0", "multer": "^1.4.2", "multer-s3": "^2.10.0", "npm-run-all": "^4.1.5", "read-excel-file": "^5.1.0", "redis": "^4.2.0", "socket.io": "^4.5.1", "string-similarity": "^4.0.4" }

import Queue from 'bull';
import { ExpressAdapter } from '@bull-board/express';
import { createBullBoard } from '@bull-board/api';
import { BullAdapter } from '@bull-board/api/bullAdapter';

const serverAdapter = new ExpressAdapter();
const app = express();

createBullBoard({
  queues: QueueService.queues.map((queue) => new BullAdapter(new Queue(queue.name, { redis: redisConfig }))),
  serverAdapter: serverAdapter,
});
serverAdapter.setBasePath('/queue');
app.use('/queue', serverAdapter.getRouter());
felixmosh commented 2 years ago

It looks kinda default setup... I see that you have ejs in your package.json file, maybe there is some deps confusion, can you remove the node_modules folder and re-install again?

FlorimJeque commented 2 years ago

Nothing...

felixmosh commented 2 years ago

Weird, I need to debug the issue. Looks like it doesn't renders the ejs file...

FlorimJeque commented 2 years ago

I tried to remove cors,helmet every middleware that will probably block the request, but i got the same result.

FlorimJeque commented 2 years ago

Weird, I need to debug the issue. Looks like it doesn't renders the ejs file...

Ok. Waiting for your feedback

felixmosh commented 2 years ago

Can you provide a reproduction repository?

FlorimJeque commented 2 years ago

I can only paste a few files. It will probably take some time to create a reproduction repo.

felixmosh commented 2 years ago

Can you share a screen share? do you want Let's talk on discord, there, you will be able to share the screen.... Is it ok? My discord handle is felixmosh

FlorimJeque commented 2 years ago

Can you share a screen share? do you want Let's talk on discord, there, you will be able to share the screen.... Is it ok? My discord handle is felixmosh

yes...sure iwill contact you soon

FlorimJeque commented 2 years ago

Can you share a screen share? do you want Let's talk on discord, there, you will be able to share the screen.... Is it ok? My discord handle is felixmosh

can't find you on discord.

felixmosh commented 2 years ago

try felixmosh#0178

FlorimJeque commented 2 years ago

Solved after removing the change of ejs delimiter. If you are using ejs, makesure don't change ejs delimiter globally. Thanks Felix

EarthlingDavey commented 2 years ago

Incase anyone else hits this, but the above soultion isn't for them.

I had the same issue - caused by version mis-match of @bull-board packages.

jRexhmati commented 2 years ago

Hello, I have sort of the same problem In my case looks like ejs is converting correctly

Screenshot 2022-08-14 at 11 20 40 AM

But I get a strange response from the file request itself

Screenshot 2022-08-14 at 11 22 41 AM

package.json

Screenshot 2022-08-14 at 11 23 48 AM

Spinning up bull-board

Screenshot 2022-08-14 at 11 24 28 AM
felixmosh commented 2 years ago

Hi, @jRexhmati can you check the value of href of the <base> tag?

jRexhmati commented 2 years ago

@felixmosh Thanks for the flash response Here is the formatted source code

Screenshot 2022-08-14 at 11 33 54 AM
felixmosh commented 2 years ago

This looks OK, the issue is that your server doesn't serves static files. Do you get any error on the client / server?

I can guess that this is related to the usage of koa-router but you are using @koa/router...

jRexhmati commented 2 years ago

@felixmosh The problem was not static serving, but a stupid middleware which was converting everything into json Thanks for your immediate help