crashes react native app with _nativeInterface.default.getCurrentState is not a function
See original GitHub issueDo you want to request a feature or report a bug? Bug What is the current behavior? Crashes react native app on startup If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar. Steps to reproduce:
- Install pusher-js using npm install and follow instructions to install netinfo
- Add boilerplace pusher code to react native app
`import Pusher from ‘pusher-js/react-native’;
// Enable pusher logging - don’t include this in production Pusher.logToConsole = true;
var pusher = new Pusher(‘145f9e79c1e932d355d3’, { cluster: ‘us3’, forceTLS: true });
var channel = pusher.subscribe(‘my-channel’); channel.bind(‘my-event’, function(data) { console.log(JSON.stringify(data)); });`
What is the expected behavior?
Load pusher and subscribe to a channel
Which versions of Pusher, and which browsers / OS are affected by this issue? Did this work in previous versions of Pusher? If so, which?
using Pusher ^5.0.0
with react-native 0.59.8
and expo SDK 33.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top GitHub Comments
@gianemi2 I still got the error even after I followed your steps. But yours inspired me to upgrade the Expo SDK from 33 to 34 and voila it worked!!
I believe Expo SDK must be updated to the latest one (34 as of now) before
pusher-js
could work.I closed this issue as it seemed resolved. Feel free to re-open it if I was mistaken