z***@163.com
z***@163.com
  • 发布:2019-10-24 20:02
  • 更新:2019-12-16 15:16
  • 阅读:1893

【报Bug】uni.share()第一次调用会出现以下错误,第二次后就正常

分类:uni-app

E/weex: reportJSException >>>> instanceId:1, exception function:WEEX_CALL_JAVASCRIPT, exception:SyntaxError: Unexpected token '{'. Expected either a closing ']' or a ',' following an array element.
E/weex: onJSException -2013,SyntaxError: Unexpected token '{'. Expected either a closing ']' or a ',' following an array element.
getTemplateInfo== template md5 null ,httpHeader:{}
E/weex: commitCriticalExceptionRT :WX_ERR_JS_EXECUTEexceptionJavaScript execute error!SyntaxError: Unexpected token '{'. Expected either a closing ']' or a ',' following an array element.
getTemplateInfo== template md5 null ,httpHeader:{}
W/System: A resource failed to call close.

2019-10-24 20:02 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com

我也遇到这个问题,在HBuilderX里面看没问题,但是到了本地离线包里面就报这个错误

9***@qq.com

9***@qq.com

uni.share({  
                    provider: 'weixin',  
                    scene: "WXSceneSession",  
                    type: 5,  
                    imageUrl: this.applyData.shareImageUrl,  
                    title: this.applyData.shareTitle,  
                    miniProgram: {  
                        id: this.miniProgramData.id,  
                        path: this.miniProgramData.path,  
                        type: this.miniProgramData.type,  
                        webUrl: this.miniProgramData.webUrl  
                    },  
                    success: (res) => {  
                        console.log('success:' + JSON.stringify(res));  
                        this.showToast('分享成功!');  
                    },  
                    fail: (err) => {  
                        console.log('fail:' + JSON.stringify(err));  
                    }  
                });

2019-12-16 15:03:32.489 27573-27647/com.tslm I/console: [ERROR][JS Framework] Failed to execute the callback function:
SyntaxError: Unexpected token '{'. Expected either a closing ']' or a ',' following an array element.
2019-12-16 15:03:32.496 27573-27647/com.tslm I/console: [ERROR]reportJSException >>>> exception function:WEEX_CALL_JAVASCRIPT, exception:JavaScript execute error!SyntaxError: Unexpected token '{'. Expected either a closing ']' or a ',' following an array element.
getTemplateInfo== template md5 null ,httpHeader:{}

该问题目前已经被锁定, 无法添加新回复