Skip to content

Q&A

My app crashes with OneginiConfigNotFoundException.

The Onegini SDK needs a configuration class, that implements OneginiClientConfigModel interface.

You can pass it explicitly via OneginiClientBuilder#setConfigModel() method. If the method was not called (or the provided value is null), the SDK will use reflection and the Context.getPackageName() method to search for the class <your.application.package>.OneginiConfigModel, that implements the OneginiClientConfigModel interface. If the proper class can't be found, the SDK will throw a OneginiConfigNotFoundException exception.

My app crashes with OneginiInitializationException("Unable to decrypt internal data...")

In order to improve security of internal data, the Onegini SDK encrypts all storage files. The encryption functionality assumes, that some properties of the application won't change during the lifetime of the app. For example the application id that is defined in OneginiClientConfigModel should never change after the initial production release. Hoverer, sometimes you may change such properties during app's development. After such change the SDK will not be able to load internal data that was stored before the change. If you want to force the SDK to work again after such change, you can remove the app's internal data from the device (go into Android's Settings -> Apps and clear your app's data) or reinstall the app itself.

How can I disable root/debug detection?

Please check the SecurityController description

How can I check network communication logs?

Please check the SecurityController description

Push notifications delayed, heartbeat interval not reliable.

If you are using push messaging, you need to be aware that the connection with the google push service is checked infrequently. This can cause for delays in the reception of the push messages, since the connection can be broken without the device being aware of that. To prevent this either the application itself needs to check for the connection to be alive, or you can advice your users to install an application like Push Notifications Fixer.

The KeyStore exception warning

Sometimes during DCR process the Android system creates a warning log with a stacktrace:

1
2
3
4
5
6
7
W/KeyStore: KeyStore exception
    android.os.ServiceSpecificException:  (code 7)
        at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
        at android.os.Parcel.createException(Parcel.java:2357)
        at android.os.Parcel.readException(Parcel.java:2340)
        at android.os.Parcel.readException(Parcel.java:2282)
        ...
This warning is caused by a system bug that was reported here: https://issuetracker.google.com/issues/77664363 According to Google the issue should already be resolved, however it is still reproducible on many modern devices. According to our research the warning does not influence the DCR process which is still able to complete with success, therefore we suggest to ignore the warning.

Failed to transform bcprov-jdk15on

Onegini SDK v11.2.0+ uses the org.bouncycastle:bcprov-jdk15on library that can cause a build error when used with Android Gradle Plugin 4.x or earlier. The error log looks like the one below:

1
2
3
4
5
6
7
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Execution failed for JetifyTransform: ../org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar.
         > Failed to transform '../org.bouncycastle/bcprov-jdk15on/1.69/91e1628251cf3ca90093ce9d0fe67e5b7dab3850/bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

This is a bug in Android Gradle Plugin that should be fixed in Android Gradle Plugin 7.0

If you want to use the Onegini SDK but can not update to latest AGP yet, the workaround suggested in the link above is to add the following setting to your gradle.properties file:

1
android.jetifier.blacklist = bcprov-jdk15on