2

We experienced a problem of an mobile APP based on the Mobile Client Access service on IBM Bluemix. It worked fine before, but these days, we found the following failure after starting the APP.

    http://www.ibm.com/developerworks/library/mo-android-mobiledata-app/
    10-13 11:19:04.194 2721-2978/com.ibm.bluelist E/SplashActivityLoginFail: Failed to login: Response: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;;;
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>

    <div id="content">
    <div id="page">
    <div id="box">

    <div id="error"> Exception thrown by application class 'com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplication:120'
    </div>
    <div id="code">
    java.lang.IllegalStateException: Bluemix can&#39;t find application with tenantId 6dfe3edc-2c3f-4117-a2b7-8cade0a527ec and id iOSnative.<br>
    <div id="stack">at com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplication(ApplicationManagementServiceBeanOnCloud.java:120)<br>at com.worklight.applications.bean.ApplicationManagementServiceBeanOnCloud.getApplicationEnvironment(ApplicationManagementServiceBeanOnCloud.java:140)<br>at com.worklight.authorization.AuthorizationServer.getApplicationEnvironmentRuntime(AuthorizationServer.java:217)<br>at com.worklight.authorization.AuthorizationServer.getApplicationEnvironmentRuntime(AuthorizationServer.java:182)<br>at com.worklight.authorization.AuthorizationEndpoint.authorizeClient(AuthorizationEndpoint.java:170)<br>at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)<br>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br>at java.lang.reflect.Method.invoke(Unknown Source)<br>at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)<br>at org.apache.wink.server.handlers.AbstractHandler.handleRequest(AbstractHandler.java:33)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)<br>at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)<br>at org.apache.wink.server.internal.handlers.CreateInvocationParametersHandler.handleRequest(CreateInvocationParametersHandler.java:54)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)<br>at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)<br>at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:75)<br>at org.apache.wink.server.handlers.AbstractHandl

From the error message, seems above failure is due to invalid tenantID:

java.lang.IllegalStateException: Bluemix can't find application with tenantId xxxx

Actually we got the tenantID from AppGuid in the dashboard of MCA service, the ID should be correct ...

We are looking for help for debugging this problem. Any comment is appreciated.

Dave Cariello
  • 505
  • 6
  • 12
thinkhy
  • 923
  • 13
  • 25

2 Answers2

0

I was not able to recreate this problem. I would suggest restarting the app or trying another MCA service to see if that resolves the issue.

If you are still encountering issues, let me know, and we can do some more debugging, or you can open a Bluemix support ticket which will include more information about your instance to help the service team fix your error.

joe
  • 2,468
  • 2
  • 12
  • 19
  • Thanks a lot for your answer. Now we encounter another problem : with the new interface of Bluemix, I could not find Mobile Options to find the appGUID for my application. Could you give any clue for this problem? – thinkhy Nov 02 '16 at 01:45
  • The `AppGuid` is no longer a required parameter for using the latest Bluemix Mobile SDKs. How exactly are you using it currently? (and what platform?) I can help you get migrated if necessary. – joe Nov 02 '16 at 01:48
0

We are using MCA with custom Authentication, The way it works is MCA android client SDK will connect to MCA Bluemix service with the help of App GUID and RELAM name.

You need to ensure both these are matching at front end and backend. Both are mandatory parameter.

        MCAAuthorizationManager mcaAuthorizationManager = MCAAuthorizationManager.createInstance(this.getApplicationContext(),"<App GUID>");
        mcaAuthorizationManager.registerAuthenticationListener("<relam Name>", new CustomAuthenticationListener());
        BMSClient.getInstance().setAuthorizationManager(mcaAuthorizationManager);
pavan
  • 61
  • 1
  • 8