Skip to content

1296 infinite loading when visiting non existent application - #1985

Merged
silverkszlo merged 13 commits into
mainfrom
1296-infinite-loading-when-visiting-non-existent-application
Sep 3, 2025
Merged

1296 infinite loading when visiting non existent application#1985
silverkszlo merged 13 commits into
mainfrom
1296-infinite-loading-when-visiting-non-existent-application

Conversation

@silverkszlo

Copy link
Copy Markdown
Contributor

This PR improves error handling when navigating to non-existent tables, views, or contexts in the Tables app.

Previously, accessing a non-existent resource (e.g. /view/999 or /context/999) would result in an unhandled exception (TypeError: undefined) and show only a loading spinner. This was confusing to users and cluttered the console with errors.

Changes

  • Added proper error catching in Table.vue, View.vue, and Context.vue
  • Display a user-friendly error message and icon when a resource is not found (404)
  • Ensured layout is visually centered and styled consistently with other apps (e.g. Deck)
404_table

@silverkszlo silverkszlo linked an issue Aug 7, 2025 that may be closed by this pull request
@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch 2 times, most recently from 6a1d0f9 to b1d3ac7 Compare August 7, 2025 13:04

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The failing component tests CI can be ignored. But will need to sign the commit message. In case you don't know how, https://github.com/nextcloud/server/wiki/How-to-sign-your-commits-using-PGP

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from b1d3ac7 to 8fca814 Compare August 8, 2025 09:28
@silverkszlo

Copy link
Copy Markdown
Contributor Author

Thanks! The failing component tests CI can be ignored. But will need to sign the commit message. In case you don't know how, https://github.com/nextcloud/server/wiki/How-to-sign-your-commits-using-PGP

done, thank you!

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch 2 times, most recently from 4a34315 to d3537d7 Compare August 8, 2025 11:08
Comment thread src/pages/Context.vue Outdated
Comment thread src/pages/Context.vue Outdated
Comment thread src/pages/Context.vue
Comment thread src/pages/Context.vue
@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from d3537d7 to 8f65809 Compare August 11, 2025 12:51

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I tested and it mostly works. Only problem is the browser console errors after visiting non-existent resources.
For applicatiions:

TypeError: Cannot read properties of undefined (reading 'name')
    at VueComponent.routing (main.js:22:2)
    at VueComponent.$route (main.js:22:2)
    at invokeWithErrorHandling (vue.runtime.esm.js:3033:30)
    at Watcher2.run (vue.runtime.esm.js:3550:21)
    at flushSchedulerQueue (vue.runtime.esm.js:4141:17)
    at Array.<anonymous> (vue.runtime.esm.js:3159:20)
    at flushCallbacks (vue.runtime.esm.js:3081:17)
logError @ vue.runtime.esm.js:3065

For views:

TypeError: Cannot read properties of undefined (reading 'title')
    at VueComponent.routing (main.js:22:2)
    at VueComponent.created (main.js:22:2)

This happens because we're trying to set the page title as seen in https://github.com/nextcloud/tables/blob/main/src/App.vue#L99 and https://github.com/nextcloud/tables/blob/main/src/App.vue#L108 but these do not exist

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 0b35997 to de25806 Compare August 12, 2025 09:57
@silverkszlo

Copy link
Copy Markdown
Contributor Author

Thanks! I tested and it mostly works. Only problem is the browser console errors after visiting non-existent resources. For applicatiions:

TypeError: Cannot read properties of undefined (reading 'name')
    at VueComponent.routing (main.js:22:2)
    at VueComponent.$route (main.js:22:2)
    at invokeWithErrorHandling (vue.runtime.esm.js:3033:30)
    at Watcher2.run (vue.runtime.esm.js:3550:21)
    at flushSchedulerQueue (vue.runtime.esm.js:4141:17)
    at Array.<anonymous> (vue.runtime.esm.js:3159:20)
    at flushCallbacks (vue.runtime.esm.js:3081:17)
logError @ vue.runtime.esm.js:3065

For views:

TypeError: Cannot read properties of undefined (reading 'title')
    at VueComponent.routing (main.js:22:2)
    at VueComponent.created (main.js:22:2)

This happens because we're trying to set the page title as seen in https://github.com/nextcloud/tables/blob/main/src/App.vue#L99 and https://github.com/nextcloud/tables/blob/main/src/App.vue#L108 but these do not exist

Thanks for pointing out the code lines! I have added default titles for those missing ressources. Do you think that makes sense?

@silverkszlo silverkszlo self-assigned this Aug 12, 2025
Comment thread src/modules/main/partials/ErrorMessage.vue Outdated
@enjeck

enjeck commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

I have added default titles for those missing ressources. Do you think that makes sense?

I was thinking we would say something like "View/table/context not found". Since the title/name is a mandatory field and views/tables/contexts would always have them, if they exist. But I guess what you have is safer in case

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch 2 times, most recently from 40fd2b2 to 4f73190 Compare August 13, 2025 12:32
@enjeck
enjeck force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 4f73190 to c2104d5 Compare August 18, 2025 09:23

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was testing again and I noticed that when we're on the "error" page, the + buttons against "Tables" and "Applications" that let us create a new Table or Application do not work.
Issue might stem from https://github.com/nextcloud/tables/blob/main/src/modules/navigation/sections/Navigation.vue#L202, where we emit the events 🤔

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from c2104d5 to 8783786 Compare August 19, 2025 08:46
@silverkszlo

Copy link
Copy Markdown
Contributor Author

Was testing again and I noticed that when we're on the "error" page, the + buttons against "Tables" and "Applications" that let us create a new Table or Application do not work. Issue might stem from https://github.com/nextcloud/tables/blob/main/src/modules/navigation/sections/Navigation.vue#L202, where we emit the events 🤔

Okay I probably have fixed that by always rendering MainModals in Table and View for the Navigation to work correctly. What do you think?

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, the behavior for the non-exisitng application changed? I no longer see an "error page". It just redirects to the homepage. Is that intentional? 🤔

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from b9c4872 to 6b80807 Compare August 21, 2025 08:40
@enjeck

enjeck commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Hmm, the behavior for the non-exisitng application changed? I no longer see an "error page". It just redirects to the homepage. Is that intentional? 🤔

This still happens for me :|

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 8b97266 to 11b37c5 Compare August 28, 2025 08:54

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I'm on a table and I delete it, the previous behavior was to redirect to the homepage (which is good). Now, we are stuck on an infinite loading screen.
Views and Apps, however, work fine

@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 11b37c5 to 76cb20b Compare August 29, 2025 12:08

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I tested and now works. Just a few comments:

Comment thread src/pages/Table.vue
Comment thread src/pages/Context.vue
Comment thread src/shared/utils/displayError.js Outdated
@silverkszlo
silverkszlo force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 76cb20b to 1c438f6 Compare September 1, 2025 08:43

@enjeck enjeck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thx

Signed-off-by: Silver <s.szmajduch@posteo.de>
Signed-off-by: Silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
… btns

Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
@enjeck
enjeck force-pushed the 1296-infinite-loading-when-visiting-non-existent-application branch from 1c438f6 to e9d736a Compare September 3, 2025 06:30
@silverkszlo
silverkszlo merged commit 211f17d into main Sep 3, 2025
52 of 55 checks passed
@silverkszlo
silverkszlo deleted the 1296-infinite-loading-when-visiting-non-existent-application branch September 3, 2025 08:46
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

Successfully merging this pull request may close these issues.

Infinite loading when visiting non-existent application

2 participants