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

ANR when using custom tabs in OAuth flow #7845

Open
2 tasks done
LingEmberMaple opened this issue May 15, 2024 · 5 comments
Open
2 tasks done

ANR when using custom tabs in OAuth flow #7845

LingEmberMaple opened this issue May 15, 2024 · 5 comments
Labels
priority: low Low priority issues that can be addressed later status: help wanted Issues seeking help from the community type: bug Something is causing incorrect behavior or errors

Comments

@LingEmberMaple
Copy link

LingEmberMaple commented May 15, 2024

Checklist

  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.

App version

6.900

Where did you get the app from?

F-Droid

Android version

14

Device model

Redmi K40S

Steps to reproduce

  1. First open K-9 Mail
  2. Click “Start”
  3. Enter email and click “Next”
  4. Click “Next” or “Sign in”

Expected behavior

APP continue running

Actual behavior

ANR

Logs

15_05-23-41-18_676.zip
crash-com-fsck-k9-15_05-23-40-50_459.zip

@LingEmberMaple LingEmberMaple added type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation labels May 15, 2024
@LingEmberMaple LingEmberMaple changed the title The app did not respond when adding email configuration ANR when adding email configuration May 15, 2024
@LingEmberMaple LingEmberMaple changed the title ANR when adding email configuration ANR when adding email May 15, 2024
@LingEmberMaple
Copy link
Author

@LingEmberMaple
Copy link
Author

LingEmberMaple commented May 16, 2024

ANR when:

  1. First open K-9 Mail
  2. Click “Start”
  3. Click “Back”
  4. Repeat 2 and 3 several times

16_05-08-24-51_813.zip
crash-com-fsck-k9-16_05-08-24-37_980.zip

@LingEmberMaple LingEmberMaple changed the title ANR when adding email ANR when doing some things May 16, 2024
@cketti
Copy link
Member

cketti commented May 16, 2024

This seems to be related to custom tabs that are used for the OAuth sign-in flow. It looks like communication with the custom tabs service takes longer than 5 seconds. Are you doing anything to deliberately slow down such communication?

The OAuth library seems to be using the recommended way of doing this.

This issue does occasionally show up in ANRs reported via Google Play. But it's not very common (9 affected users in the last 60 days). Given that, we can't really justify spending more time on this.

Of course, pull requests to fix the problem are welcome (although this probably needs to be fixed in AppAuth-Android).

@cketti cketti changed the title ANR when doing some things ANR when using custom tabs in OAuth flow May 16, 2024
@cketti cketti added status: help wanted Issues seeking help from the community priority: low Low priority issues that can be addressed later and removed unconfirmed Newly reported issues awaiting triage or confirmation labels May 16, 2024
@LingEmberMaple
Copy link
Author

Thank you for the response.

I am not doing anything to deliberately slow down such communication.

It is strange that it started to have issues after I updated to HyperOS based on Android 14, but there were no problems on MIUI based on Android 13 before the update.

I will try again after the next system update.

@LingEmberMaple
Copy link
Author

Found a temporary solution:
Set the battery saver setting for the browser that K-9 Mail use the custom tab feature to “No restrictions”.

When you have installed a browser that supports the custom tab feature, whether or not this browser is set as the default browser, K-9 Mail will use the custom tab feature of this browser when adding an email account. However, due to unknown system reasons, setting the battery saver setting of this type of browser to “Battery saver” can cause K-9 Mail to ANR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Low priority issues that can be addressed later status: help wanted Issues seeking help from the community type: bug Something is causing incorrect behavior or errors
Projects
None yet
Development

No branches or pull requests

2 participants