Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Start: Unable to get provider com.huawei.hms.update.provider.UpdateProvider #368

Closed
Migueton opened this issue Sep 26, 2022 · 7 comments
Labels
solved Developer confirm that issue solved.

Comments

@Migueton
Copy link

Hello, I am having an exception when I start the game in my Huawei. I just updated Unity 2021.3.10f1 and your plugin to 2.2.5. I have tried to follow other threads' solutions like this one but didn't have any luck. Any idea why could not find the provider?

2022-10-04 13:51:28.169 25243-25243/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.youdagames.gop3multiplayer.huawei, PID: 25243
java.lang.RuntimeException: Unable to get provider com.huawei.hms.update.provider.UpdateProvider: java.lang.ClassNotFoundException: Didn’t find class “com.huawei.hms.update.provider.UpdateProvider” on path: DexPathList[[zip file “/data/app/com.youdagames.gop3multiplayer.huawei-1/base.apk”],nativeLibraryDirectories=[/data/app/com.youdagames.gop3multiplayer.huawei-1/lib/arm64, /data/app/com.youdagames.gop3multiplayer.huawei-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:6260)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5775)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5693)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.huawei.hms.update.provider.UpdateProvider” on path: DexPathList[[zip file “/data/app/com.youdagames.gop3multiplayer.huawei-1/base.apk”],nativeLibraryDirectories=[/data/app/com.youdagames.gop3multiplayer.huawei-1/lib/arm64, /data/app/com.youdagames.gop3multiplayer.huawei-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.installProvider(ActivityThread.java:6245)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5775)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5693)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)

@alihan98ersoy
Copy link
Collaborator

Hello, can you try to disable App Combat in common libraries?
resim

And also can you share with me your -> And try with these
Min API -> (26)
Target API -> (30 not automatically highest set manually)

Finally, are you using any other plugins or SDK? If you share the name and versions with me, I can test them.

@alihan98ersoy alihan98ersoy added the waiting for confirmation The solution has been given label Sep 26, 2022
@Migueton
Copy link
Author

Thanks, I am going to check with your settings

My current settings are:
Min API -> 22
Target -> 30

And yes, we are using several plugins. Some of them that could be conflicting perhaps are Firebase 9.4.0 and Bugsnag 7.2

@Migueton
Copy link
Author

The Min API set to 26 worked removed that exception, but is a big leap. Is there another way to fix this and keep continuing using Min API 22?

@alihan98ersoy
Copy link
Collaborator

Did you disable the app combat, maybe this can solve your problem. And our plugin requires min 21 API. With 22 should be working.

@Migueton
Copy link
Author

Migueton commented Sep 27, 2022

enabling or disabling app combat doesn't change it. I still get "Unable to get provider com.huawei.hms.update.provider.UpdateProvider" on both cases.

Edit:
These are my settings
image
image
image
image

@alihan98ersoy alihan98ersoy added investigating We are investigating the current problem and removed waiting for confirmation The solution has been given labels Sep 27, 2022
@Migueton
Copy link
Author

Ok, we got it sorted. We had in our manifest for a really long time these providers for Huawei, we included them once to fix an issue. At some point the official guidelines for upgrading the plugin have them removed. Removing these providers from our manifest fixed the issue. Thanks for the help.

    <provider android:name="com.huawei.hms.update.provider.UpdateProvider"
              android:authorities="${applicationId}.hms.update.provider"
              android:exported="false"
              android:grantUriPermissions="true"/>
    <provider
        android:name="com.huawei.updatesdk.fileprovider.UpdateSdkFileProvider"
        android:authorities="${applicationId}.updateSdk.fileProvider"
        android:exported="false"
        android:grantUriPermissions="true">
    </provider> 

@alihan98ersoy
Copy link
Collaborator

Thank you for your interest in our project. You may give us a star to support us and follow up on the project. You can also join our discord channel to follow changes and ask any kind of question about the plugin, gaming ecosystem, etc. You may access it from here: https://discord.io/hmsunityplugin
Thank you and stay tuned!

@alihan98ersoy alihan98ersoy added solved Developer confirm that issue solved. and removed investigating We are investigating the current problem labels Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved Developer confirm that issue solved.
Projects
None yet
Development

No branches or pull requests

2 participants