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

App crash after Sign out and Sign in again #437

Closed
balaji-ramavathu opened this issue Mar 12, 2019 · 1 comment · Fixed by #440
Closed

App crash after Sign out and Sign in again #437

balaji-ramavathu opened this issue Mar 12, 2019 · 1 comment · Fixed by #440
Assignees

Comments

@balaji-ramavathu
Copy link
Contributor

Describe the issue
After sign out, if we sign in again, app crashes

To Reproduce or Feature details
Steps to reproduce the behavior:

  1. Go to Settings
  2. Click on Sign out
  3. Try to Sign in again
  4. Boom

Logs
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.amahi.anywhere, PID: 30957
java.lang.IllegalArgumentException: context is null
at android.accounts.AccountManager.get(AccountManager.java:449)
at org.amahi.anywhere.fragment.NavigationFragment.getAccountManager(NavigationFragment.java:132)
at org.amahi.anywhere.fragment.NavigationFragment.getAccounts(NavigationFragment.java:168)
at org.amahi.anywhere.fragment.NavigationFragment.setUpAuthenticationToken(NavigationFragment.java:176)
at org.amahi.anywhere.fragment.NavigationFragment.run(NavigationFragment.java:191)
at android.accounts.AccountManager$18.run(AccountManager.java:2176)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

Expected behavior
App should not crash.

Smartphone :

  • Device: huawei honor 7x
  • OS: Oreo (8.0)

Additional context
Actually, there's no problem in signing in part, except that the NavigationFragment is getting a null Context due to which the exception arises and hence the crash.

@cpg I am working to fix this :-)

@Bluesachinkr
Copy link

@balaji-ramavathu Can i work in that issue as well ? if allow

@cpg cpg closed this as completed in #440 Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants