Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client side application errors #1088

Open
lhilarides opened this issue Mar 25, 2024 · 4 comments
Open

Client side application errors #1088

lhilarides opened this issue Mar 25, 2024 · 4 comments
Labels
QC Quality check (client revision)

Comments

@lhilarides
Copy link
Collaborator

Every now and then the app crashes. This happens especially after using the app for a while. The error is typically:

"Application error: a client-side exception has occurred (see the browser console for more information)."

According to Google Analytics, 0.16% of our page views result in an application error like this. It's not terrible, but also not good: if we assume 10 page views per visit then 1 in every 60 visits has a crash.

I've managed to capture one of those crashes on the console, and the error relates to the undefined variable:

mng_mjr_undefined , which seems to point to a situation where the year of the mangrove extent is not defined and also there's no default or fallback year

A quick search in the repo for "mng_mjr" points to this file

src/containers/datasets/habitat-extent/hooks.tsx

For reference, the full error message:

Error: Source layer "mng_mjr_undefined" does not exist on source "habitat_extent" as specified by style layer "mangrove_habitat_extent_undefined_line"
NextJS 31
_validateLayer
addLayer
addLayer
createLayer
components_layer
Xh
x
Vk
Hk
Hk
J
R
60053
webpack_require
63840
webpack_require
64448
webpack_require
73935
webpack_require
20745
webpack_require
91078
webpack_require
56003
webpack_require

O

c

_app-5c4e15791eae0edf.js:14:68891
NextJS 36

@mluena
Copy link
Collaborator

mluena commented Apr 24, 2024

I've made a fix, please let me know if the issue still occurs

@mluena mluena added the QC Quality check (client revision) label Apr 25, 2024
@klongleywood
Copy link
Collaborator

@mluena and fyi @lhilarides I had this happen repeatedly when trying to upload a custom area shapefile

@lhilarides
Copy link
Collaborator Author

I just tested this and was able to reproduce the exact same error:

Error: Source layer "mng_mjr_undefined" does not exist on source "habitat_extent" as specified by style layer "mangrove_habitat_extent_undefined_line"
    NextJS 12
        _validateLayer
        addLayer
        addLayer
        tF
        tz
        ab
        i
        oO
        oS
        oS
        x
        T
www.globalmangrovewatch.org:12714:25

However, since there's been a complete refactoring of the code anyway in staging, I suggest that maybe we close this one and focus our efforts on fixing the last remaining issues there

@mluena
Copy link
Collaborator

mluena commented May 24, 2024

I am deploying a fix for production environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QC Quality check (client revision)
Projects
None yet
Development

No branches or pull requests

3 participants