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

INVALID_TOKEN #22039

Closed
slavakurilyak opened this issue Apr 1, 2024 · 6 comments
Closed

INVALID_TOKEN #22039

slavakurilyak opened this issue Apr 1, 2024 · 6 comments

Comments

@slavakurilyak
Copy link

Describe the Bug

Running

bunx directus start

gives

[12:44:37.083] WARN: Spatialite isn't installed. Geometry type support will be limited.
[12:44:37.207] INFO: Server started at http://0.0.0.0:8055
[12:44:40] GET / 302 101ms
[12:44:40] GET /admin 304 4ms
[12:44:41] GET /extensions/sources/index.js 403 14ms
[12:44:42] POST /auth/refresh 403 28ms
[12:44:41.750] DEBUG: Invalid token.
    err: {
      "type": "",
      "message": "Invalid token.",
      "stack":
          DirectusError: Invalid token.
              at verifyJWT (file:///Users/slava/dev/test-bun/node_modules/@directus/api/dist/utils/jwt.js:15:19)
              at verifyAccessJWT (file:///Users/slava/dev/test-bun/node_modules/@directus/api/dist/utils/jwt.js:24:21)
              at getAccountabilityForToken (file:///Users/slava/dev/test-bun/node_modules/@directus/api/dist/utils/get-accountability-for-token.js:18:29)
              at handler (file:///Users/slava/dev/test-bun/node_modules/@directus/api/dist/middleware/authenticate.js:36:32)
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      "name": "DirectusError",
      "code": "INVALID_TOKEN",
      "status": 403
    }
[12:44:42] GET /server/info 403 10ms
[12:44:42] GET /auth 403 3ms

To Reproduce

bun create directus-project@latest test-bun
cd test-bun
bunx directus start

Directus Version

v10.10.4

Hosting Strategy

Self-Hosted (Custom)

@br41nslug
Copy link
Member

Directus does not explicitly support Bun, make sure to use nodejs v18.
image

https://docs.directus.io/self-hosted/cli.html#command-line-interface

@br41nslug br41nslug closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
@br41nslug
Copy link
Member

Having said that, that error is likely just the browser trying to refresh the session while you're not yet logged in. That should not be an issue by itself.

@slavakurilyak
Copy link
Author

@br41nslug wen Bun?

@br41nslug
Copy link
Member

At some point when Bun is stable, production ready and feature complete with nodejs (or at least the things we depend on)

@slavakurilyak
Copy link
Author

Bun is stable and production-ready

Bun 1.0 become stable last year

@br41nslug
Copy link
Member

br41nslug commented Apr 1, 2024

They definitely claimed that indeed, but i meant stable and production ready in my opinion/tests, last time i checked it out (after that release) it was not stable enough to run large scale projects in production. Their speed came at trade-offs for stability.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants