Closed blexxed closed 3 years ago
Hi @blexxed, I'm facing this issue right now, is there any update?
Hi @blexxed, thank you for your interest in our Huawei Push React Native Plugin,
Could you give us more information about this error? Which state you faced with that issue?
We tried to upgrade old version demo with version "5.1.1-301" and there is no error like that.
I will share a link for you, could you please try our last version demo.
hi guys, i am also facing the same issue app is not opening in android,But it is working on hms core apk presented device ,but not working in google service device.And also when i uninstall hms-push pkg it is opening in google service phones and when i install it is not opening in google service phones
this is the logcat i am getting in android studio when opening
Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference at com.huawei.hms.rn.push.logger.HMSLogger.getInstance(HMSLogger.java:100) at com.huawei.hms.rn.push.remote.HmsPushMessageService.onTokenError(HmsPushMessageService.java:107) at com.huawei.hms.push.HmsMessageService.a(HmsMessageService.java:34) at com.huawei.hms.push.HmsMessageService.a(HmsMessageService.java:29) at com.huawei.hms.push.HmsMessageService.handleIntentMessage(HmsMessageService.java:7) at com.huawei.hms.push.HmsMessageService$a.handleMessage(HmsMessageService.java:7) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:238) at android.app.ActivityThread.main(ActivityThread.java:7878) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:512) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1028)
I have the same issues after update ^
Hi @blexxed, thank you for your interest in our Huawei Push React Native Plugin,
Could you give us more information about this error? Which state you faced with that issue?
We tried to upgrade old version demo with version "5.1.1-301" and there is no error like that.
I will share a link for you, could you please try our last version demo.
Hi @ozcanozgur,
I checked the example demo app. I noticed that the react native version is 0.60.0 https://github.com/HMS-Core/hms-react-native-plugin/blob/master/react-native-hms-push/example/package.json
The crash I encountered is on fresh react native install with a more recent version of 0.64.1
@blexxed @ozcanozgur "react-native": "0.61.2". facing same issue.
hi @all,
We have fixed the problem. The new version will be released on the next month.
For a quick fix auto_init should be false.
Thank you.
Hello @ozcanozgur, are there any updates on this?
Hi @all,
The new version of push kit plugin released.
https://www.npmjs.com/package/@hmscore/react-native-hms-push https://github.com/HMS-Core/hms-react-native-plugin/tree/master/react-native-hms-push
Thank You.
Description App crashes on open after installing @hmscore/react-native-hms-push version 5.1.1-301
Expected behavior App should not crash
Current behavior App crashes
Crash report: Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference com.huawei.hms.rn.push.logger.HMSLogger.getInstance com.huawei.hms.rn.push.logger.HMSLogger.getInstance (HMSLogger.java:100) com.huawei.hms.rn.push.remote.HmsPushMessageService.onTokenError (HmsPushMessageService.java:107) com.huawei.hms.push.HmsMessageService.a (HmsMessageService.java:34) com.huawei.hms.push.HmsMessageService.a (HmsMessageService.java:29) com.huawei.hms.push.HmsMessageService.handleIntentMessage (HmsMessageService.java:7) com.huawei.hms.push.HmsMessageService$a.handleMessage (HmsMessageService.java:7)
when I uninstall @hmscore/react-native-hms-push version 5.1.1-301. App does not crash anymore. Also downgrading @hmscore/react-native-hms-push to 5.0.2-301 works.
Environment