Socket.io-client: Uncaught TypeError: encodedPayload.split is not a function

Created on 6 Nov 2020  ·  6Comments  ·  Source: socketio/socket.io-client

You want to:

  • [x] report a bug

Current behaviour

Exception: Uncaught TypeError: encodedPayload.split is not a function

Steps to reproduce

Simple polling

Expected behaviour

No exceptions

Setup

  • OS: linux
  • browser: chrome
  • socket.io version: 3.0.0

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Uncaught TypeError: encodedPayload.split is not a function
at Object.decodePayload (index.js?2a85:24)
at XHR.onData (polling.js?0949:105)
at Request.eval (polling-xhr.js?d33e:101)
at Request.Emitter.emit (index.js?7297:145)
at Request.onData (polling-xhr.js?d33e:262)
at Request.onLoad (polling-xhr.js?d33e:329)
at XMLHttpRequest.xhr.onreadystatechange (polling-xhr.js?d33e:217)

bug

Most helpful comment

@darrachequesne , new exception in 3.0.1 release

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').

All 6 comments

also happens to me

Me either.

That's weird, the decodePayload() method should always be called with a String...

It might be fixed by https://github.com/socketio/engine.io-client/commit/ec3f677e9240a8947b6a12e15e3fd77e9bbb51d5 though.

@darrachequesne , new exception in 3.0.1 release

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').

Any workaround for this issue? Currently we are developing a new site, so i could downgrade. For now it should be fine to downgrade, but maybe someone has a better idea?

Was this page helpful?
0 / 5 - 0 ratings