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

SharedWorker 导致的移动端浏览器报错 #335

Closed
5 tasks done
rdp-studio opened this issue Apr 8, 2024 · 0 comments · Fixed by #336
Closed
5 tasks done

SharedWorker 导致的移动端浏览器报错 #335

rdp-studio opened this issue Apr 8, 2024 · 0 comments · Fixed by #336

Comments

@rdp-studio
Copy link
Collaborator

Describe the bug

目前移动端很多浏览器并没有实现 SharedWorker 这个API(如Chrome for Android,see MDN),这会导致移动端打开网站就直接报错。

应该可以使用 https://github.com/okikio/sharedworker 之类的polyfill 解决这个问题,或者直接把旧的socket client还原回来,判断浏览器是否支持SharedWorker来选择新旧版本。

Reproduction

在 Chrome for Android 上打开任意页面

System Info

Chrome 123.0.6312.99
Android 11; Mi 10 Pro Build/RKQ1.200826.002

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant