Skip to content

ANR problem when init Hawk #246

@superdiazzz

Description

@superdiazzz

Please try to fill all questions below before submitting an issue.

  • On which android versions do you have this issue? : android > 11
  • On which phones do you have this issue? : Samsung & vivo
  • Which hawk version are you using? : 2.0.1
  • Does this issue happen always or is it flaky? : yes
  • Can you write failing test? : It's hard to test since in my emulator everything looks normal.
  • If it is Hawk.put and Hawk.get issue, can you write down which data you were trying to save and get it back? : Issue only happened when device state in background. It's causing ANR and there is no user journey detecting in Crashlytics
  • Is the data you are trying to save it huge or small?

Log Error

main (runnable): tid=1 systid=31973 
       at com.google.gson.FieldNamingPolicy.<init>(FieldNamingPolicy.java)
       at com.google.gson.FieldNamingPolicy.<init>(FieldNamingPolicy.java)
       at com.google.gson.FieldNamingPolicy$1.<init>(FieldNamingPolicy.java)
       at com.google.gson.FieldNamingPolicy.<clinit>(FieldNamingPolicy.java)
       at com.google.gson.Gson.<init>(Gson.java)
       at com.orhanobut.hawk.HawkBuilder.getParser(HawkBuilder.java)
       at com.orhanobut.hawk.HawkBuilder.getConverter(HawkBuilder.java)
       at com.orhanobut.hawk.DefaultHawkFacade.<init>(DefaultHawkFacade.java)
       at com.orhanobut.hawk.Hawk.build(Hawk.java)
       at com.orhanobut.hawk.HawkBuilder.build(HawkBuilder.java)
       at com.tribunnews.app.TribunNewsApplication.onCreate(TribunNewsApplication.java)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7593)
       at android.app.ActivityThread.access$1500(ActivityThread.java:301)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2177)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8653)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions