淡e痕
淡e痕
  • 发布:2024-11-18 09:51
  • 更新:2024-11-18 11:51
  • 阅读:186

【报Bug】Cannot read property 'sendBeacon' of undefined

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10

HBuilderX类型: 正式

HBuilderX版本号: 4.29

手机系统: Android

手机系统版本号: Android 12

手机厂商: 小米

手机机型: 10s

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

云打包,安装,启动

预期结果:

正常使用

实际结果:

白屏

bug描述:

今天云打包后启动白屏,下面是android的日志

weex_runtime_v2_v8.cpp:528, createInstanceContext and ExecuteJavaScript Error :Uncaught TypeError: Cannot read property 'sendBeacon' of undefined
at (app-service.js:11:320819)
at (app-service.js:11:380128)
at (app-service.js:11:380199)
at (app-service.js:11:93786)
at (app-service.js:11:94131)
at 166c (app-service.js:11:380207)
at l (app-service.js:1:573)
at ca27 (app-service.js:2:208)
at l (app-service.js:1:573)
at t (app-service.js:1:431)
2024-11-18 09:39:02.671 2647-2647 RenderThread com.inspur.whsl I type=1400 audit(0.0:1219): avc: denied { ioctl } for path="/dev/fastpipe" dev="tmpfs" ino=7211 ioctlcmd=6867 scontext=u:r:untrusted_app:s0:c141,c256,c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
2024-11-18 09:39:02.671 2647-2647 RenderThread com.inspur.whsl W type=1300 audit(0.0:1219): arch=40000003 syscall=54 per=8 success=yes exit=0 a0=52 a1=80046867 a2=ecc036f0 a3=ecc036f0 items=0 ppid=1403 auid=4294967295 uid=10141 gid=10141 euid=10141 suid=10141 fsuid=10141 egid=10141 sgid=10141 fsgid=10141 tty=(none) ses=4294967295 exe="/system/bin/app_process32" subj=u:r:untrusted_app:s0:c141,c256,c512,c768 key=(null)
2024-11-18 09:39:02.671 1357-1357 auditd pid-1357 W type=1327 audit(0.0:1219): proctitle="com.inspur.whsl"
2024-11-18 09:39:02.688 2647-2673 weex com.inspur.whsl E reportJSException >>>> instanceId:1, exception function:createInstanceContext, exception:Uncaught TypeError: Cannot read property 'sendBeacon' of undefined
at (app-service.js:11:320819)
at (app-service.js:11:380128)
at (app-service.js:11:380199)
at (app-service.js:11:93786)
at (app-service.js:11:94131)
at 166c (app-service.js:11:380207)
at l (app-service.js:1:573)
at ca27 (app-service.js:2:208)
at l (app-service.js:1:573)
at t (app-service.js:1:431)
2024-11-18 09:39:02.691 2647-2673 weex com.inspur.whsl E onJSException -9700,Uncaught TypeError: Cannot read property 'sendBeacon' of undefined
at (app-service.js:11:320819)
at (app-service.js:11:380128)
at (app-service.js:11:380199)
at (app-service.js:11:93786)
at (app-service.js:11:94131)
at 166c (app-service.js:11:380207)
at l (app-service.js:1:573)
at ca27 (app-service.js:2:208)
at l (app-service.js:1:573)
at t (app-service.js:1:431)
2024-11-18 09:39:02.691 2647-2673 weex com.inspur.whsl E commitCriticalExceptionRT :WX_RENDER_ERR_JS_CREATE_INSTANCE_CONTEXTexceptionwhite screen cause create instanceContext failed,check js stack ->Uncaught TypeError: Cannot read property 'sendBeacon' of undefined
at (app-service.js:11:320819)
at (app-service.js:11:380128)
at (app-service.js:11:380199)
at (app-service.js:11:93786)
at (app-service.js:11:94131)
at 166c (app-service.js:11:380207)
at l (app-service.js:1:573)
at ca27 (app-service.js:2:208)
at l (app-service.js:1:573)
at t (app-service.js:1:431)
2024-11-18 09:39:03.109 2647-2693 HostConnection com.inspur.whsl D glGetError exceeded.

2024-11-18 09:51 负责人:无 分享
已邀请:
靐齉齾麤龖龗

靐齉齾麤龖龗 - 解决不了问题,那就解决提出问题的人

你是使用了navigator.sendBeacon这个吗?除了h5都不支持navigator,window等浏览器专有对象哦

  • 淡e痕 (作者)

    没有使用,代码里全局都没搜到这个方法

    2024-11-18 10:33

  • 淡e痕 (作者)

    上个月打包还没啥问题的,代码改动也不大

    2024-11-18 10:33

  • 靐齉齾麤龖龗

    回复 淡e痕: 你直接搜sendBeacon这个看看呢?有没有新加插件使用了这个

    2024-11-18 10:45

  • 淡e痕 (作者)

    回复 靐齉齾麤龖龗: 搜了,没有

    2024-11-18 11:46

淡e痕

淡e痕 (作者)

已解决,之前打包H5加了vConsloe.
打app的忘记改了

要回复问题请先登录注册