aws cognito angular example: URIError: URI malformed

aws cognito angular example: URIError: URI malformed

我正在试用基于 angular 2 的 aws cognito 示例应用程序,并注意到以下错误。

应用是https://github.com/awslabs/aws-cognito-angular2-quickstart

当我尝试从我的 Android 上的 Chrome 浏览器浏览到部署在 http://cognito.budilov.com/ 的这个应用程序时,我收到以下错误。关于可能发生的事情有什么想法吗?

vendor.f06d8c6….bundle.js:148 ERROR Error: Uncaught (in promise): URIError: 
URI malformed
URIError: URI malformed
at decodeURIComponent (<anonymous>)
at Object.fromBits (sjcl.js:11)
at e.value (amazon-cognito-identity.min.js:19)
at e.value (amazon-cognito-identity.min.js:19)
at e.value (amazon-cognito-identity.min.js:19)
at l.O7AO.l.isAuthenticated (main.fd38a9f….bundle.js:1)
at new l (main.fd38a9f….bundle.js:1)
at Ze (vendor.f06d8c6….bundle.js:225)
at ze (vendor.f06d8c6….bundle.js:225)
at On (vendor.f06d8c6….bundle.js:239)
at _n (vendor.f06d8c6….bundle.js:239)
at Object.Hn [as createRootView] (vendor.f06d8c6….bundle.js:239)
at e.create (vendor.f06d8c6….bundle.js:302)
at e.create (vendor.f06d8c6….bundle.js:281)
at t.createComponent (vendor.f06d8c6….bundle.js:302)
at decodeURIComponent (<anonymous>)
at Object.fromBits (sjcl.js:11)
at e.value (amazon-cognito-identity.min.js:19)
at e.value (amazon-cognito-identity.min.js:19)
at e.value (amazon-cognito-identity.min.js:19)
at l.O7AO.l.isAuthenticated (main.fd38a9f….bundle.js:1)
at new l (main.fd38a9f….bundle.js:1)
at Ze (vendor.f06d8c6….bundle.js:225)
at ze (vendor.f06d8c6….bundle.js:225)
at On (vendor.f06d8c6….bundle.js:239)
at _n (vendor.f06d8c6….bundle.js:239)
at Object.Hn [as createRootView] (vendor.f06d8c6….bundle.js:239)
at e.create (vendor.f06d8c6….bundle.js:302)
at e.create (vendor.f06d8c6….bundle.js:281)
at t.createComponent (vendor.f06d8c6….bundle.js:302)
at v (vendor.f06d8c6….bundle.js:697)
at p (vendor.f06d8c6….bundle.js:697)
at p (vendor.f06d8c6….bundle.js:697)
at vendor.f06d8c6….bundle.js:697
at t.invokeTask (vendor.f06d8c6….bundle.js:697)
at Object.onInvokeTask (vendor.f06d8c6….bundle.js:281)
at t.invokeTask (vendor.f06d8c6….bundle.js:697)
at e.runTask (vendor.f06d8c6….bundle.js:697)
at a (vendor.f06d8c6….bundle.js:697)
at HTMLAnchorElement.invoke (vendor.f06d8c6….bundle.js:697)

更新:

这适用于 aws cognito identity js 文件的非缩小版本,但缩小版本仍然存在问题。

更新到最新版本的 aws-cognito-sdk.js 和 amazon-cognito-identity.js 解决了问题。

您可以从此存储库中获取它们https://github.com/aws/amazon-cognito-identity-js