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

E/AppsFlyer_6.3.2: (122058) [Thread-18] ExceptionInInitializerError at com.appsflyer.internal.a.AFKeystoreWrapper(Unknown Source:0) #12

Open
chihung93 opened this issue Jul 14, 2021 · 4 comments
Assignees

Comments

@chihung93
Copy link

chihung93 commented Jul 14, 2021

I have many crashes on Samsung Phone

E/AppsFlyer_6.3.2: (122058) [Thread-18] ExceptionInInitializerError at com.appsflyer.internal.a.AFKeystoreWrapper(Unknown Source:0)
    java.lang.ExceptionInInitializerError
        at com.appsflyer.internal.a.AFKeystoreWrapper(Unknown Source:0)
        at com.appsflyer.internal.ae$d.run(:3175)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.appsflyer.internal.k$1$5.run(:31)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.io.InputStream.read(byte[], int, int)' on a null object reference
        at com.appsflyer.internal.a.<clinit>(:272)
        at com.appsflyer.internal.a.AFKeystoreWrapper(Unknown Source:0) 
        at com.appsflyer.internal.ae$d.run(:3175) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at com.appsflyer.internal.k$1$5.run(:31) 
        at java.lang.Thread.run(Thread.java:764) 
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.io.InputStream.read(byte[], int, int)' on a null object reference
        at java.io.DataInputStream.readFully(DataInputStream.java:198)
        at java.io.DataInputStream.readFully(DataInputStream.java:172)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.appsflyer.internal.a.<clinit>(:2408)
        at com.appsflyer.internal.a.AFKeystoreWrapper(Unknown Source:0) 
        at com.appsflyer.internal.ae$d.run(:3175) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at com.appsflyer.internal.k$1$5.run(:31) 
        at java.lang.Thread.run(Thread.java:764)

My config :
AndroidManifest:

<meta-data
               android:name="com.gg.gapo.initializer.AppsFlyerInitializer"
               android:value="androidx.startup" />

Class:


class AppsFlyerInitializer : Initializer<Unit> {
    override fun create(context: Context) {
        val conversionDataListener = object : AppsFlyerConversionListener {
            override fun onAppOpenAttribution(p0: MutableMap<String, String>?) {
            }

            override fun onConversionDataSuccess(p0: MutableMap<String, Any>?) {
            }

            override fun onConversionDataFail(p0: String?) {
            }

            override fun onAttributionFailure(p0: String?) {
            }
        }

        AppsFlyerLib.getInstance().init(AF_DEV_KEY, conversionDataListener, context.applicationContext)
        AppsFlyerLib.getInstance().start(context)
        AppsFlyerLib.getInstance().setCollectAndroidID(true)
        AppsFlyerLib.getInstance().setCollectIMEI(true)
        if (BuildConfig.DEBUG) {
            AppsFlyerLib.getInstance().setLogLevel(AFLogger.LogLevel.VERBOSE)
        }
    }

    override fun dependencies(): List<Class<out Initializer<*>>> {
        return emptyList()
    }
}
@sokoloff06
Copy link

Hi!

Are those crashes from production or your tests? Does it happen always or under certain conditions? Can you share and ask file and steps to reproduce?

Thank you!

@sokoloff06 sokoloff06 self-assigned this Jul 14, 2021
@chihung93
Copy link
Author

chihung93 commented Jul 15, 2021

Hello, Those crashes are from real devices in Debug mode. It randomly happen on my phones. So Do you have any solution to avoiding this crash in Production?
P.s: I have not seen this issue on production ( Firebase report) yet.

@sokoloff06
Copy link

sokoloff06 commented Jul 15, 2021

Can you check if your apk contains a- and b- files under com/appsflyer/internal? Not in classes.dex, but as binary resources. Here is what I mean - https://dev.appsflyer.com/hc/docs/install-android-sdk#missing-resource-files

@chihung93
Copy link
Author

I see it in APK Debug.

Screen Shot 2021-07-15 at 21 51 13

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

2 participants