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

scheduler.production.min.js 报错 #10458

Closed
neewbee opened this issue Oct 19, 2021 · 5 comments
Closed

scheduler.production.min.js 报错 #10458

neewbee opened this issue Oct 19, 2021 · 5 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@neewbee
Copy link

neewbee commented Oct 19, 2021

相关平台

微信小程序

小程序基础库: 1.4.1
使用框架: React

复现步骤

有部分用户会报异常
堆栈信息(去掉了行列号)
"|\u0002\u0000\u0000\"MiniProgramError\\nCannot read property 'now' of undefined\\nTypeError: Cannot read property 'now' of undefined\\n at Object.<anonymous> (https://usr/app-service.js:)\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:)\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:)\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:)\\n at Module._ (https://usr/app-service.js:25254:14)\\n at l (https://usr/app-service.js:)\\n at t (https://usr/app-service.js:)\"\u0000", "|\u0002\u0000\u0000\"MiniProgramError\\nCannot read property 'now' of undefined\\nTypeError: Cannot read property 'now' of undefined\\n at Object.<anonymous> (https://usr/app-service.js:)\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:10312:91)\\n at Object._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:)\\n at Module._ (https://usr/app-service.js:)\\n at l (https://usr/app-service.js:)\\n at t (https://usr/app-service.js:)\"\u0000"
定位了下代码

截屏2021-10-19 16 33 46

__Date.now 这里报错了

截屏2021-10-19 16 38 03

之前有个 issue #8327 提到了这个问题,我不太确定是不是同一个原因,应为只有一部分用户有报错。

期望结果

不报错

实际结果

报错

环境信息

👽 Taro v3.0.21

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

  Taro CLI 3.0.21 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 12.18.2 - ~/.nvm/versions/node/v12.18.2/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.2/bin/yarn
      npm: 6.14.5 - ~/.nvm/versions/node/v12.18.2/bin/npm
    npmPackages:
      @tarojs/cli: 3.0.21 => 3.0.21
      @tarojs/components: 3.0.21 => 3.0.21
      @tarojs/mini-runner: 3.0.21 => 3.0.21
      @tarojs/react: 3.0.21 => 3.0.21
      @tarojs/runtime: 3.0.21 => 3.0.21
      @tarojs/service: ^3.0.21 => 3.0.21
      @tarojs/taro: 3.0.21 => 3.0.21
      @tarojs/webpack-runner: 3.0.21 => 3.0.21
      babel-preset-taro: 3.0.21 => 3.0.21
      eslint-config-taro: 3.0.21 => 3.0.21
      react: ^16.10.0 => 16.14.0

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Oct 19, 2021
@luckyadam
Copy link
Member

升级到最新版本

@neewbee
Copy link
Author

neewbee commented Oct 19, 2021

升级到最新版本

@luckyadam 大佬,我们项目不能随便升级,可以说一下原因或者排查思路吗?

@luckyadam
Copy link
Member

issue #8327 已经提到了 3.0.22 修复了这个问题,建议升级

@neewbee
Copy link
Author

neewbee commented Oct 20, 2021

好嘞!

@neewbee
Copy link
Author

neewbee commented Oct 26, 2021

需要升级要 3.0.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants