Comments (15)
It appears all of these crashes are on Android versions 8.X and 9. It is not limited to any manufacturer or phone.
from android-sdk.
Thanks for reporting this. We'll look into it!
from android-sdk.
@benvonhandorf are you reinitializing ever time you get a datafile update?
from android-sdk.
Currently I only call initialize as part of app startup.
from android-sdk.
Thanks @benvonhandorf ! We are looking into it now.
from android-sdk.
@benvonhandorf I'd like to know some more about what you are doing. Under normal circumstances, the OptimizelyManager.onDatafileDownloaded would only be called once. Are you doing anything special with the DefaultDatafileManager? Or, using the DatafileServiceConnetion in some other way?
from android-sdk.
Here is all my interaction with the Optimizely in my code:
As part of app startup:
OptimizelyManager optimizelyManager = OptimizelyManager.builder(this.applicationContext.getResources().getString(R.string.optimizely_project_id))
.withLogger(new ATLogLogger(TAG + "-Optimizely"))
.withDatafileDownloadInterval(12 * 60 * 60)
.withErrorHandler(this)
.build(this.applicationContext);
optimizelyManager.initialize(this.applicationContext, this);
I'm using callbacks for my own book-keeping around the state of optimizely (in onStart) and error logging, but the only other interactions I have is dumping the state of the world after initialization:
private void postOptimizelyInitialization() {
ATLog.i(TAG, "postOptimizelyInitialization");
//If setup needs to be done for audience, that should be cached and
//done here as well to help with race conditions.
if (optimizelyClient.getProjectConfig() != null) {
ATLog.i(TAG, String.format("Optimizely project: %s revision %s", optimizelyClient.getProjectConfig().getProjectId(), optimizelyClient.getProjectConfig().getRevision()));
if (optimizelyClient.getProjectConfig().getExperiments() != null) {
for (Experiment experiment : optimizelyClient.getProjectConfig().getExperiments()) {
ATLog.i(TAG, String.format("Optimizely experiment available: %s", experiment.getKey()));
}
}
}
}
and tracking individual events, e.g.:
public void recordRegistration() {
ATLog.i(TAG, "recordRegistration");
// if (optimizelyClient != null) {
// optimizelyClient.track(Goals.kRegistrationSuccessfulGoal, installationId);
// } else {
// ATLog.w(TAG, "No optimizely client, skipping track");
// }
}
Currently we have no optimizely experiments running. I have taken optimizely out entirely in a point release and this crash stopped, so it definitely seems related to the SDK, even if there are aggravating factors from other SDKs or code, which is possible.
from android-sdk.
@benvonhandorf Thanks for the feedback.
Can the initialize happen while the app is backgrounded?
Have you duplicated this in debug?
Again, thanks for the help.
from android-sdk.
Yes, we will attempt to initialized if the app is in the background. Our app startup is currently monolithic and Optimizely is started as part of it... so if a scheduled job fires it will do all our normal startup, including Optimizely.
Unfortunately I haven't seen it in debug yet.
from android-sdk.
@benvonhandorf Interesting. It sounds like we may just be the straw that broke the camels back. But, we can at least wrap that schedule in a try catch. We will add that today. Thanks!
from android-sdk.
@benvonhandorf We released 2.1.1 which includes a fix for this.
from android-sdk.
@benvonhandorf officially tagged in release 2.1.2. I'm going to close this for now. Please feel free to reopen if you find something else wrong.
from android-sdk.
Optimizely is crashing on my android app with this error message java.lang.ExceptionInInitializerError caused by java.lang.IllegalStateException: FileLogger is not initialized, Forgot to call Log4O.init()? It seems that have another library in my project using this lib 'com.noveogroup.android:android-logger:1.3.5'
from android-sdk.
@ingridswiftconnect it looks like not related to the original issue here. Can you file a new one with your issue? It'll be helpful if you can share the full stack trace as well. Thanks.
from android-sdk.
from android-sdk.
Related Issues (20)
- Optimizely does not initialize without proguard rule for Gson HOT 6
- Update SDK's dependencies HOT 2
- ConcurrentModificationException in NotificationManager.addHandler() HOT 3
- Issues targeting android 12 (API 31) HOT 5
- StrictMode violation due to Deflater.end() not being called HOT 1
- `updateConfigOnNewDatafile` does nothing HOT 2
- Unable to exclude users from experiment HOT 4
- isFeatureEnabled is failing some times HOT 2
- List all Flags available HOT 2
- AD Blocker is blocking the data sync HOT 2
- `Parcel.createExceptionOrNull` due to too many scheduled jobs HOT 5
- DatafileClient should specify read/write timeout on urlConnection HOT 3
- Crash in WorkerScheduler.startService HOT 12
- 2 files found with path 'android-logger.properties' from inputs HOT 6
- Wrong conversion rates while tracking feature flags HOT 2
- Crash with java.lang.ExceptionInInitializerError caused by java.lang.IllegalStateException: FileLogger is not initialized. Forgot to call Log4O.init()? HOT 6
- Reporting a vulnerability HOT 1
- ResourcesNotFoundException thrown during initialisaiton HOT 3
- [BUG] Setting initialize()'s updateConfigOnNewDatafile=false is ignored by DefaultDatafileHandler HOT 5
- [BUG] Zaius API - Graphql getting UnKnownHostException
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-sdk.