cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid client_id

tsange
Champ in-the-making
Champ in-the-making
Hi

I have followed the instructions at https://github.com/Alfresco/alfresco-android-app and managed to install a custom Alfresco app on my Android device. However when I click on the "Alfreco Cloud" cloud option I just receive the message "Invalid client_id" instead of the cloud login box.
10 REPLIES 10

jm_pascal
Star Contributor
Star Contributor
Aloah,

You need to register for a developer account at http://www.alfresco.com/develop/cloud/signup

After that you will get Oauth key associated to your account. You need to provide them during the build of the Android APP.

You can define them via the gradle.properties file at the root folder of your project source code.

OAUTH_API_KEY=OAUTH_API_KEY
OAUTH_API_SECRET=OAUTH_API_SECRET
OAUTH_CALLBACK=OAUTH_CALLBACK
OAUTH_SCOPE=public_api

Replace each value by the value you get form the portal.

Hope it helps.

tsange
Champ in-the-making
Champ in-the-making
#
Hi, thank you for your reply! The login box now appears but it crashes when I try to login, this is the error log


04-10 14:16:27.370  18691-18691/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.alfresco.mobile.android.application, PID: 18691
    java.lang.SecurityException: Permission Denial: opening provider org.alfresco.mobile.android.application.providers.OperationsProviderImpl from ProcessRecord{42aa4c70 18691:org.alfresco.mobile.android.application/u0a110} (pid=18691, uid=10110) that is not exported from uid 10108
            at android.os.Parcel.readException(Parcel.java:1465)
            at android.os.Parcel.readException(Parcel.java:1419)
            at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2848)
            at android.app.ActivityThread.acquireProvider(ActivityThread.java:4415)
            at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:2192)
            at android.content.ContentResolver.acquireProvider(ContentResolver.java:1378)
            at android.content.ContentResolver.insert(ContentResolver.java:1184)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.generateNotificationUri(BaseOperationRequest.java:63)
            at org.alfresco.mobile.android.async.OperationRequest.<init>(OperationRequest.java:85)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.<init>(BaseOperationRequest.java:47)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest.<init>(RetrieveOAuthDataRequest.java:67)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest$Builder.build(RetrieveOAuthDataRequest.java:171)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest$Builder.build(RetrieveOAuthDataRequest.java:120)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:121)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:107)
            at org.alfresco.mobile.android.async.Operator.load(Operator.java:111)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.retrieveAccessToken(OAuthFragment.java:241)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.onCodeUrl(OAuthFragment.java:206)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.access$100(OAuthFragment.java:45)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment$2.onPageStarted(OAuthFragment.java:155)
            at com.android.webview.chromium.WebViewContentsClientAdapter.onPageStarted(WebViewContentsClientAdapter.java:438)
            at com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$1.handleMessage(AwContentsClientCallbackHelper.java:100)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)


Thank you for your help!

jm_pascal
Star Contributor
Star Contributor
Do you have the official Alfresco App installed ?

If yes please uninstall it first.

tsange
Champ in-the-making
Champ in-the-making
You were right! I had the official app previous installed and so uninstalled it but am now receiving this error


04-14 15:51:46.826  32200-32200/? E/ActivityThread﹕ Failed to find provider info for org.alfresco.mobile.android.provider.debug.operations
04-14 15:51:46.826  32200-32200/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.alfresco.mobile.android.application, PID: 32200
    java.lang.IllegalArgumentException: Unknown URL content://org.alfresco.mobile.android.provider.debug.operations/operations
            at android.content.ContentResolver.insert(ContentResolver.java:1186)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.generateNotificationUri(BaseOperationRequest.java:63)
            at org.alfresco.mobile.android.async.OperationRequest.<init>(OperationRequest.java:87)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.<init>(BaseOperationRequest.java:47)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest.<init>(RetrieveOAuthDataRequest.java:67)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest$Builder.build(RetrieveOAuthDataRequest.java:171)
            at org.alfresco.mobile.android.async.session.oauth.RetrieveOAuthDataRequest$Builder.build(RetrieveOAuthDataRequest.java:120)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:121)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:107)
            at org.alfresco.mobile.android.async.Operator.load(Operator.java:111)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.retrieveAccessToken(OAuthFragment.java:241)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.onCodeUrl(OAuthFragment.java:206)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment.access$100(OAuthFragment.java:45)
            at org.alfresco.mobile.android.ui.oauth.OAuthFragment$2.onPageStarted(OAuthFragment.java:155)
            at com.android.webview.chromium.WebViewContentsClientAdapter.onPageStarted(WebViewContentsClientAdapter.java:438)
            at com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$1.handleMessage(AwContentsClientCallbackHelper.java:100)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)

jm_pascal
Star Contributor
Star Contributor
Could you uninstall the app and reinstall it ?

tsange
Champ in-the-making
Champ in-the-making
I uninstalled the official Alfresco app and installed the custom version however the unknown URL error message persists.

jm_pascal
Star Contributor
Star Contributor

kachaj7
Champ in-the-making
Champ in-the-making
Hi,
it's not possible to create an account: https://www.alfresco.com/develop/cloud/signup. I don't get any email or something else. Can somebody help?

kachaj7
Champ in-the-making
Champ in-the-making
Could somebody help? I'm trying third day to resolve the problem, but I can't fix it.
I have made this: https://github.com/Alfresco/alfresco-android-app/wiki/Getting-Started
and https://github.com/Alfresco/alfresco-android-app/wiki/Create-Custom-A but nothing help, still get:

05-06 22:02:27.931    1071-1071/org.alfresco.mobile.android.application E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.alfresco.mobile.android.application, PID: 1071
    java.lang.IllegalArgumentException: Unknown URL content://org.alfresco.mobile.android.provider.debug.operations/operations
            at android.content.ContentResolver.insert(ContentResolver.java:1203)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.generateNotificationUri(BaseOperationRequest.java:63)
            at org.alfresco.mobile.android.async.OperationRequest.<init>(OperationRequest.java:84)
            at org.alfresco.mobile.android.async.impl.BaseOperationRequest.<init>(BaseOperationRequest.java:47)
            at org.alfresco.mobile.android.async.account.CreateAccountRequest.<init>(CreateAccountRequest.java:52)
            at org.alfresco.mobile.android.async.account.CreateAccountRequest$Builder.build(CreateAccountRequest.java:130)
            at org.alfresco.mobile.android.async.account.CreateAccountRequest$Builder.build(CreateAccountRequest.java:78)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:121)
            at org.alfresco.mobile.android.async.OperationCreator.execute(OperationCreator.java:107)
            at org.alfresco.mobile.android.async.Operator.load(Operator.java:110)
            at org.alfresco.mobile.android.application.fragments.account.AccountEditFragment.validateServer(AccountEditFragment.java:194)
            at org.alfresco.mobile.android.application.fragments.account.AccountEditFragment.access$000(AccountEditFragment.java:61)
            at org.alfresco.mobile.android.application.fragments.account.AccountEditFragment$1.onClick(AccountEditFragment.java:111)
            at android.view.View.performClick(View.java:4756)
            at android.view.View$PerformClick.run(View.java:19749)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)