nuxt / nuxt/devtools

fix: Enabling timeline shows error: useAuth is not a function

Open
#662 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.3k
Forks
214
Avg merge
13h 22m
Merged PRs (30d)
18

Description

🐛 The bug

If I enable the timeline then I get this error:

500 useAuth is not a function

at useAppInit (./composables/useAppInit.ts:8:3)
at setup (./app.js:31:5)
at _sfc_main.setup (./app.js:63:23)
at callWithErrorHandling (./node_modules/.pnpm/@vueruntime-core@3.4.21/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:195:19)
at setupStatefulComponent (./node_modules/.pnpm/@vue+runtime-core@3.4.21/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7554:25)
at setupComponent (./node_modules/.pnpm/@vue+runtime-core@3.4.21/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7515:36)
at renderComponentVNode (./node_modules/.pnpm/@vue+server-renderer@3.4.21_vue@3.4.21/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:623:15)
at Module.ssrRenderComponent (./node_modules/.pnpm/@vue+server-renderer@3.4.21_vue@3.4.21/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:84:10)
at default (./node_modules/.pnpm/nuxt@3.11.2_@opentelemetry+api@1.8.0_@unocss+reset@0.59.4_floating-vue@5.2.2_unocss@0.59.4_vite@5.2.11/node_modules/nuxt/dist/app/components/nuxt-root.js:86:37)

If I disable the timeline then everything works.

🛠️ To reproduce

https://stackblitz.com/github/martinszeltins/nuxt-error-repro?file=app.vue

🌈 Expected behavior

Either it should always show the error or never show the error. And it is not clear what the error is about or what is the cause.

ℹ️ Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the linked StackBlitz reproduction with the timeline enabled and disabled, then inspect composables/useAppInit.ts at line 8 and the setup calls in app.js at lines 31 and 63. The work is done when the timeline behaves consistently without the reported “useAuth is not a function” error.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.