rusel1989 / react-native-bluetooth-serial

Port of https://github.com/don/BluetoothSerial for react native
476 stars 291 forks source link

null is not an object evaluating Bluetooth.on #107

Open mamdouh97 opened 5 years ago

mamdouh97 commented 5 years ago

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

mrzephros commented 5 years ago

Same issue...

robert-wilcox commented 5 years ago

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

hszczapa commented 5 years ago

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

bhoomika911 commented 4 years ago

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

lucassouza16 commented 3 years ago

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

zbram101 commented 3 years ago

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

sandeepsandy8790 commented 3 years ago

Thanks @lucassouza16 for the solution

Rinrin56 commented 3 years ago

@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

lucassouza16 commented 3 years ago

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