angular - AWS Cognito Angular 示例 : URIError: URI malformed

标签 angular amazon-web-services amazon-cognito

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

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

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

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

关于angular - AWS Cognito Angular 示例 : URIError: URI malformed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44879483/

相关文章:

angular - 将 Angular 2 升级到 Angular 4 没有导出成员 'AnimationDriver'

amazon-web-services - 将内联策略添加到 aws SAM 模板

amazon-web-services - 如何增加 EC2 实例中的主机名?

javascript - AWS Cognito 身份池 : AWS Credentials Expiration/Renewal

android - 我在 android 中创建 amazon cognito 后出现错误

Angular :错误 NG8001: 'mat-select' 不是已知元素:

angular - 如何在 Angular 中使用 HttpProgressEvent 接口(interface)?

Angular 模板 : How to display the row item as a normal table row

postgresql - Postgres "Materialized View"刷新为 ElasticSearch 文档更新的来源?

javascript - AWS Cognito - JavaScript 身份验证不工作