首页 > 解决方案 > Dart 1.4.2 不支持新的 chrome 版本

问题描述

我们在 dart 版本 1.4.2 上开发了一个应用,并有一个 pubspec.yaml 如下配置

dependencies:
  browser: any
  angular: 0.12.0
  angular_ui: ">=0.5.1 <0.6.0"
  logging: ">=0.9.1+1 <0.10.0"
  json_object: any
  js: 0.2.2

它在 chrome 版本 77.0.3865.120 上运行良好,但是当我升级 chrome 版本时,dart 无法正常工作或无法正常支持。它在 Web 开发人员工具控制台中生成以下错误。

"NullError: Cannot call "call" on null↵↵STACKTRACE:↵TypeError: Cannot read property 'call' of undefined↵  
  at qEj.cv.er (https://localhost/xxxx/secure/secure.dart.js:46593:70)↵   
  at ecJ.$6 https://localhost/xxxx/secure/secure.dart.js:6898:5)↵  
  at Wan.$1 (https://localhost/xxxx/secure/secure.dart.js:6887:5)↵  
  at dx.wh (https://localhost/xxxx/secure/secure.dart.js:59133:32)↵  
  at dx.h2 (https://localhost/xxxx/secure/secure.dart.js:59134:37)↵   
  at qo.ymM.Ix (https://localhost/xxxx/secure/secure.dart.js:58919:49)↵   
  at qo.ymM.y6 (https://localhost/xxxx/secure/secure.dart.js:58932:29)↵  
  at atm.$1 (https://localhost/xxxx/secure/secure.dart.js:5860:10)↵  
  at dart.bQ (https://localhost/xxxx/secure/secure.dart.js:17363:29)↵ 
  at Gv.Q.aN (https://localhost/xxxx/secure/secure.dart.js:2512:28)"

我还在图像之前和之后放置了它在 chrome 版本 77.0.3865.120 上的情况以及更新到新的 chrome 版本后的情况。

在此处输入图像描述

更新到新的 chrome 版本后

在此处输入图像描述

您可以看到网页上的翻译不再起作用,并且它按原样显示,我们在代码中。

标签: dartangular-dartdart-pub

解决方案


推荐阅读