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

Jobs not showing up using latest 6.7.1 with Nest.js #883

Open
pboutin opened this issue Jan 27, 2025 · 10 comments
Open

Jobs not showing up using latest 6.7.1 with Nest.js #883

pboutin opened this issue Jan 27, 2025 · 10 comments

Comments

@pboutin
Copy link

pboutin commented Jan 27, 2025

After updating our app with Nest.js v11 and the latest version of bull-board, the jobs don't show up anymore. We only see the counts.

Our versions

"@bull-board/api": "^6.7.1",
"@bull-board/express": "^6.7.1",
"@bull-board/nestjs": "^6.7.1",

Checking the network tab for the API response shows jobs: [].

Screenshot of the board

Image
@felixmosh
Copy link
Owner

Probably related to something that changed in that major version...
The missing part is the query param of queue name, can you debug it?

@Chelovekk
Copy link

Chelovekk commented Jan 27, 2025

Yeah somewhere inside express adapter query are lost (present in middlewares added right before router). Maybe its related to updates of express req.query.

Image

https://expressjs.com/en/guide/migrating-5.html#req.query

@pboutin
Copy link
Author

pboutin commented Jan 27, 2025

Enabling the extended query parser doesn't resolve the issue.

https://docs.nestjs.com/migration-guide#query-parameters-parsing

EDIT:
In an express middleware, I can log the query params and the activeQueue is there.

  app.use((request: Request, response: Response, next: NextFunction) => {
    console.log(request.path, request.query);
    ...

Logs:

/queues/api/queues {
  activeQueue: 'synchronize_activity',
  status: 'completed',
  page: '1',
  jobsPerPage: '10'
}

@fstn
Copy link

fstn commented Jan 28, 2025

It was working yesterday, I just update my dependencies and I have now the same issue, jobs not showing.
Nothing changed in the code execept that

@fullstackjedi
Copy link

Yeah I have same issue as well, most likely related to nestjs 11 uses express 5

@felixmosh
Copy link
Owner

Someone can create a small repo that replicates this issue?

@jsfrocha
Copy link

jsfrocha commented Feb 9, 2025

@pboutin I know this may sound strange, believe me, I spent hours trying to debug this. I set up a minimal repo and the issue was not there. I'm using Nest Workspaces so I thought it was something related to that.

The only difference between my repo and the minimal repo was the package manager - NPM on the minimal and Yarn on the bugged one.

From what I could see (by adding logs on @bull-board/express), the bugged repo was still using Express v4 on ExpressAdapter - when I replaced Yarn for NPM, it started using the correct Express version and the issue was fixed.

Also, make sure to add "express": "^5.0.1", to the dependencies of the project directly.

@felixmosh
Copy link
Owner

@jsfrocha we do have express 5 as an optional dep

@dmitriy-kudelko
Copy link

Also, make sure to add "express": "^5.0.1", to the dependencies of the project directly.

This doesn't seem to help as "express": "^4.21.1 || ^5.0.0" specified in the bull board's package.json resolves to 4.21.1:

> npm ls express 

├─┬ @bull-board/[email protected]
│ └── [email protected]
├─┬ @nestjs/[email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
  └── [email protected] deduped

The only thing which helps so far is overriding the express version in the resolutions field of package.json (we're using pnpm). I assume the same should work for yarn with the overrides field.

@pboutin
Copy link
Author

pboutin commented Feb 10, 2025

Explicitly installing express v5 fixes my issue 👍

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

7 participants