techmatters / terraso-mobile-client

A React Native project for Terraso’s LandPKS mobile application.
https://landpks.terraso.org
GNU Affero General Public License v3.0
2 stars 1 forks source link

"Error saving soil ID information" message on login for some users #1657

Open knipec opened 5 months ago

knipec commented 5 months ago

Repro

I'm not sure how to reliably repro except with my personal gmail account so may not be reproducible by others 🤷

  1. Log in as carissaknipe@gmail.com (I realize others cannot do this, not sure what accounts cause the repro) Expected: No error message as the home screen loads Actual: "Error saving soil ID information" message appears at the bottom of the screen

Notes

Miscellaneous

Screenshot 2024-06-27 at 6 27 02 PM
knipec commented 5 months ago

Triage notes:

DerekCaelin commented 4 months ago

@knipec @tm-ruxandra I can't reproduce this on my phone (logging in to an account with no sites or projects). Can you try to reproduce? I haven't heard of this happening for a while so I'm tempted to close the issue.

knipec commented 4 months ago

I'm still seeing this on my iOS and Android emulator (though not seeing it on the physical devices). I wonder if this is something about what sites exist for a given account -- because with my carissaknipe@gmail.com account, I see no sites in the app, but the mobile-client console logs this (which I also had noted in slack and is likely due to bad data in the database):

WARN Failed to parse Terraso API error response get() returned more than one Site -- it returned 2! [TypeError: messages.map is not a function (it is undefined)] LOG Failed to parse Terraso API error response

And I don't see those log messages with carissa@techmatters.org, which does not repro this issue.

Also, the backend console logs nothing out of the ordinary:

web-1 | 2024-07-22T17:26:16.629935Z [info ] request_started [django_structlog.middlewares.request] request=POST /auth/token-exchange user_agent=okhttp/4.9.2 web-1 | 2024-07-22T17:26:18.438059Z [info ] request_finished [django_structlog.middlewares.request] code=200 request=POST /auth/token-exchange web-1 | 2024-07-22T17:26:18.632993Z [info ] request_started [django_structlog.middlewares.request] request=POST /graphql/ user_agent=okhttp/4.9.2 web-1 | 2024-07-22T17:26:18.645285Z [info ] request_finished [django_structlog.middlewares.request] code=200 request=POST /graphql/ web-1 | 2024-07-22T17:26:19.076511Z [info ] request_started [django_structlog.middlewares.request] request=POST /graphql/ user_agent=okhttp/4.9.2 web-1 | 2024-07-22T17:26:19.124444Z [info ] request_finished [django_structlog.middlewares.request] code=200 request=POST /graphql/

Potential next steps:

tm-ruxandra commented 4 months ago

Confirming that I also see this in developer mode / the Android emulator.

knipec commented 3 months ago

I also logged in with a user that had sites/projects, and saw the "no sites" and "no projects". I don't think I saw the "Error saving soil ID information" message though. I'm not 100% sure, but it may have been my carissa@techmatters.org account. Closing and re-opening the app resolved the issue.