react-native-bluetooth-serial icon indicating copy to clipboard operation
react-native-bluetooth-serial copied to clipboard

null is not an object evaluating Bluetooth.on

Open mamdouh97 opened this issue 5 years ago • 9 comments

Basically, I created a blank react-native project and installed the library and did the installation manually. when I import the library in App.js without using it the application throws an error. null is not an object evaluating Bluetooth.on

mamdouh97 avatar Aug 27 '19 01:08 mamdouh97

Same issue...

mrzephros avatar Aug 29 '19 15:08 mrzephros

I am having the same issue. It seems to me like the objects aren't getting imported correctly.

robert-wilcox avatar Sep 12 '19 20:09 robert-wilcox

Has this been solved? I'm having the same issue.

hszczapa avatar Nov 08 '19 01:11 hszczapa

I am also facing the same issue in iOS simulator. Anyone can please help here?

bhoomika911 avatar Feb 25 '20 15:02 bhoomika911

I have been using this module for two of my projects for a long time, but in recent versions of react it presented several problems, mainly in iOS, I looked for other modules that work with esc pos and in my opinion this is the most complete and practical, because unfortunately the project was abandoned. So I thought it best to fix the module problems to continue using it, for those who have problems feel free to use:

https://github.com/lucassouza16/react-native-bluetooth-serial.git

To replace the original with the fork:

iOS

yarn remove react-native-bluetooth-serial && yarn add lucassouza16/react-native-bluetooth-serial#latest && cd ios && pod install && cd .. && yarn ios

Android

yarn remove react-native-bluetooth-serial && yarn add lucassouza16/react-native-bluetooth-serial#latest && cd android && ./gradlew clean && cd .. && yarn android

lucassouza16 avatar Feb 21 '21 13:02 lucassouza16

@lucassouza16 you are the real hero. using ur repo now :)

zbram101 avatar Feb 23 '21 07:02 zbram101

Thanks @lucassouza16 for the solution

sandeepsandy8790 avatar Mar 05 '21 10:03 sandeepsandy8790

@lucassouza16 hi when i run this "yarn add lucassouza16/react-native-bluetooth-serial#latest" something error: error An unexpected error occurred: "https://raw.githubusercontent.com/lucassouza16/react-native-bluetooth-serial/b8060e718dc71ab50a89aadc28fca8d34d50dabe/package.json: getaddrinfo ENOENT raw.githubusercontent.com".

i don't what happen

Rinrin56 avatar Mar 21 '21 08:03 Rinrin56

@lucassouza16 hi when i run this "yarn add lucassouza16/react-native-bluetooth-serial#latest" something error: error An unexpected error occurred: "https://raw.githubusercontent.com/lucassouza16/react-native-bluetooth-serial/b8060e718dc71ab50a89aadc28fca8d34d50dabe/package.json: getaddrinfo ENOENT raw.githubusercontent.com".

i don't what happen

This error is still very vague, are you sure that only this is returned?

lucassouza16 avatar Mar 21 '21 09:03 lucassouza16