jpush / jpush/jpush-react-native

cn.jpush.reactnativejpush.JPushModule.sendEvent 报错

Open
#609 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.4k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

你的运行环境

  • 插件版本:
    "react-native": "0.57.5",
    "jcore-react-native": "^1.3.1",
    "jpush-react-native": "^2.5.1",

期望效果

正常使用极光推送功能 不崩溃

实际效果

个别手机出现崩溃

重现步骤

  1. ...
  2. ...
  3. ...
  4. ...

Debug logs

错误详情 1:
手机型号 KIW-TL00
java.lang.RuntimeException: Could not invoke JPushModule.notifyJSDidLoad
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:383)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:150)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
... 8 more
Caused by: java.lang.IncompatibleClassChangeError: Class 'java.lang.VirtualMachineError' does not implement interface 'java.lang.Class' in call to 'byte byte.()' (declaration of 'java.lang.Throwable' appears in /system/framework/core-libart.jar)
at cn.jpush.reactnativejpush.JPushModule.sendEvent(JPushModule.java:223)
at cn.jpush.reactnativejpush.JPushModule.notifyJSDidLoad(JPushModule.java:173)
... 10 more

错误详情 2:
手机型号 oppo A57t ,KIW-TL00
系统版本号 6.0.1
java.lang.IncompatibleClassChangeError: Class 'java.lang.VirtualMachineError' does not implement interface 'java.lang.Class' in call to 'byte byte.()' (declaration of 'java.lang.Throwable' appears in /system/framework/core-libart.jar)
at cn.jpush.reactnativejpush.JPushModule.sendEvent(JPushModule.java:223)
at cn.jpush.reactnativejpush.JPushModule.access$400(JPushModule.java:51)
at cn.jpush.reactnativejpush.JPushModule$JPushReceiver.onReceive(JPushModule.java:669)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2760)
at android.app.ActivityThread.access$1800(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1453)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5621)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect JPushModule.java around sendEvent (line 223) and notifyJSDidLoad/onReceive using the supplied stack traces; first compare behavior on the listed React Native and Android versions. Done means the IncompatibleClassChangeError no longer occurs on the reported devices and the push event path remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.