Code Monkey home page Code Monkey logo

Comments (5)

ajwfrost avatar ajwfrost commented on June 12, 2024

Hi

There's a lot of threads there that have been set up by ANEs it seems .. and then the actual issue is:

Fatal Exception: java.lang.RuntimeException: Unable to create service androidx.work.impl.background.systemjob.SystemJobService: java.lang.IllegalStateException: WorkManager needs to be initialized via a ContentProvider#onCreate() or an Application#onCreate().

Caused by java.lang.IllegalStateException: WorkManager needs to be initialized via a ContentProvider#onCreate() or an Application#onCreate().
       at androidx.work.impl.background.systemjob.SystemJobService.onCreate(SystemJobService.java:81)
       at android.app.ActivityThread.handleCreateService(ActivityThread.java:5098)
       at android.app.ActivityThread.-$$Nest$mhandleCreateService()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2506)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:230)
       at android.os.Looper.loop(Looper.java:319)
       at android.app.ActivityThread.main(ActivityThread.java:8893)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

But I'm 99% sure we don't use this within the core AIR functionality .. so do you know if there's an ANE that is making that call, and perhaps needs to protect against multiple initializations like this?

thanks

from adobe-runtime-support.

marchbold avatar marchbold commented on June 12, 2024

Have you updated ANEs as part of this change? It could be an issue with your manifest. Either use apm to generate your manifest or carefully check it against the documentation of the extensions. You should have something like the following to initialise androidx.work:

        <provider
            android:name="androidx.startup.InitializationProvider"
            android:authorities="APPLICATION_PACKAGE.androidx-startup"
            android:exported="false" >
            <meta-data
                android:name="androidx.work.WorkManagerInitializer"
                android:value="androidx.startup" />
        </provider>

from adobe-runtime-support.

megajogos avatar megajogos commented on June 12, 2024

Thanks @marchbold !

We added this to our android manifest and the problem was solved:

<provider android:name="androidx.startup.InitializationProvider" android:authorities="{{android_package}}.androidx-startup" android:exported="false">
      <meta-data android:name="androidx.lifecycle.ProcessLifecycleInitializer" android:value="androidx.startup"/>
      <meta-data android:name="androidx.emoji2.text.EmojiCompatInitializer" android:value="androidx.startup"/>
      <meta-data android:name="androidx.work.WorkManagerInitializer" android:value="androidx.startup"/>
</provider>

from adobe-runtime-support.

Mintonist avatar Mintonist commented on June 12, 2024

We added this to our android manifest and the problem was solved:

@marchbold Does it mean that we all need to do the same?

from adobe-runtime-support.

marchbold avatar marchbold commented on June 12, 2024

@Mintonist if you follow our integration guides or use apm you should already have this in your manifest

from adobe-runtime-support.

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.