来自dart2js的代码正在为get$函数抛出NoSuchMethodErrors

来自dart2js的代码正在为get$函数抛出NoSuchMethodErrors,dart,dart-polymer,Dart,Dart Polymer,我的Polymer.dart web应用程序在Dartium中运行良好,当使用dart2js使用pub build--mode=debug编译并加载到Chrome中时,会出现以下错误(重复七次) Resource interpreted as Script but transferred with MIME type text/plain: "http://confab.dev/index.html_bootstrap.dart". confab.dev/:10 warning: file://

我的Polymer.dart web应用程序在Dartium中运行良好,当使用dart2js使用
pub build--mode=debug
编译并加载到Chrome中时,会出现以下错误(重复七次)

Resource interpreted as Script but transferred with MIME type text/plain: "http://confab.dev/index.html_bootstrap.dart". confab.dev/:10
warning: file:///home/dan/projects/confabulous/webatara/web/index.html.0.dart library not found index.html_bootstrap.dart.js:17188
Uncaught Error: NoSuchMethodError: Cannot call "get$functions" on "#<JsLibraryMirror>" (Object #<JsLibraryMirror> has no method 'get$functions') index.html_bootstrap.dart.js:17188
Stack Trace: 
TypeError: Object #<JsLibraryMirror> has no method 'get$functions'
    at dart._loadLibrary (http://confab.dev/index.html_bootstrap.dart.js:20000:19)
    at dart._loadLibraries (http://confab.dev/index.html_bootstrap.dart.js:19917:11)
    at dart._initPolymerOptimized (http://confab.dev/index.html_bootstrap.dart.js:19908:7)
    at dart.initPolymer (http://confab.dev/index.html_bootstrap.dart.js:19902:7)
    at main (http://confab.dev/index.html_bootstrap.dart.js:4112:7)
    at _IsolateContext.eval$1 (http://confab.dev/index.html_bootstrap.dart.js:1369:23)
    at dart.startRootIsolate (http://confab.dev/index.html_bootstrap.dart.js:1145:21)
    at http://confab.dev/index.html_bootstrap.dart.js:26514:7
    at init.currentScript (http://confab.dev/index.html_bootstrap.dart.js:26494:5)
    at http://confab.dev/index.html_bootstrap.dart.js:26508:3
 index.html_bootstrap.dart.js:17188
Uncaught NoSuchMethodError: Cannot call "get$functions" on "#<JsLibraryMirror>" (Object #<JsLibraryMirror> has no method 'get$functions') index.html_bootstrap.dart.js:2369
资源解释为脚本,但使用MIME类型text/plain传输:http://confab.dev/index.html_bootstrap.dart". confab.dev/:10
警告:file:///home/dan/projects/confabulous/webatara/web/index.html.0.dart 找不到库index.html_bootstrap.dart.js:17188
未捕获错误:NoSuchMethodError:无法在“#”(对象没有方法“获取$functions”)index.html_bootstrap.dart.js:17188上调用“获取$functions”
堆栈跟踪:
TypeError:对象#没有“获取$functions”方法
在dart.\u loadLibrary(http://confab.dev/index.html_bootstrap.dart.js:20000:19)
在dart.\u加载库(http://confab.dev/index.html_bootstrap.dart.js:19917:11)
在省道处.\u初始聚合优化(http://confab.dev/index.html_bootstrap.dart.js:19908:7)
在dart.INIT(http://confab.dev/index.html_bootstrap.dart.js:19902:7)
大体上(http://confab.dev/index.html_bootstrap.dart.js:4112:7)
at_IsolateContext.eval$1(http://confab.dev/index.html_bootstrap.dart.js:1369:23)
在省道处呈星形(http://confab.dev/index.html_bootstrap.dart.js:1145:21)
在http://confab.dev/index.html_bootstrap.dart.js:26514:7
在init.currentScript(http://confab.dev/index.html_bootstrap.dart.js:26494:5)
在http://confab.dev/index.html_bootstrap.dart.js:26508:3
index.html_bootstrap.dart.js:17188
未捕获的NoSuchMethodError:无法在“#”(对象没有方法“get$functions”)index.html_bootstrap.dart.js:2369上调用“get$functions”
因为源地图似乎不起作用(它们在Chrome中打开,我有.map文件),所以我甚至不知道我的代码的哪一部分导致了这种情况


我试过在dart.js之前和之后都包含interop.js,dart.js说。

看起来像是dart2js中的一个bug。请提交一个问题,最好是一个可复制的测试用例。

pub-upgrade
修复了它。结果是有什么东西用0.8.10+4取代了我一直使用的聚合物0.9.5。很奇怪。解决方法是将聚合物版本设置为“>=0.9.5”,而不是“any”,我最终会这样做,但现在我想看看它是否会再次发生。

您使用镜像吗?您使用的Dart/聚合物版本是什么?Sourcemaps有一些问题,您需要手动添加
/#sourceMappingURL=/path/to/file.js.map
(请参阅)我正在使用镜像,但自从我开始使用镜像以来,它一直在工作。Dart 1.2.0和Polymer 0.9.5。您是否使用一些特殊功能,如延迟库加载?不,我使用的唯一两个“特殊”功能是反射和JS互操作。但奇怪的是,我只是在使用这两种方法之前将我的回购协议回滚到,我仍然得到了同样的错误——我当时没有得到的错误。我从未见过这样的错误,Goole也没有带来有用的结果。我想你已经尝试过升级酒吧了吧?我认为你应该提交一个bug。