aws-amplify / aws-sdk-android

AWS SDK for Android. For more information, see our web site:
https://docs.amplify.aws
Other
1.02k stars 548 forks source link

Getting java.lang.IllegalArgumentException: Invalid API Key when upload app on production #3409

Closed dishankEbizz closed 9 months ago

dishankEbizz commented 9 months ago

Hello, Hope you are doing well. I am using Amazon login in my application. It's working fine in debug mode but when I am uploading it to playstore it's giving Invalid API Key and Crashing the app. So can you please guide me what's issue here? Here is log kindly check.

Fatal Exception: java.lang.IllegalArgumentException: Invalid API Key
       at com.amazon.identity.auth.device.authorization.InternalAuthManager.<init>(InternalAuthManager.java:59)
       at com.amazon.identity.auth.device.authorization.InternalAuthManager.getInstance(InternalAuthManager.java:48)
       at com.amazon.identity.auth.device.api.authorization.AuthorizationManager.authorize(AuthorizationManager.java:193)
       at com.app.vedicstudents.activity.LoginActivity.onClick(LoginActivity.kt:425)
       at android.view.View.performClick(View.java:8160)
       at android.view.View.performClickInternal(View.java:8137)
       at android.view.View.access$3700(View.java:888)
       at android.view.View$PerformClick.run(View.java:30236)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8625)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Thank you in advance.

tylerjroach commented 9 months ago

How are you including the api key? It's likely you may have a different api key (or none at all) set up for the production split in build.gradle.

dishankEbizz commented 9 months ago

image

Like this we are managing API key for debug and production.

dishankEbizz commented 9 months ago

Hello, Can you please guide me on above issue?

mattcreaser commented 9 months ago

@dishankEbizz This repository is for the AWS SDK, you appear to be using the Login With Amazon SDK (LWA).

I'm not exactly sure where to go for support for that product, but you could try posting your question on the LWA Forums. Good luck!