Closed sjmueller closed 8 years ago
Verified works with base-64
(don't forget the dash!)
For react-native googlers, npm i --save base-64
, then add this somewhere in your codebase and make sure it runs before socketcluster-client
is referenced:
if (!global.atob) {
global.atob = require('base-64').decode;
}
@sjmueller Ok, that should be fixed in v4.1.6
.
Confirmed! Thanks @jondubois!
Thanks @sjmueller, it worked for me 👍
Getting this exception when running a react-native project on device:
Most likely due to this line: https://github.com/SocketCluster/socketcluster-client/blob/1b2cc0b7f66fa7f8d4b737bfb7d3381f757bd69b/lib/scsocket.js#L352
Perhaps the solution is to use a polyfill like https://github.com/mathiasbynens/base64 to supplement these methods when running
socketcluster-client
in a more restricted runtime like JavaScriptCore.