简体   繁体   中英

Upgraded dart, now getting noSuchMethod exception in my Web UI autogenerated code

I just upgraded to Dart Editor 0.2.8_r15948 and now my code, which was working before I upgraded, is throwing the below exception when I try to run it in the dart browser. It looks like _e11 is an UnknownElement set from my template: < template iterate='pin in app.MainMap.Pins' >

Here is the error message that I get in Dartium Launch:

Exception: NoSuchMethodError : method not found: 'get:parentNode'
Receiver: Instance of 'UnknownElement'
Arguments: []
Stack Trace: #0      Element.noSuchMethod (file:///E:/b/build/slave/dartium-win-full-trunk/build/src/build/Release/obj/global_intermediate/webkit/bindings/dart/dart/html/Element.dart:317:7)
1      init_autogenerated.<anonymous closure> (http://127.0.0.1:3030/C:/Users/Jonathan/dart/MapWebComponent/web/out/MapWebComponent.dart:316:43)
2      watchAndInvoke (http://127.0.0.1:3030/C:/Users/Jonathan/dart/MapWebComponent/web/out/packages/web_ui/watcher.dart:114:13)
3      init_autogenerated (http://127.0.0.1:3030/C:/Users/Jonathan/dart/MapWebComponent/web/out/MapWebComponent.dart:283:47)
4      main (http://127.0.0.1:3030/C:/Users/Jonathan/dart/MapWebComponent/web/out/MapWebComponent.html_bootstrap.dart:7:30)

Any ideas about what is going on? I think it might be a bug because everything was working fine before upgrading to Dartium version 0.2.8_r15948

Please see my github issue and the responses that the devs gave me: https://github.com/dart-lang/web-ui/issues/263

Try pinning version 0.2.9 of web_ui.

We are preparing for another push of the SDK, so I uploaded version 0.2.10 to work with the latest trunk: which is at version 16102.

Some additional background information. Every time there is a new push in trunk, we prepare our package to be up to date, we do a new push to pub so we can test the release, and then we finally push the trunk release out.

Unfortunately during that time between our push to pub and the release, anyone using a dependency like web_ui: any that does a pub install or pub update, might get a package that is too new for their SDK.

Eventually we'll have a way to tell pub which version of the SDK is required for a particular version of our package (http://code.google.com/p/dart/issues/detail?id=6285), once that's possible, these kind of breaks should not happen anymore.

You can find more details about how to pin a particular version in the README.md. I just updated the CHANGELOG.md to mention which version of the SDK is required for version 0.2.10.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM