okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
328 stars 43 forks source link

Lazy loaded modals (and probably other components) won't reload after error #1022

Open taoeffect opened 3 years ago

taoeffect commented 3 years ago

Problem

While testing grunt dev --tunnel (see #1020), I ran into an error 500 when trying to bring up the user settings modal on my phone:

b

I think (am not positive, because I haven't been able to reproduce the 500 error yet), that we do not support fixing this without have to manually refresh. I.e. I think once a modal gets this error, that's it, you have to refresh to be able to see it.

Solution

Each time you attempt to view a modal it should try to load it again if there was a problem loading it before, without having to refresh.

taoeffect commented 3 years ago

So... in the console we see something like this:

GEThttps://568842d9f739.ngrok.io/assets/js/SignupModal-f09d4253.js
[HTTP/2 429 No Reason Phrase 93ms]

[Vue warn]: Failed to resolve async component: () => ({
          component,
          loading,
          error
        })
Reason: Error: https://568842d9f739.ngrok.io/assets/js/SignupModal-f09d4253.js,  (SystemJS https://git.io/JvFET#3) vue.esm.js:628:14
Loading failed for the <script> with source “https://568842d9f739.ngrok.io/assets/js/SignupModal-f09d4253.js”.

Which includes a URL to here. Maybe that couuld be helpful in resolving this.