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

H5的innerAudioContext的onError没有捕获到错误 #13945

Closed
tangbzai opened this issue Jun 2, 2023 · 0 comments · Fixed by #14113
Closed

H5的innerAudioContext的onError没有捕获到错误 #13945

tangbzai opened this issue Jun 2, 2023 · 0 comments · Fixed by #14113
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@tangbzai
Copy link
Contributor

tangbzai commented Jun 2, 2023

相关平台

H5

复现仓库

git@github.com:tangbzai/Taro-innerAudioContext-error-demo.git
浏览器版本: Chrome 113.0.5672.127(正式版本) (64 位)
使用框架: React

复现步骤

  1. npm install
  2. npm run dev:h5
  3. 打开控制台即可看到错误信息(如果没看到就刷新一下)

期望结果

onError 能捕获到错误

实际结果

网络显示资源加载失败,控制台出现错误,onError 捕获不到错误

环境信息

  Taro CLI 3.6.7 environment info:
    System:
      OS: Windows 10 10.0.17763
    Binaries:
      Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
      npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: ^3.6.7 => 3.6.7
      @tarojs/components: 3.6.7 => 3.6.7
      @tarojs/helper: 3.6.7 => 3.6.7
      @tarojs/plugin-framework-react: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-alipay: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-h5: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-jd: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-qq: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-swan: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-tt: 3.6.7 => 3.6.7
      @tarojs/plugin-platform-weapp: 3.6.7 => 3.6.7
      @tarojs/react: 3.6.7 => 3.6.7
      @tarojs/runtime: 3.6.7 => 3.6.7
      @tarojs/shared: 3.6.7 => 3.6.7
      @tarojs/taro: 3.6.7 => 3.6.7
      @tarojs/webpack5-runner: 3.6.7 => 3.6.7
      babel-preset-taro: 3.6.7 => 3.6.7
      eslint-config-taro: 3.6.7 => 3.6.7
      react: ^18.0.0 => 18.2.0

补充信息

复现代码库 Github 地址:https://github.com/tangbzai/Taro-innerAudioContext-error-demo

看源码后一点小的见解:InnerAudioContext.tserrorStack 没有在 onerror 时调用 trigger 方法 所以没有触发(BackgroundAudioManager 好像同样没有触发)

我尝试修改源码后发现 Taro.InnerAudioContext.onErrorDetailonError 的参数) 不知如何创建,只能麻烦大佬们帮忙修复该问题了,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant