pusher / pusher-websocket-react-native

React Native official Pusher SDK
MIT License
61 stars 52 forks source link

ERROR TypeError: Cannot read property 'getInstance' of undefined, js engine: hermes #162

Open Ankush-Hegde opened 3 months ago

Ankush-Hegde commented 3 months ago

i was referring the pusher official doc and implemented as it was given. I wanted to implement the chat feature for the react native expo app.When i used this code I got the error.

const pusher = Pusher.getInstance();

await pusher.init({ apiKey: API_KEY, cluster: API_CLUSTER });

await pusher.connect();

ERROR TypeError: Cannot read property 'getInstance' of undefined, js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:

if i remove that code everything works fine