连接失败:未定义缓冲区-更新到v4.7.0后订阅AWS Amplify(graphql)订阅时出错

时间:2019-12-25 09:14:19

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

我刚刚从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,并且在更新之前,一切正常。

1 个答案:

答案 0 :(得分:1)

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

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