Bluemix中Android上的MobileFirst令牌错误

时间:2015-11-04 00:58:11

标签: android node.js ibm-cloud ibm-mobilefirst ibm-mobile-services

我正在尝试the Bluelist demo on Android并且我收到以下错误...

看起来移动服务正在抛出sqlite3

401

我的日志完整日志如下。

11-03 19:42:52.469  31488-31527/com.ibm.bluelist E/com.ibm.mobile.services.core.http.IBMMutableHttpRequest﹕ Request to 'https://winmobile.mybluemix.net/data/helo' failed. IBMBLUEMIX-0300E: Request by com.ibm.mobile.services.data.IBMData was rejected by MAS.  Status=401, Response={"error":"You are not authorized.","status":"failure"}
    .
11-03 19:42:52.479  31488-31508/com.ibm.bluelist E/getToken(34252)﹕ Server rejected request for with status code 401
    com.ibm.mobile.services.data.internal.HttpFailure: Http Response Code: 401
            at com.ibm.mobile.services.data.internal.Connection.getToken(Connection.java:199)
            at com.ibm.mobile.services.data.internal.Connection.access$400(Connection.java:43)
            at com.ibm.mobile.services.data.internal.Connection$Receiver.run(Connection.java:412)
11-03 19:42:52.479  31488-31508/com.ibm.bluelist E/Connection:Receiver(34252)﹕ Http Response Code: 401
    com.ibm.mobile.services.data.internal.HttpFailure: Http Response Code: 401
            at com.ibm.mobile.services.data.internal.Connection.getToken(Connection.java:199)
            at com.ibm.mobile.services.data.internal.Connection.access$400(Connection.java:43)
            at com.ibm.mobile.services.data.internal.Connection$Receiver.run(Connection.java:412)
11-03 19:42:52.599  31488-31532/com.ibm.bluelist E/com.ibm.mobile.services.core.http.IBMMutableHttpRequest﹕ Request to 'https://winmobile.mybluemix.net/push/v1/apps/58cf6be4-9e6f-4f10-910c-178ebed2883a/settings/current' failed. IBMBLUEMIX-0300E: Request by com.ibm.mobile.services.push.IBMPush was rejected by MAS.  Status=401, Response=Error 401: {
    "error": "MASS016E: Invalid application secret is detected."
    }
    .

任何人都可以提供帮助

1 个答案:

答案 0 :(得分:0)

MASS016E: Invalid application secret is detected

似乎是那里的根本原因。请验证您是否按照幻灯片放映幻灯片14并将应用程序密钥(从MAS服务下的Bluemix仪表板获取)添加到bluelist.properties文件中。

如果您有兴趣,我实际上建议您查看第二代移动服务Android Bluelist示例,因为它使用了更多最新的SDK,并为开发人员提供了比您将使用的第一代服务更好的工具集按照您提供的示例。您可以找到该项目的{github here以及Bluemix上的相应文档here