inrupt / generator-solid-react

Generator for Solid React applications
https://generator.inrupt.com
MIT License
43 stars 15 forks source link

notifications infinite loading without useful feedback to the user #258

Closed michielbdejong closed 4 years ago

michielbdejong commented 4 years ago

https://www.dropbox.com/s/2uqjs1o5pnz6zvr/generator-infinite-loading-notifications.mp4?dl=0

james-martin-jd commented 4 years ago

This was actually fixed in a recent push to develop branch. The core issue was a mixup in the components library when creating new notifications, it was causing the prefix for the "current document" prefix look something like @prefix :: <https://example.com/whatever> and the double-colon was causing parsing issues.

I should also note that if you were using develop during the time period that the bug existed, you will need to manually edit or delete the malformed notifications. We cannot properly catch the errors loading the files due to an ldflex feature coming soon, it is not properly bubbling errors up so we cannot catch the error.

michielbdejong commented 4 years ago

Ah great, then I will wait for the release and retry! :)

Regarding catching errors loading the files, that sounds serious. What is the issue number for that? And what is the LDFlex issue number it's blocked on?

james-martin-jd commented 4 years ago

The fix is on develop now for notifications if you want to try again (and I can close this issue if it's working).

We don't have a specific issue here yet, but it's something we're tracking internally. The ldflex issue(s) are: https://github.com/solid/query-ldflex/issues/30 and https://github.com/solid/query-ldflex/issues/23

Essentially what this means is even if the code is in a try/catch block, if there's an error in an ldflex query, it just halts the javascript, instead of getting caught. That's why there's an infinite loop, the fetch failed and can't be properly caught.

james-martin-jd commented 4 years ago

On develop, we just pushed a change that will use ShEx validation on incoming notifications, and ignore any notification that does not successfully validate with the core notification shape found here: https://shexshapes.inrupt.net/public/notifications/core-notification.shex

This should further help to prevent bad or invalid notifications from corrupting the page or notification load, but also means older, nonconformant notifications will not show in the UI.

james-martin-jd commented 4 years ago

This is on develop now, and never made it to master, so I am closing the issue.