Skip to content

Nuxt: Bun crash after call to server/api and refresh the same page #18493

@xenogew

Description

@xenogew

How can we reproduce the crash?

Development environments

OS: Windows 11
Editor: Trae AI
Terminal: Powershell Core
Bun: 1.2.6
Nuxt: 3.16.1

Steps to reproduce

  1. Run with --bun mode
  2. Click on a button which call to /api/[custom-endpoint]
  3. Endpoint is calling supabaseServerClient() to Authentication service
  4. Button event fired
  5. Nothing happen on server
  6. Refresh the same page
  7. Crashed here

Run without --bun

✅ Work fine

Depedencies

Details ``` "dependencies": { "@nuxtjs/supabase": "^1.5.0", "@nuxtjs/tailwindcss": "^6.13.2", "@supabase/supabase-js": "^2.49.1", "@tailwindcss/vite": "^4.0.15", "@vueuse/nuxt": "^13.0.0", "bcryptjs": "^3.0.2", "bullmq": "^5.44.3", "daisyui": "^5.0.9", "dotenv": "^16.4.7", "drizzle-orm": "^0.40.1", "jsonwebtoken": "^9.0.2", "lucide-vue-next": "^0.482.0", "nuxt": "^3.16.1", "pinia": "^3.0.1", "postgres": "^3.4.5", "tailwindcss": "^4.0.15", "ulid": "^2.4.0", "vue": "^3.5.13", "vue-router": "^4.5.0" }, "devDependencies": { "@fontsource-variable/noto-sans-jp": "^5.2.5", "@fontsource/m-plus-rounded-1c": "^5.2.5", "@nuxt/eslint-config": "^1.2.0", "@nuxt/test-utils": "^3.17.2", "@playwright/test": "^1.51.1", "@types/jsonwebtoken": "^9.0.9", "@types/node": "^22.13.11", "@typescript-eslint/eslint-plugin": "^8.27.0", "@typescript-eslint/parser": "^8.27.0", "@vue/test-utils": "^2.4.6", "drizzle-kit": "^0.30.5", "eslint": "^9.23.0", "eslint-config-prettier": "^10.1.1", "eslint-plugin-prettier": "^5.2.3", "eslint-plugin-vue": "^10.0.0", "globals": "^16.0.0", "happy-dom": "^17.4.4", "playwright-core": "^1.51.1", "prettier": "^3.5.3", "prettier-plugin-tailwindcss": "^0.6.11", "typescript": "^5.8.2", "typescript-eslint": "^8.27.0", "vitest": "^3.0.9" }, "peerDependencies": { "@tailwindcss/oxide-linux-x64-gnu": "^4.0.15" }, ```

Relevant log output

PS C:\workspace\wakarun-dictionary> bun --bun run dev
$ nuxt dev
Nuxt 3.16.1 with Nitro 2.11.7                                                                                                                          nuxi  11:13:17 PM
                                                                                                                                                             11:13:18 PM
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

  ➜ DevTools: press Shift + Alt + D in the browser (v2.3.1)                                                                                                  11:13:19 PM

✔ Vite client built in 63ms                                                                                                                                 11:13:20 PM
/*! 🌼 daisyUI 5.0.9 */                                                                                                                                      11:13:21 PM
✔ Vite server built in 1794ms                                                                                                                               11:13:22 PM
✔ Nuxt Nitro server built in 1244ms                                                                                                                   nitro 11:13:24 PM
ℹ Vite client warmed up in 6ms                                                                                                                              11:13:24 PM
ℹ Vite server warmed up in 5770ms                                                                                                                           11:13:30 PM
============================================================
Bun v1.2.6 (8ebd5d53) Windows x64
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "node" "C:\workspace\wakarun-dictionary\node_modules\@nuxt\cli\bin\nuxi.mjs" "dev"
Features: Bun.stderr(2) Bun.stdin(2) Bun.stdout(2) dotenv(2) fetch(63) http_server jsc spawn transpiler_cache(12) tsconfig(21) tsconfig_paths(10) process_dlopen(2)       
Builtins: "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:constants" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:process" "node:stream" "node:stream/promises" "node:tty" "node:url" "node:util" "node:vm" "node:v8" 
Elapsed: 73755ms | User: 500ms | Sys: 328ms
RSS: 0.29GB | Peak: 0.29GB | Commit: 0.37GB | Faults: 90332

panic(main thread): attempt to use null value
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.2.6/wn18ebd5d5uIuwk0gQs1vpf27lwrBsslwrB0q+1rBwio/pB0pt2rB6gqvtBqjsrtB6hprtB8no/HA0eNpLLClJzS0oUSjJVygtTlXIK83JUShLzClNBQB82AmI

error: script "dev" exited with code 134

Stack Trace (bun.report)

Bun v1.2.6 (8ebd5d5) on windows x86_64 [RunCommand]

panic: attempt to use null value

Features: transpiler_cache, tsconfig, Bun.stderr, Bun.stdin, Bun.stdout, fetch, http_server, jsc, spawn

Sentry Issue: BUN-EN5

Metadata

Metadata

Assignees

Labels

crashAn issue that could cause a crashruntimewindowsAn issue that is known to occur on Windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions