求教:QQ分享刚跳转到QQ,就返回了失败回调50002,但是QQ可以分享成功,求指教

复现步骤:(安卓平台)

  1. 点击QQ分享
  2. 会调起QQ应用,这个时候回调就打印失败了
    分享失败==》error:50002,msg:java.lang.Throwable: result is null, Platform{name=QQ}
  3. 然后QQ中可以成功把内容发送给好友(好友也能收到)
  4. 真正发送成功后,并没有触发回调监听

安卓使用版本:
compile ‘cn.jiguang.sdk:jshare:1.7.1’
compile ‘cn.jiguang.sdk:jshare-qqmodel:1.7.1’
compile ‘cn.jiguang.sdk:jcore:2.1.6’

官方的Demo没这个问题,代码都一样的

分享代码
ShareParams shareParams = new ShareParams();
shareParams.setShareType(Platform.SHARE_WEBPAGE);
shareParams.setTitle(title);
shareParams.setText(text);
shareParams.setUrl(url);
shareParams.setImageUrl(“https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1368759421,3712405094&fm=26&gp=0.jpg”);
JShareInterface.share(“QQ”, shareParams, mShareListener);

完整错误日志

2019-11-08 12:36:36.006 18430-18714/test.fucker D/jswrapper: JS: 安卓分享
2019-11-08 12:36:36.006 18430-18714/test.fucker D/JniHelper: JniHelper::getJavaVM(), pthread_self() = -915232400
2019-11-08 12:36:36.137 18430-18430/test.fucker I/DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:36.319 18430-18430/test.fucker D/JIGUANG-JShare: [InnerPlatActionListener] setActionListener:org.cocos2dx.javascript.AppActivity$4@d1eb5bc
2019-11-08 12:36:36.325 18430-18947/test.fucker V/AudioMixerController: Play over ...
2019-11-08 12:36:36.325 18430-18947/test.fucker V/AudioMixerController: Doesn't have enough tracks: 1, 1
2019-11-08 12:36:36.327 18430-18430/test.fucker D/JIGUANG-JShare: [AbsPlatform] will share:cn.jiguang.share.android.api.ShareParams@7bfb89a
2019-11-08 12:36:36.330 18430-18714/test.fucker V/AudioEngineImpl: Removing player id=4, state:5
2019-11-08 12:36:36.330 18430-18714/test.fucker V/PcmAudioPlayer: In the destructor of PcmAudioPlayer (0xbb929a00)
2019-11-08 12:36:36.330 18430-18714/test.fucker V/Track: ~Track(): 0xc5fd9a00
2019-11-08 12:36:36.330 18430-18430/test.fucker D/AppActivity: 分享参数: cn.jiguang.share.android.api.ShareParams@7bfb89a
2019-11-08 12:36:36.347 18430-18430/test.fucker I/TouchMotionHandler: handler onAttached
2019-11-08 12:36:36.662 18430-18430/test.fucker D/Cocos2dxActivity: onPause()
2019-11-08 12:36:36.663 18430-18714/test.fucker W/UrlAudioPlayer: UrlAudioPlayer (0xe2d30600, state:3) isn't playing, could not invoke pause!
2019-11-08 12:36:36.663 18430-18714/test.fucker I/chatty: uid=10314(test.fucker) GLThread 46500 identical 2 lines
2019-11-08 12:36:36.663 18430-18714/test.fucker W/UrlAudioPlayer: UrlAudioPlayer (0xe2d30600, state:3) isn't playing, could not invoke pause!
2019-11-08 12:36:36.689 18430-18430/test.fucker D/Cocos2dxActivity: onWindowFocusChanged() hasFocus=false
2019-11-08 12:36:36.789 18430-18430/test.fucker I/DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:36.942 18430-18430/test.fucker I/TouchMotionHandler: handler onAttached
2019-11-08 12:36:36.996 18430-18430/test.fucker D/PhoneWindow: DEBUG_ALIENSCREEN:onConfigurationChanged newConfig={1.0 ?mcc?mnc [zh_CN] ldltr sw360dp w360dp h654dp 320dpi nrml long port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 720, 1356) s.2718 themeId=0}
2019-11-08 12:36:36.999 18430-18430/test.fucker I/DecorView: onConfigurationChanged mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:37.039 18430-18430/test.fucker I/DecorView: onConfigurationChanged mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:37.047 18430-18430/test.fucker I/DecorView: onConfigurationChanged mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:37.058 18430-18430/test.fucker D/JIGUANG-JShare: [InnerPlatActionListener] onError PlatActionListener:org.cocos2dx.javascript.AppActivity$4@d1eb5bc
2019-11-08 12:36:37.059 18430-18430/test.fucker E/AppActivity: 分享失败==》error:50002,msg:java.lang.Throwable: result is null, platform: Platform{name=QQ}, action: 9
2019-11-08 12:36:37.034 18430-18430/test.fucker D/PhoneWindow: DEBUG_ALIENSCREEN:onConfigurationChanged newConfig={1.0 ?mcc?mnc [zh_CN] ldltr sw360dp w360dp h654dp 320dpi nrml long port finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 720, 1356) s.2718 themeId=0}
2019-11-08 12:36:37.063 18430-18430/test.fucker I/TouchMotionHandler: handler onDetached
2019-11-08 12:36:37.168 18430-18430/test.fucker I/DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:36:37.233 18430-18430/test.fucker I/SurfaceView: updateSystemUiVisibility, blackBackground = false, viewVisibility = 0, appBounds = Rect(0, 0 - 720, 1440), mScreenRect = Rect(0, 0 - 720, 1440), surface = org.cocos2dx.lib.Cocos2dxGLSurfaceView{e5b4586 VFE...... .F....ID 0,0-720,1440}
2019-11-08 12:36:37.314 18430-18430/test.fucker V/Typeface: CurFontPath: /system/fonts/Roboto-Regular.ttf
2019-11-08 12:36:37.314 18430-18430/test.fucker D/Typeface: switch to android orgin ttf
2019-11-08 12:36:37.341 18430-18430/test.fucker I/TouchMotionHandler: handler onDetached
2019-11-08 12:36:37.363 18430-18430/test.fucker W/IInputConnectionWrapper: getExtractedText on inactive InputConnection
2019-11-08 12:36:37.384 18430-18430/test.fucker I/SurfaceView: updateSystemUiVisibility, blackBackground = false, viewVisibility = 0, appBounds = Rect(0, 0 - 720, 1440), mScreenRect = Rect(0, 0 - 720, 1440), surface = org.cocos2dx.lib.Cocos2dxGLSurfaceView{e5b4586 VFE...... .F...... 0,0-720,1440}
2019-11-08 12:36:38.453 18430-18430/test.fucker W/MemoryCheckThre: type=1400 audit(0.0:43428): avc: denied { read } for name="mem" dev="debugfs" ino=22403998 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:kgsl_debugfs:s0 tclass=file permissive=0
2019-11-08 12:36:38.753 18430-18430/test.fucker W/MemoryCheckThre: type=1400 audit(0.0:43430): avc: denied { read } for name="mem" dev="debugfs" ino=22403998 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:kgsl_debugfs:s0 tclass=file permissive=0
2019-11-08 12:36:38.753 18430-18430/test.fucker W/MemoryCheckThre: type=1400 audit(0.0:43431): avc: denied { read } for name="mem" dev="debugfs" ino=22403998 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:kgsl_debugfs:s0 tclass=file permissive=0
2019-11-08 12:37:34.064 18430-18430/test.fucker D/JIGUANG-JCore: [JCoreHelper] runActionWithService action:notification_state
2019-11-08 12:37:34.072 18430-18564/test.fucker D/JIGUANG-JCommon: [JCommonInterface] onEvent action:notification_state
2019-11-08 12:37:34.074 18430-18570/test.fucker D/JIGUANG-JCore: [JCoreTCPManager] Action - restartNetworkingClient, pid:18430
2019-11-08 12:37:34.075 18430-18570/test.fucker I/JIGUANG-JCore: [JCoreTCPManager] need not keep tcp,next start app will re login
2019-11-08 12:37:34.127 18430-18430/test.fucker I/SurfaceView: updateSystemUiVisibility, blackBackground = false, viewVisibility = 0, appBounds = Rect(0, 0 - 720, 1440), mScreenRect = Rect(0, 0 - 720, 1440), surface = org.cocos2dx.lib.Cocos2dxGLSurfaceView{e5b4586 VFE...... .F....ID 0,0-720,1440}
2019-11-08 12:37:34.282 18430-18430/test.fucker I/DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:37:34.393 18430-18430/test.fucker I/DecorView: setWindowBackground mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:37:34.404 18430-18430/test.fucker D/PhoneWindow: DEBUG_ALIENSCREEN:onConfigurationChanged newConfig={1.0 ?mcc?mnc [zh_CN] ldltr sw360dp w678dp h336dp 320dpi nrml long land finger -keyb/v/h -nav/h appBounds=Rect(0, 0 - 1356, 720) s.2719 themeId=0}
2019-11-08 12:37:34.407 18430-18430/test.fucker I/DecorView: onConfigurationChanged mBackgroundPadding = Rect(0, 0 - 0, 0), mFramePadding = Rect(0, 0 - 0, 0), pkg = test.fucker
2019-11-08 12:37:34.533 18430-18430/test.fucker I/SurfaceView: updateSystemUiVisibility, blackBackground = true, viewVisibility = 0, appBounds = Rect(0, 0 - 1440, 720), mScreenRect = Rect(0, 0 - 1440, 720), surface = org.cocos2dx.lib.Cocos2dxGLSurfaceView{e5b4586 VFE...... .F....ID 0,0-1440,720}

求大神指教,是不是我哪里有毛病,谢谢!!

你分享的是什么内容?给出完整的日志信息,不要节选。
是否可能图片过大


这几个信息打印一下

完整日志都贴上了,图片只有12K,是网络图片,麻烦有空看一下,感谢!!

你好,谢谢解答,去掉这个也是一样的错误,都试过了

比较奇怪的是,尽管文档说不支持图片url了,但是最后分享出去,也是有图片的

我用的1.7.1, setImageUrl是可以把图片分享出去的

顶起来,请教各位大大,谢谢

我们测试没有遇到这样的情况,你测试 demo 不是说是正常的吗?

setImageUrl 这个功能是受到了QQ平台的限制的。

你用path方法分享也不行?