tables icon indicating copy to clipboard operation
tables copied to clipboard

Infinite loading when visiting non-existent application

Open enjeck opened this issue 1 year ago • 1 comments

Steps to reproduce

1.Visit any app url for an application that does not exist e.g http://nextcloud.local/index.php/apps/tables/app/1000#/

Expected behavior

Proper 404 message or redirect to the homepage

Actual behavior

Infinite loading and errors in the console

Tables app version

No response

Browser

No response

Client operating system

No response

Operating system

No response

Web server

None

PHP engine version

None

Database

None

Additional info

vue.runtime.esm.js:3065 
TypeError: Cannot read properties of undefined (reading 'name')
    at VueComponent.routing (App.vue:73:1)
    at VueComponent.$route (App.vue:32:1)
    at invokeWithErrorHandling (vue.runtime.esm.js:3033:1)
    at Watcher.run (vue.runtime.esm.js:3550:1)
    at flushSchedulerQueue (vue.runtime.esm.js:4141:1)
    at Array.<anonymous> (vue.runtime.esm.js:3159:1)
    at flushCallbacks (vue.runtime.esm.js:3081:1)
vue.runtime.esm.js:4625 [Vue warn]: Error in mounted hook (Promise/async): "TypeError: Cannot read properties of undefined (reading 'iconName')"

found in

---> <Context> at src/pages/Context.vue
       <NcAppContent>
         <NcContent>
           <App> at src/App.vue
             <Root>
vue.runtime.esm.js:3065 
TypeError: Cannot read properties of undefined (reading 'iconName')
    at VueComponent.reload (Context.vue:92:1)
    at VueComponent.mounted (Context.vue:84:1)
    at invokeWithErrorHandling (vue.runtime.esm.js:3033:1)
    at callHook$1 (vue.runtime.esm.js:4048:1)
    at Object.insert (vue.runtime.esm.js:4443:1)
    at invokeInsertHook (vue.runtime.esm.js:6966:1)
    at VueComponent.patch [as __patch__] (vue.runtime.esm.js:7180:1)
    at Vue._update (vue.runtime.esm.js:3785:1)
    at VueComponent.updateComponent (vue.runtime.esm.js:3891:1)
    at Watcher.get (vue.runtime.esm.js:3462:1)
```

enjeck avatar Aug 16 '24 19:08 enjeck

Yes, we should show a proper error page to the user 👍

juliusknorr avatar Aug 19 '24 07:08 juliusknorr

I prefer that we simply redirect to the homepage and show an error toast saying the context/application was not found

enjeck avatar Aug 05 '25 04:08 enjeck

Another idea: We could do it like Deck — just show the table icon and a message like "Table/View not found." That way, it's consistent across at least two of NC apps. What do you think?

→ https://cloud.nextcloud.com/apps/deck/board/000

Image

silverkszlo avatar Aug 05 '25 14:08 silverkszlo

Another idea: We could do it like Deck — just show the table icon and a message like "Table/View not found." That way, it's consistent across at least two of NC apps. What do you think?

Sounds good!

enjeck avatar Aug 05 '25 18:08 enjeck