nextcloud / forms

📝 Simple form & survey app for Nextcloud
https://apps.nextcloud.com/apps/forms
GNU Affero General Public License v3.0
324 stars 98 forks source link

TypeError: this.allSharedForms.filter is not a function #2075

Closed teach404 closed 7 months ago

teach404 commented 7 months ago

Describe the bug

Opening the forms stab results in endless reload without loading the forms. This appears only to certain users so probably some forms are in the right "state".

I cant reproduce which shared form results to the error.

Console shows:

To Reproduce Steps to reproduce the behavior:

  1. Just open forms tab on the topbar

Expected behavior Forms app should load

Screenshots

Snag_379dab

Nextcloud (please complete the following information):

Desktop (please complete the following information):

Browser log

TypeError: this.allSharedForms is not iterable
    at s.archivedForms (forms-main.mjs?v=b026c9ab-18:8:168364)
    at e.get (vendor-DFuGXkIP.mjs:2:26754)
    at e.evaluate (vendor-DFuGXkIP.mjs:2:27754)
    at s.archivedForms (vendor-DFuGXkIP.mjs:2:41400)
    at s.Ll (forms-main.mjs?v=b026c9ab-18:8:174975)
    at Ga.e._render (vendor-DFuGXkIP.mjs:2:20940)
    at s.r (vendor-DFuGXkIP.mjs:2:30559)
    at e.get (vendor-DFuGXkIP.mjs:2:26754)
    at e.run (vendor-DFuGXkIP.mjs:2:27491)
    at ws (vendor-DFuGXkIP.mjs:2:32762)

ypeError: this.allSharedForms.filter is not a function
    at s.sharedForms (forms-main.mjs?v=b026c9ab-18:8:168281)
    at e.get (vendor-DFuGXkIP.mjs:2:26754)
    at e.evaluate (vendor-DFuGXkIP.mjs:2:27754)
    at s.sharedForms (vendor-DFuGXkIP.mjs:2:41400)
    at fn (forms-main.mjs?v=b026c9ab-18:8:172131)
    at o (vendor-DFuGXkIP.mjs:2:18761)
    at s.Ia [as _t] (vendor-DFuGXkIP.mjs:2:15994)
    at s.sr (forms-main.mjs?v=b026c9ab-18:8:81270)
    at Ga.e._render (vendor-DFuGXkIP.mjs:2:20940)
    at s.r (vendor-DFuGXkIP.mjs:2:30559)
Chartman123 commented 7 months ago

Also confirmed on other instances, currently with 4.2.1, but as you pointed out still valid with 4.2.2

Chartman123 commented 7 months ago

@teach404 Could you try to find out what's the difference between users that can load and see the forms list and those who can't?

In particular, see what the "shared_forms" request gets as answer from the server. Loading itself should work as there would be another error if getting the shared_forms from the server would failed

teach404 commented 7 months ago

Your fix works so i didnt looked deeper into it (regarding your questions)