question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

crashes react native app with _nativeInterface.default.getCurrentState is not a function

See original GitHub issue

Do 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:

  1. Install pusher-js using npm install and follow instructions to install netinfo
  2. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dorklord23commented, Sep 3, 2019

@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.

0reactions
leesiocommented, Jan 28, 2020

I closed this issue as it seemed resolved. Feel free to re-open it if I was mistaken

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo React Native NetInfo crashing - Stack Overflow
import NetInfo from '@react-native-community/netinfo'; const MyCases ... any time I opened the app in iOS it crashes instantly and closes.
Read more >
App Center Crashes for React Native - Microsoft Learn
Your React Native app needs to be compiled in release mode for ... Default values are used if a method with return parameter...
Read more >
React Native Crash Course - YouTube
In this course we will talk about what React Native is and get setup, look at some of the built in components and...
Read more >
How to Detect Crashes in a React Native App - YouTube
Crashes are going to happen. We can try to minimize them but they'll still happen. When they happen in production what can we...
Read more >
@react-native-community/netinfo - npm
React Native Network Info API for iOS & Android. ... Linking the package manually is not required anymore with Autolinking. iOS Platform:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found