Git Product home page Git Product logo

Comments (15)

benvonhandorf avatar benvonhandorf commented on September 15, 2024

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.

mikeproeng37 avatar mikeproeng37 commented on September 15, 2024

Thanks for reporting this. We'll look into it!

from android-sdk.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@benvonhandorf are you reinitializing ever time you get a datafile update?

from android-sdk.

benvonhandorf avatar benvonhandorf commented on September 15, 2024

Currently I only call initialize as part of app startup.

from android-sdk.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

Thanks @benvonhandorf ! We are looking into it now.

from android-sdk.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@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.

benvonhandorf avatar benvonhandorf commented on September 15, 2024

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.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@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.

benvonhandorf avatar benvonhandorf commented on September 15, 2024

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.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@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.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@benvonhandorf We released 2.1.1 which includes a fix for this.

from android-sdk.

thomaszurkan-optimizely avatar thomaszurkan-optimizely commented on September 15, 2024

@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.

ingridswiftconnect avatar ingridswiftconnect commented on September 15, 2024

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.

jaeopt avatar jaeopt commented on September 15, 2024

@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.

ingridswiftconnect avatar ingridswiftconnect commented on September 15, 2024

from android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.