【问题标题】:Connection failed: Buffer is not defined - Error when subscribing to AWS Amplify (graphql) Subscriptions after update to v4.7.0连接失败:缓冲区未定义 - 更新到 v4.7.0 后订阅 AWS Amplify (graphql) 订阅时出错
【发布时间】:2020-04-16 00:19:44
【问题描述】:

我刚刚从 Amplify-cli 4.0.0 更新到 4.7.0,现在在尝试收听我的订阅时遇到这些错误。

{provider: AWSAppSyncRealTimeProvider, error: {…}}
provider: AWSAppSyncRealTimeProvider {_config: {…}, socketStatus: 0, keepAliveTimeout: 300000, subscriptionObserverMap: Map(0), promiseArray: Array(0), …}
error:
errors: Array(1)
0:
message: "Connection failed: Buffer is not defined"
__proto__: Object
length: 1
__proto__: Array(0)
__proto__: Object
__proto__: Object

我使用的是 Ionic 4,就在更新之前一切正常。

【问题讨论】:

    标签: aws-amplify aws-appsync aws-amplify-cli


    【解决方案1】:

    请参考以下链接:看起来你需要 polyfill 缓冲区。

    https://github.com/agoncal/swagger-ui-angular6/issues/2

    【讨论】:

      猜你喜欢
      • 2022-08-17
      • 2019-04-14
      • 2021-03-08
      • 2021-09-20
      • 2015-03-30
      • 2021-09-11
      • 2018-04-05
      • 1970-01-01
      • 2021-03-17
      相关资源
      最近更新 更多