feathersjs-ecosystem / socketio

[MOVED] The Feathers Socket.io websocket transport plugin
https://github.com/feathersjs/feathers
MIT License
37 stars 14 forks source link

"Can't find variable: Reflect" on bad requests/authentication token missing; react-native #31

Closed imalbert closed 8 years ago

imalbert commented 8 years ago

Hi, I have this problem wherein whenever I receive bad requests/authentication token missing error responses from a service I get a "Can't find variable: Reflect" red screen error.

screenshot 2016-06-15 15 09 12

My react-native version is 0.24

I created a repro using feathers-chat that creates a auth-token-missing error @ https://github.com/imalbert/react-native-socketio-error

imalbert commented 8 years ago

I forgot to say, this happens when the chrome debugger is turned off; also in the bundled versions for ios and android

daffl commented 8 years ago

Try installing babel-polyfill and then in your main application file adding

if(!global._babelPolyfill) { require('babel-polyfill'); }
imalbert commented 8 years ago

This fixed the problem, thanks a lot! I did not have to install babel-polyfill because it seems to be already included in react-native init