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

Sonar keep crash on startup #36

Closed
vincent-paing opened this issue Jun 12, 2018 · 2 comments
Closed

Sonar keep crash on startup #36

vincent-paing opened this issue Jun 12, 2018 · 2 comments
Labels

Comments

@vincent-paing
Copy link

I followed the getting started guide, and set up in my application as follows:

if (BuildConfig.DEBUG && SonarUtils.shouldEnableSonar(this)) {
     val client = AndroidSonarClient.getInstance(this)
     client.start()
}

Now whenever my app starts, it crashes with following exception

FATAL EXCEPTION: SonarEventBaseThread
    Process: com.anitime.schedule, PID: 13943
    java.lang.ExceptionInInitializerError
        at com.facebook.sonar.android.SonarThread.run(SonarThread.java:25)
     Caused by: java.lang.RuntimeException: SoLoader.init() not yet called
        at com.facebook.soloader.SoLoader.assertInitialized(SoLoader.java:746)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:476)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:34)
        at com.facebook.sonar.android.SonarThread.run(SonarThread.java:25) 

I'm on Android SDK of 28, and on Android Studio of 3.2, and testing on Phone with OS version of 8.0.0

@vincent-paing vincent-paing changed the title Sonar keep crash on Android Sonar keep crash on startup Jun 12, 2018
@hibob224
Copy link

To get around this you can call SoLoader.init(context, false) before AndroidSonarClient.getInstance(this). I've opened an issue for this asking if it should be added to the documentation #27

@jknoxville
Copy link
Contributor

Thanks for raising this guys, I'll update the docs to reflect it. Closing this one in favor of the first one, #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants