Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

线上捕捉到报错:java.lang.ClassCastException #120

Open
pampang opened this issue Mar 25, 2019 · 10 comments
Open

线上捕捉到报错:java.lang.ClassCastException #120

pampang opened this issue Mar 25, 2019 · 10 comments

Comments

@pampang
Copy link
Contributor

pampang commented Mar 25, 2019

相关信息为:

#35091 java.lang.ClassCastException
cn.jiguang.share.android.model.AccessTokenInfo cannot be cast to java.util.HashMap
cn.jiguang.share.android.api.AbsPlatform.notifyComplete(Unknown Source)

请问可能是什么原因导致的呢?

@JoshLipan
Copy link
Member

对应插件哪个版本?有没有更详细的 log 信息

@pampang
Copy link
Contributor Author

pampang commented Mar 25, 2019

版本信息:

    "jcore-react-native": "1.2.10",
    "jshare-react-native": "1.3.10",

相关的 crash 信息:

11803-22 13:32:23.621 19571 21351 E AndroidRuntime: FATAL EXCEPTION: Thread-52
11903-22 13:32:23.621 19571 21351 E AndroidRuntime: Process: com.shefenqi.mall, PID: 19571
12003-22 13:32:23.621 19571 21351 E AndroidRuntime: java.lang.ClassCastException: cn.jiguang.share.android.model.AccessTokenInfo cannot be cast to java.util.HashMap
12103-22 13:32:23.621 19571 21351 E AndroidRuntime: at cn.jiguang.share.android.api.AbsPlatform.notifyComplete(Unknown Source:13)
12203-22 13:32:23.621 19571 21351 E AndroidRuntime: at cn.jiguang.share.wechat.d.run(Unknown Source:180)

@pampang
Copy link
Contributor Author

pampang commented Mar 26, 2019

hello,能帮我排查一下吗?
@JoshLipan

@JoshLipan
Copy link
Member

请提供完整的log,不要截取。偶现还是必现,是否有对应机型和系统版本,能否提供复现步骤

@pampang
Copy link
Contributor Author

pampang commented Mar 28, 2019

完整的 log 就只有这么一些了。不是必现,是线上捕捉到的错误。
目前已经影响了 68 个用户。

相关设备的信息如下(节选):
image

@JoshLipan
Copy link
Member

好的,我们内部先定位下具体原因

@pampang
Copy link
Contributor Author

pampang commented Apr 1, 2019

你好,请问能定位到原因了吗?

@Lris12J
Copy link

Lris12J commented Apr 15, 2019

原因:认证还没有返回,就执行了分享。而认证需要返回结果时,状态是分享,然后出现数据转换异常。
处理方案:你可以等认证有返回再做别的操作。我们之后也会对此进行优化

@pampang
Copy link
Contributor Author

pampang commented Apr 15, 2019

我来说一下我的理解,你看看是否理解到位了哈:

  1. 用户发起了第三方认证;
  2. 用户没有点击确认返回,完成整个认证流程;
  3. 用户进行分享操作;
  4. 因为数据转换异常,所以 crash。

大体流程是这样么?

那么,我该如何避免这样的情况发生呢?「认证有返回」这个状态,我要如何获取?

@Lris12J
Copy link

Lris12J commented Apr 15, 2019

调用的时候有返回监听

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants