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

taro-alipay 1.2.26 版本运行报错 #2802

Closed
wnuoer opened this issue Apr 17, 2019 · 11 comments
Closed

taro-alipay 1.2.26 版本运行报错 #2802

wnuoer opened this issue Apr 17, 2019 · 11 comments
Assignees

Comments

@wnuoer
Copy link
Contributor

wnuoer commented Apr 17, 2019

问题描述
如题,升级到 1.2.26 版本之后。支付宝小程序运行时报错。

搜索关键字:onTaroCollectChilds

复现步骤
编译器中打开小程序。直接报错
期望行为
[这里请用简洁清晰的语言描述你期望的行为]

报错信息

系统信息
Taro v1.2.26

Taro CLI 1.2.26 environment info:
System:
OS: macOS 10.14.3
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.9.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.2.26 => 1.2.26
@tarojs/plugin-babel: 1.2.26 => 1.2.26
@tarojs/plugin-csso: 1.2.26 => 1.2.26
@tarojs/plugin-sass: 1.2.26 => 1.2.26
@tarojs/plugin-uglifyjs: 1.2.26 => 1.2.26
@tarojs/router: 1.2.26 => 1.2.26
@tarojs/taro: 1.2.26 => 1.2.26
@tarojs/taro-alipay: 1.2.26 => 1.2.26
@tarojs/taro-h5: 1.2.26 => 1.2.26
@tarojs/taro-swan: 1.2.26 => 1.2.26
@tarojs/taro-tt: 1.2.26 => 1.2.26
@tarojs/taro-weapp: 1.2.26 => 1.2.26
@tarojs/webpack-runner: 1.2.26 => 1.2.26
eslint-config-taro: 1.2.26 => 1.2.26
eslint-plugin-taro: 1.2.26 => 1.2.26
nervjs: 1.3.12 => 1.3.12
补充信息

@taro-bot
Copy link

taro-bot bot commented Apr 17, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Apr 17, 2019

CC @Chen-jj

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 17, 2019

@wnuoer 贴一下代码,应该修复了

@leeviok
Copy link
Contributor

leeviok commented Apr 19, 2019

现在我们也遇到了这个问题,1.2.26版本
微信截图_20190419105927
微信截图_20190419110008

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 19, 2019

@leeviok 支付宝使用 mobx 引起的报错这位老哥已经修了:556c31f,可以升级到 v1.2.27-beta.0 再试试。

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 25, 2019

@wnuoer 如果是因为你的组件继承了基类后报错,请记得传递参数给 Taro.component。

image

如果还有问题就提供一下代码吧,我这边复现不了。

@Chen-jj Chen-jj closed this as completed Apr 25, 2019
@qiliangya
Copy link

出现了相同的错误, 在支付宝小程序。 版本也是1.2.26, 而且并未使用mobx

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 28, 2019

@qiliangya 继承了基类?列一下代码?

@qiliangya
Copy link

是按照实践, 写的装饰器。

// descript.js
export const withIndexDescription = mapStateProps => {
  return function indexDescriptionComponent (Component) {
    return class indexDescription extends Component {
      constructor (props) {
        super (props)
        this.__control = {
        
        } 
      }
  ......

// index.js
@withIndexDescription();
class Index extends Component{ ... }

把这个代码注释之后就不会那个错误, 在H5端和微信端没有出现问题

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 28, 2019

@qiliangya 上面我已经截图了。。

constructor () {
  super (...arguments)
}

@qiliangya
Copy link

@Chen-jj 抱歉~ 现在好了

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

No branches or pull requests

5 participants