[GH-ISSUE #1359] Error Popup at signin #6369

Closed
opened 2026-04-20 16:57:42 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @xeruf on GitHub (Aug 30, 2025).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1359

Originally assigned to: @Copilot on GitHub.

Description

In both 0.24.6 and on latest:
Error can't access property "backdropView", window.history.state is null

Vikunja Version

latest

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Please select

Screenshots

No response

Originally created by @xeruf on GitHub (Aug 30, 2025). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/1359 Originally assigned to: @Copilot on GitHub. ### Description In both 0.24.6 and on latest: Error can't access property "backdropView", window.history.state is null ### Vikunja Version latest ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Please select ### Screenshots _No response_
Author
Owner

@kolaente commented on GitHub (Aug 31, 2025):

Analysis:

Investigation

  • Search for backdropView in frontend code.
  • Found src/composables/useRouteWithModal.ts accesses window.history.state.backdropView without checking if window.history.state exists.
  • If a user navigates directly to a task or reloads the page, window.history.state is null. Attempting to access backdropView on null causes "Error can't access property 'backdropView', window.history.state is null".

Proposed fix

  • Guard the history state access with optional chaining:
    const backdropView = computed(() => route.fullPath ? window.history.state?.backdropView : undefined)
    
  • This returns undefined when no history.state is present, preventing the crash.
  • Ensure any code that relies on backdropView handles the undefined case gracefully.

Testing ideas

  • Load a task directly via its URL to confirm the app no longer throws an error.
  • Open a task from a project view (where backdropView exists) to ensure modal navigation still works.
<!-- gh-comment-id:3240314367 --> @kolaente commented on GitHub (Aug 31, 2025): Analysis: ### Investigation - Search for `backdropView` in frontend code. - Found `src/composables/useRouteWithModal.ts` accesses `window.history.state.backdropView` without checking if `window.history.state` exists. - If a user navigates directly to a task or reloads the page, `window.history.state` is `null`. Attempting to access `backdropView` on `null` causes "Error can't access property 'backdropView', window.history.state is null". ### Proposed fix - Guard the history state access with optional chaining: ```ts const backdropView = computed(() => route.fullPath ? window.history.state?.backdropView : undefined) ``` - This returns `undefined` when no `history.state` is present, preventing the crash. - Ensure any code that relies on `backdropView` handles the `undefined` case gracefully. ### Testing ideas - Load a task directly via its URL to confirm the app no longer throws an error. - Open a task from a project view (where `backdropView` exists) to ensure modal navigation still works.
Author
Owner

@kolaente commented on GitHub (Aug 31, 2025):

Fixed in https://github.com/go-vikunja/vikunja/pull/1368, please check with the next unstable build (should be ready for deployment in ~30min, also on try).

<!-- gh-comment-id:3240353906 --> @kolaente commented on GitHub (Aug 31, 2025): Fixed in https://github.com/go-vikunja/vikunja/pull/1368, please check with the next unstable build (should be ready for deployment in ~30min, also on [try](https://try.vikunja.io)).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#6369