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

Login with Huawei ID thows exception #417

Closed
flashmandv opened this issue Apr 25, 2023 · 3 comments
Closed

Login with Huawei ID thows exception #417

flashmandv opened this issue Apr 25, 2023 · 3 comments
Labels
solved Developer confirm that issue solved.

Comments

@flashmandv
Copy link

Hello,

So since I updated our HMS SDK to the latest version 2.3.2, logging in with huawei id is throwing this exception:

AndroidJavaException: java.lang.ClassNotFoundException: com.huawei.agconnect.auth.HwIdAuthProvider
    java.lang.ClassNotFoundException: com.huawei.agconnect.auth.HwIdAuthProvider
        at java.lang.Class.classForName(Native Method)
        at

The sign in succeeds but on the success handler I have this code, which in runtime fails to find HwIdAuthProvider class:
private void OnAccountKitLoginSuccess(AuthAccount authHuaweiId) { AGConnectAuthCredential credential = HwIdAuthProvider.CredentialWithToken(authHuaweiId.AccessToken); authServiceManager.SignIn(credential); }

The HuaweiMobileServices.dll file is in the Assets/Huawei/Dlls/ folder..which is ok.
Am I missing some gradle dependencies ?

I have these:

implementation 'com.huawei.hms:base:6.6.0.300'
implementation 'com.huawei.agconnect:agconnect-core:1.6.5.300'
implementation 'com.huawei.hms:hmscoreinstaller:6.6.0.300'

I'm using Unity 2020.3.43
Any ideas?
Thanks

@alihan98ersoy alihan98ersoy added the investigating We are investigating the current problem label Apr 26, 2023
@flashmandv
Copy link
Author

Ok, I've fixed the issue by adding these lines to my mainTemplate.gradle and launcherTemplate.gradle:

implementation 'com.huawei.agconnect:agconnect-apms:1.6.1.300'
implementation 'com.huawei.agconnect:agconnect-auth:1.6.1.300'

does anybody know why are these not added with the hmsMainTemplate.gradle auto generated files?

@alihan98ersoy alihan98ersoy added solved Developer confirm that issue solved. and removed investigating We are investigating the current problem labels Apr 26, 2023
@alihan98ersoy
Copy link
Collaborator

Hello,
If you are using our plugin you can add these lines by enabling Accountkit and Auth Service from HMS kit settings.
image

@flashmandv
Copy link
Author

flashmandv commented Apr 26, 2023

Thank you. I was missing the Auth Service checkbox.
Could you please check my other issue with the Ads? I have the Ads Kit checked but ads are not loading #418

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