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

SecurityException causing crashes #262

Closed
matt-harris-mc opened this issue Apr 8, 2019 · 3 comments
Closed

SecurityException causing crashes #262

matt-harris-mc opened this issue Apr 8, 2019 · 3 comments

Comments

@matt-harris-mc
Copy link

matt-harris-mc commented Apr 8, 2019

We are seeing multiple crash reports come in. Our current setup just initializes the SDK in our application onCreate. The security exception fails on different files (not always the meta-inf)

SDK version being used: 2.1.4 (still waiting on #258 to use 3.0.0)
Android versions: 7.1.2, 8.0.0

Stack trace:

Fatal Exception: java.lang.NoClassDefFoundError: com.noveogroup.android.log.LoggerManager
       at com.noveogroup.android.log.LoggerManager.getLogger(LoggerManager.java:200)
       at org.slf4j.impl.AndroidLoggerFactory.getLogger(AndroidLoggerFactory.java:41)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:329)
       at com.optimizely.ab.android.sdk.OptimizelyManager$Builder.build(OptimizelyManager.java:748)
       at App.onCreate(MCMApp.java:95)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5405)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by java.lang.ExceptionInInitializerError
       at com.noveogroup.android.log.LoggerManager.getLogger(LoggerManager.java:200)
       at org.slf4j.impl.AndroidLoggerFactory.getLogger(AndroidLoggerFactory.java:41)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:329)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
       at com.optimizely.ab.android.sdk.OptimizelyManager$Builder.build(OptimizelyManager.java:737)
       at App.onCreate(MCMApp.java:95)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5405)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by java.lang.SecurityException: cannot verify signature block file META-INF/GOOGPLAY
       at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:220)
       at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:193)
       at java.util.jar.JarVerifier.processEntry(JarVerifier.java:306)
       at java.util.jar.JarVerifier.update(JarVerifier.java:217)
       at java.util.jar.JarFile.initializeVerifier(JarFile.java:353)
       at java.util.jar.JarFile.getInputStream(JarFile.java:420)
       at libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection.getInputStream(ClassPathURLStreamHandler.java:162)
       at java.net.URL.openStream(URL.java:1058)
       at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:979)
       at com.noveogroup.android.log.LoggerManager.loadProperties(LoggerManager.java:77)
       at com.noveogroup.android.log.LoggerManager.loadConfiguration(LoggerManager.java:123)
       at com.noveogroup.android.log.LoggerManager.(LoggerManager.java:166)
       at com.noveogroup.android.log.LoggerManager.getLogger(LoggerManager.java:200)
       at org.slf4j.impl.AndroidLoggerFactory.getLogger(AndroidLoggerFactory.java:41)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:329)
       at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:349)
       at com.optimizely.ab.android.sdk.OptimizelyManager$Builder.build(OptimizelyManager.java:737)
       at App.onCreate(MCMApp.java:95)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5405)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6121)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
@thomaszurkan-optimizely
Copy link
Contributor

Hey, so this isn't a crash. We are catching the error as well as the exception here. I have cleaned it up so that at least it should be more obvious with the try catch exception/error.

@matt-harris-mc
Copy link
Author

@thomaszurkan-optimizely thanks for looking into this but I am pretty sure these were uncaught/unhandled exceptions, which is how we ended up with multiple crash reports.

Was the catching of the log initializer potential exceptions added in 3.0.0?

The number of crashes has not been huge, but has happened enough to cause concern.

@thomaszurkan-optimizely
Copy link
Contributor

@matt-harris-mc it is cleaned up in 3.0.1 and catches both exception and error.

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