Socket.io-client: 未被捕获的TypeError:encodedPayload.split不是一个函数

创建于 2020-11-06  ·  6评论  ·  资料来源: socketio/socket.io-client

你想要:

  • [x]报告错误

当前行为

异常:未捕获的TypeError:encodingPayload.split不是函数

重现步骤

简单轮询

预期行为

没有例外

设置

  • 作业系统:linux
  • 浏览器:chrome
  • socket.io版本:3.0.0

其他信息(例如堆栈跟踪,相关问题,修复建议)

未被捕获的TypeError:encodedPayload.split不是一个函数
在Object.decodePayload(index.js?2a85:24)
在XHR.onData(polling.js?0949:105)
在Request.eval(polling-xhr.js?d33e:101)
在Request.Emitter.emit(index.js?7297:145)
在Request.onData(polling-xhr.js?d33e:262)
在Request.onLoad(polling-xhr.js?d33e:329)
在XMLHttpRequest.xhr.onreadystatechange(polling-xhr.js?d33e:217)

最有用的评论

@ darrachequesne ,3.0.1版本中的新异常

Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer').

所有6条评论

也发生在我身上

我也是。

太奇怪了,应该始终使用String调用decodePayload()方法。

它可能通过https://github.com/socketio/engine.io-client/commit/ec3f677e9240a8947b6a12e15e3fd77e9bbb51d5进行了修复。

@ darrachequesne ,3.0.1版本中的新异常

Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer').

这个问题有解决方法吗? 目前,我们正在开发一个新站点,因此我可以降级。 现在降级应该没问题,但是也许有人有更好的主意?

此页面是否有帮助?
0 / 5 - 0 等级