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

java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString #24

Open
shuhaowu opened this issue Jun 17, 2019 · 0 comments

Comments

@shuhaowu
Copy link

Describe the bug
A clear and concise description of what the bug is.

Information:

  • OS: Lineage 15.1
  • FakeTraveler version: 1.6

To Reproduce
Uncertain. It just gets force closed every once in a while when active.

Expected behavior
Not crash.

Logcat

06-16 23:42:33.668 18143 18143 E AndroidRuntime: FATAL EXCEPTION: main
06-16 23:42:33.668 18143 18143 E AndroidRuntime: Process: cl.coders.faketraveler, PID: 18143
06-16 23:42:33.668 18143 18143 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver cl.coders.faketraveler.ApplyMockBroadcastReceiver: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString(java.lang.String, java.lang.String)' on a null object reference
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3194)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.app.ActivityThread.-wrap17(Unknown Source:0)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String android.content.SharedPreferences.getString(java.lang.String, java.lang.String)' on a null object reference
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at cl.coders.faketraveler.ApplyMockBroadcastReceiver.onReceive(ApplyMockBroadcastReceiver.java:30)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	at android.app.ActivityThread.handleReceiver(ActivityThread.java:3187)
06-16 23:42:33.668 18143 18143 E AndroidRuntime: 	... 8 more

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

No branches or pull requests

1 participant