Optimizely SDK not starting on Android Nexus 6P
The Android Optimizely SDK doesn't appear to be starting on the Nexus 6P. I have tested running our app on multiple devices such as a Nexus 10, Nexus 7, LG G4, HTC One, and a Nexus 6P. The SDK starts on all of them except the 6P. Anyone know why this would be and what devices Optimizely supports?
Here is the logcat for the 6P on app launch:
D/Optimizely Logging: [OptimizelyNetworkUtil] Executing request https://cdn.optimizely.com/json/android/kill_switc
h/3241430232.json D/Optimizely Logging: [OptimizelyData] Parsed data file version 65 D/Optimizely Logging: [OptimizelyNetworkUtil] Executing request https://cdn.optimizely.com/json/android/1.4/324143 0232.json D/Optimizely Logging: [OptimizelyData] Parsed data file version 65 D/Optimizely Logging: [OptimizelyData] Successfully saved data file to disk. D/Optimizely Logging: [Optimizely Logging] Optimizely is not starting because there are no running experiments. D/ChimeraFileApk: Classloading successful. Optimized code found.
It says there are no running experiments, however I have confirmed there are.
You definitely have running experiments, so the SDK should be starting. There should be no issue with the Nexus 6P — it should be supported. We tested on our Nexus 6P and the SDK was starting. We're going to look into this more and see if there is an issue. Any Android device above API 14 that uses the normal activities lifecycle should be supported.
Is it alright if we use your API token and project ID to test this? Don't post it here, we have access to it. There may be an issue with something in your project only, which might explain why we were able to get the SDK started on our device but not on yours.
We discovered an issue with the datafile being backed up to Google when using this in your manifest:
With this, the datafile was coming back after reinstalling the application, even in a debug build. So it's possible that a version of the data file with no running experiments is being restored from backup, and after reinstalling, Optimizely would use the cached data file if the request for a new one fails or times out. This seems like a bug by Google — these files should not be backed up for debug builds.
What you could do to work around this is put an AndroidManifest.xml in src/debug in addition to src/main you could set android:allowBackup="false" for debug builds and android:allowBackup="true" for release builds. The values in the src/debug/AndroidManfest.xml will override the values in src/main/AndroidManifest.xml
Can you test changing to false out and let me know if that gets the SDK to start running on your 6Ps?