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

The app randomly gets stuck on the login page. #19484

Closed
VolodLytvynenko opened this issue Apr 3, 2024 · 21 comments
Closed

The app randomly gets stuck on the login page. #19484

VolodLytvynenko opened this issue Apr 3, 2024 · 21 comments
Assignees
Milestone

Comments

@VolodLytvynenko
Copy link
Contributor

The current issue occurs very rarely, and there are no exact steps on how to reproduce it. I hope the logs might help

Steps:

  1. Go to log in page
  2. Attempt to log in using valid password

Actual result:

The app randomly gets stuck on the login page.

android.mp4

Expected result:

The user is login

Logs:

logs (1).txt

@ibrkhalil
Copy link
Contributor

Might be a relevant line

type=1400 audit(0.0:5140): avc:  denied  { bind } for  scontext=u:r:untrusted_app:s0:c62,c259,c512,c768 tcontext=u:r:untrusted_app:s0:c62,c259,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=im.status.ethereum.pr

@ibrkhalil
Copy link
Contributor

ibrkhalil commented Apr 7, 2024

type=1400 errors turned out to be SELinux related, Investigating

@ibrkhalil
Copy link
Contributor

An issue with SELinux with targetSdkVersions higher than 29?
CC: @siddarthkay

@ibrkhalil ibrkhalil self-assigned this Apr 7, 2024
@ibrkhalil
Copy link
Contributor

The current issue occurs very rarely, and there are no exact steps on how to reproduce it. I hope the logs might help

Steps:

  1. Go to log in page
  2. Attempt to log in using valid password

Actual result:

The app randomly gets stuck on the login page.

android.mp4

Expected result:

The user is login

Logs:

logs (1).txt

May I have some more information about the device tested?

Like Model, Android version and if it was rooted or not

@VolodLytvynenko
Copy link
Contributor Author

The current issue occurs very rarely, and there are no exact steps on how to reproduce it. I hope the logs might help

Steps:

  1. Go to log in page
  2. Attempt to log in using valid password

Actual result:

The app randomly gets stuck on the login page.
android.mp4

Expected result:

The user is login

Logs:

logs (1).txt

May I have some more information about the device tested?

Like Model, Android version and if it was rooted or not

Hey @ibrkhalil
This issue is reproducible for me on the following models:

  • Pixel 7a, Android 13
  • iPhone 11 Pro max, IOS 17

Additionally, it is reproducible on different devices for the QA team

@ibrkhalil
Copy link
Contributor

The current issue occurs very rarely, and there are no exact steps on how to reproduce it. I hope the logs might help

Steps:

  1. Go to log in page
  2. Attempt to log in using valid password

Actual result:

The app randomly gets stuck on the login page.
android.mp4

Expected result:

The user is login

Logs:

logs (1).txt

May I have some more information about the device tested?
Like Model, Android version and if it was rooted or not

Hey @ibrkhalil This issue is reproducible for me on the following models:

  • Pixel 7a, Android 13
  • iPhone 11 Pro max, IOS 17

Additionally, it is reproducible on different devices for the QA team

Logs would be really helpful if possible for these devices.

@ibrkhalil
Copy link
Contributor

An issue with SELinux with targetSdkVersions higher than 29? CC: @siddarthkay

As @VolodLytvynenko said that the issue happens on iOS then it's highly unlikely to be a SELinux error.

@seanstrom
Copy link
Member

What do we think about adding a timeout to the login screen? That way if the login native function fails for any reason we'll have a way to unfreeze the screen (and maybe show an error). Thoughts?

@siddarthkay
Copy link
Contributor

@VolodLytvynenko : These logs don't have any debug messages.
Next time you reproduce it could you please ensure your device has set log level to "DEBUG".

You can find this in profile > settings > advanced > log level

Screenshot 2024-04-10 at 8 37 46 PM

@siddarthkay
Copy link
Contributor

Hi @seanstrom @ibrkhalil @VolodLytvynenko : To me it looks like the media server was also not running when the attempt to login was made. Hence we do not see the account's profile picture.
Seems to be that after adding a few accounts an old account may enter a zombie like state.
We'll have to try to reproduce locally to find out why that happens..

@seanstrom
Copy link
Member

Yeah I agree, we should try debugging what happens on the login screen. I can try seeing what happens if i disable the media server before logging in, that might help confirm what’s happening.

I also tried debugging what happens if the native module function would fail, and it seems that would also freeze the login screen. I think this can happen because when we login we send a request to login, wait for a separate event to be received, and then login the app. If that separate event is never received then we’ll be stuck at the login screen I think.

@siddarthkay
Copy link
Contributor

if i disable the media server before logging in

Ah we need not do that actually. Media server not running could be the symptom that might need fixing and might indicate something that broke right before that stage. If we fix that we may fix this issue.
But yeah its hard to say at this point without a successful reproduction locally.

it seems that would also freeze the login screen. I think this can happen because when we login we send a request to login, wait for a separate event to be received, and then login the app. If that separate event is never received then we’ll be stuck at the login screen

This part of login could definitely be made more robust like you said.

Regarding the root cause, we could decorate the logout part which starts a media server in status-go with more logs to see if it malfunctions -> https://github.com/status-im/status-go/blob/e2a4a2289618910a062b8d51105acb58449180bc/api/geth_backend.go#L2202-L2239

@ibrkhalil ibrkhalil removed their assignment Apr 11, 2024
@qfrank
Copy link
Contributor

qfrank commented Apr 11, 2024

my guess, might be relate to this waku-org/go-waku#1085 , if logout stuck, login will stuck

@VolodLytvynenko
Copy link
Contributor Author

hey. @ibrkhalil @siddarthkay apologies for initially providing only 'info' level logs. Although this issue doesn't occur frequently, I just encountered it again with 'debug' log level. hope these logs might help to catch what going on

Device:

Pixel 7a, Android 14

Logs:

Status-debug-logs (7).zip

@qfrank
Copy link
Contributor

qfrank commented Apr 13, 2024

my previous guess seems proberbly right since i can't see "status node stopped" in geth.log for the second logging out🤪.

@seanstrom
Copy link
Member

Nice! 🙌
Just curious, is it possible to send a restart command to status-go if we’re in a deadlock situation? Or are we forced to quit the app because of the deadlock?

@qfrank
Copy link
Contributor

qfrank commented Apr 13, 2024

is it possible to send a restart command to status-go if we’re in a deadlock situation

it's possible to send a restart command, however, the deadlock will still be there.

I think we can improve the usage of lock in status-go side, e.g. add timeout for holding a lock and report possible deadlock? cc @cammellos

@cammellos
Copy link
Contributor

@qfrank was this fixed by your two commits?

@qfrank
Copy link
Contributor

qfrank commented Apr 30, 2024

I think so, but not sure if @VolodLytvynenko still faced this issue after these 2 commits. @cammellos

@qfrank was this fixed by your two commits?

@qfrank
Copy link
Contributor

qfrank commented Apr 30, 2024

I left the opportunity to @VolodLytvynenko to close this issue. 🙂

@VolodLytvynenko
Copy link
Contributor Author

I left the opportunity to @VolodLytvynenko to close this issue. 🙂

@cammellos @qfrank I haven't encountered this issue anymore. I will reopen it if it still reproduces. For now, let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants