Surile / react-native-sunmi-printer

商米内置打印机
MIT License
47 stars 33 forks source link

The SDK does not work with React Native 0.73.4 #45

Closed manage-some closed 6 months ago

manage-some commented 7 months ago

React Native has updated their version and this SDK does not work with latest versions.

Waleed065 commented 7 months ago

@Surile

const hasPrinter = await SunmiPrinter.hasPrinter() console.log(hasPrinter) // false

return false

This works fine for react-native "0.71.14"

manage-some commented 7 months ago

@Surile any progress here?

Please help to resolve this issue. Thankyou

alexsegura commented 6 months ago

Me I got this error:

java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.reject(java.lang.String)' on a null object reference
 at com.reactnativesunmiprinter.SunmiPrinterModule$1.onRunResult(SunmiPrinterModule.java:47)
 at com.sunmi.peripheral.printer.ICallback$Stub.onTransact(ICallback.java:54)
 at android.os.Binder.execTransact(Binder.java:570)
Surile commented 6 months ago

Is there a new architecture enabled ---- Replied Message ---- From Alexandre @.> Date 03/14/2024 17:39 To @.> Cc Bryce @.>@.> Subject Re: [Surile/react-native-sunmi-printer] The SDK does not work with React Native 0.73.4 (Issue #45) Me I got this error: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(ce at com.reactnativesunmiprinter.SunmiPrinterModule$1.onRunResult(SunmiPrinterModule.java:45) at com.sunmi.peripheral.printer.ICallback$Stub.onTransact(ICallback.java:54) at android.os.Binder.execTransact(Binder.java:570) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Waleed065 commented 6 months ago

Is there a new architecture enabled ---- Replied Message ---- From Alexandre @.> Date 03/14/2024 17:39 To @.> Cc Bryce @.>@.> Subject Re: [Surile/react-native-sunmi-printer] The SDK does not work with React Native 0.73.4 (Issue #45) Me I got this error: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(ce at com.reactnativesunmiprinter.SunmiPrinterModule$1.onRunResult(SunmiPrinterModule.java:45) at com.sunmi.peripheral.printer.ICallback$Stub.onTransact(ICallback.java:54) at android.os.Binder.execTransact(Binder.java:570) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

@Surile No

Screenshot 2024-03-17 at 8 45 15 AM
Waleed065 commented 6 months ago

I was able to Solve It with by following the steps mentioned #here

Surile commented 6 months ago

That may not support the new version, I need to rewrite it, it may take a long time ---- Replied Message ---- From Waleed @.> Date 03/17/2024 11:46 To @.> Cc Bryce @.>@.> Subject Re: [Surile/react-native-sunmi-printer] The SDK does not work with React Native 0.73.4 (Issue #45) Is there a new architecture enabled ---- Replied Message ---- From Alexandre @.> Date 03/14/2024 17:39 To @.> Cc Bryce @.>@.> Subject Re: [Surile/react-native-sunmi-printer] The SDK does not work with React Native 0.73.4 (Issue #45) Me I got this error: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(ce at com.reactnativesunmiprinter.SunmiPrinterModule$1.onRunResult(SunmiPrinterModule.java:45) at com.sunmi.peripheral.printer.ICallback$Stub.onTransact(ICallback.java:54) at android.os.Binder.execTransact(Binder.java:570) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> @Surile No Screenshot.2024-03-17.at.8.45.15.AM.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>