这个是我加载广告的代码:
<template>
<view class="content">
<ad-rewarded-video adpid="" preload="true" :loadnext="true" @load="onadload" @close="onadclose" @error="onaderror">
<button :disabled="loading" :loading="loading">显示广告</button>
<view v-if="error">{{error}}</view>
</ad-rewarded-video>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
onadload(e) {
console.log('广告数据加载成功');
},
onadclose(e) {
const detail = e.detail
// 用户点击了【关闭广告】按钮
if (detail && detail.isEnded) {
// 正常播放结束
console.log("onadclose " + detail.isEnded);
} else {
// 播放中途退出
console.log("onadclose " + detail.isEnded);
}
},
onaderror(e) {
// 广告加载失败
console.log("onaderror: ", e.detail);
}
}
}
</script>
加载广告的页面打开的时候就会报错,下面是报错内容,但是不影响使用,广告加载完、用户点了关闭都能触发对应的函数。
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"insertTextView:fail parent 33290 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"updateTextView:fail 33289 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"updateTextView:fail 33324 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"insertTextView:fail parent 33325 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"updateTextView:fail 33326 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"insertImageView:fail parent 33326 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"insertImageView:fail parent 33330 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
rewarded-video.vue:100 ✅ 广告加载成功,可点击显示
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"updateImageView:fail 33331 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"insertTextView:fail parent 33332 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"updateTextView:fail 33333 not found"}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at WAServiceMainContext.js?t=wechat&v=3.9.2:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.2:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.2:1)(env: Windows,mp,1.06.2504030; lib: 3.9.2)
哪位大神遇到过,这是什么原因呢!
wanghw678 (作者)
我的微信开发工具也是最新版的,项目运行的时候提示:当前开发者工具版本较旧,对当前版本基础库支持存在问题。请更新开发者工具,或选用更旧版本基础库。我把调试基础课版本改成3.8.12就正常了,加载广告也不报错了
2025-09-04 17:48
DCloud_uni-ad_HDX
回复 wanghw678: 嗯 也有一定的概率偶发 本地的基础库仅用于本地调试 在微信公众平台配置的版本号才对线上的生效
2025-09-04 18:19