我使用Mobilefirst Client Access服务的移动应用程序无法登录,在服务器端,我看到以下错误。
它一直在工作,直到我修改了server.js。我添加了一些HTTP GET / PUT / POST端点。应用确实启动了,我可以使用浏览器测试这些端点。但移动应用程序会抛出错误02-04 14:07:28.247 13660-13700/com.ibm.bluelist E/SplashActivityLoginFail: Failed to login: Response:
02-04 14:07:28.247 13660-13699/com.ibm.bluelist E/mfpsdk.AuthorizationProcessManager: AuthorizationProcessManager.handleAuthorizationFailure in AuthorizationProcessManager.java:426 :: authorization process failed
服务器端错误:
Error: Cannot POST /apps/272690ba-3a01-4f82-8f79-293688c5b1de/customAuthRealm_1/startAuthorization
at raiseUrlNotFoundError (/home/vcap/app/node_modules/loopback/server/middleware/url-not-found.js:15:17)
at Layer.handle [as handle_request] (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)
at /home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:330:12)
at next (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:271:10)
at serveStatic (/home/vcap/app/node_modules/loopback/node_modules/express/node_modules/serve-static/index.js:74:16)
at Layer.handle [as handle_request] (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)
at /home/vcap/app/node_modules/loopback/node_modules/express/lib/router/index.js:280:7
答案 0 :(得分:0)
使用Bluemix DevOps服务时,不会拉出“cf push”推送的Node.js应用程序。 DevOps服务中的代码只是启动包。 我使用cf push并推送自定义身份验证和cloudant从bluelist示例中注册应用程序。然后,当我编辑server.js并在DevOPs服务中重新部署它时,它消除了客户身份验证,从而消除了身份验证错误。 我已将它们迁移到基于LoopBack框架的入门包。它现在有效。 仁