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

Dartium bleeding edge exception #24494

Closed
zoechi opened this issue Oct 4, 2015 · 23 comments
Closed

Dartium bleeding edge exception #24494

zoechi opened this issue Oct 4, 2015 · 23 comments
Assignees
Milestone

Comments

@zoechi
Copy link
Contributor

zoechi commented Oct 4, 2015

Observatory listening at http://127.0.0.1:60914/
constructor != null && jsTypeName.length > 0
#0 debug_or_assert (dart:html:1256)

1 wrap_jso (dart:html:1182)

2 MutationObserver._create (dart:html:27264)

3 MutationObserver.MutationObserver._ (dart:html:27227)

4 MutationObserver.MutationObserver (dart:html:27326)

5 _ScheduleImmediateHelper._ScheduleImmediateHelper. (dart:html:48747)

6 _RootZone.run (dart:async/zone.dart:1160)

7 _ScheduleImmediateHelper._ScheduleImmediateHelper (dart:html:48744)

8 _scheduleImmediateHelper (dart:html:48770)

9 _scheduleImmediateHelper (dart:html:48769)

10 _scheduleImmediateClosure. (dart:html:48773)

11 _AsyncRun._scheduleImmediate (dart:async-patch/schedule_microtask_patch.dart:10)

12 _scheduleAsyncCallback (dart:async/schedule_microtask.dart:73)

13 _rootScheduleMicrotask (dart:async/zone.dart:957)

14 scheduleMicrotask (dart:async/schedule_microtask.dart:138)

15 Future.Future.microtask (dart:async/future.dart:142)

16 main (http://localhost:63342/polymer1/auto_binding_element/web/index_reflectable_original_main.dart)

17 main (http://localhost:63342/polymer1/auto_binding_element/web/index.dart:26:10)

18 main (http://localhost:63342/polymer1/auto_binding_element/web/index.bootstrap.dart:5:11)

19 main (http://localhost:63342/polymer1/auto_binding_element/web/index.bootstrap.initialize.dart:30:10)

index_reflectable_original_main.dart:1 Exception: The null object does not have a method 'observe'.

NoSuchMethodError: method not found: 'observe'
Receiver: null
Arguments: [Instance of 'DivElement', attributes: true]
main index_reflectable_original_main.dart:1
main index.dart:29
main index.bootstrap.dart:5
main index.bootstrap.initialize.dart:36 main

I had this issue with this Polymer 1.0.0-rc.2 example https://github.com/bwu-dart-playground/polymer1/tree/master/auto_binding_element
When I switched back to Dart VM version: 1.13.0-edge.33b037125fbf5e8319a99fd5e5700441c921efde (Mon Sep 14 18:13:24 2015) on "linux_x64" the example was working fine.

Are interested in such bug reports at this time?

@kevmoo kevmoo added this to the 1.13 milestone Oct 5, 2015
@alan-knight
Copy link
Contributor

We are interested, but can you try it again. There was a check-in this morning that fixes a number of polymer issues.

@alan-knight
Copy link
Contributor

Although maybe not right away, unless you're compiling it yourself. I don't think the bleeding edge version has even built yet for all platforms.

@zoechi
Copy link
Contributor Author

zoechi commented Oct 5, 2015

Grat, I'll try it again, but I don't know yet when I'll have time, could be that's not before friday.

@zoechi
Copy link
Contributor Author

zoechi commented Oct 6, 2015

I still get the same exception with Dartium from
http://gsdview.appspot.com/dart-archive/channels/be/raw/latest/dartium/
1.13.0-edge.8e523195e66f97727bd299ff2477c61f337f3184
Linux x64

@zoechi
Copy link
Contributor Author

zoechi commented Oct 14, 2015

Update - my current exception looks a bit different:

chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js Failed to load resource: net::ERR_FAILED
2015-10-14 10:41:01.928chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js Failed to load resource: net::ERR_FAILED
2015-10-14 10:41:05.680index.html:1 Observatory listening at http://127.0.0.1:38508/
2015-10-14 10:41:07.210index_reflectable_original_main.dart:1 Exception: type 'JsObjectImpl' is not a subtype of type 'MutationObserver' of 'function result'.index_reflectable_original_main.dart:1 mainindex.dart:172 mainindex.bootstrap.dart:5 mainindex.bootstrap.initialize.dart:782 main

Dart VM version:
Dartium: 1.13.0-edge.bb3060aa5940dbdaf4c21da63a7f66b65f7f5b2f
Dart: 1.13.0-edge.06c3e1ae72d8ef35b150291dfbada839a4247111 (Tue Oct 13 16:09:38 2015) on "linux_x64"
(from the latest folder)

@mit-mit
Copy link
Member

mit-mit commented Oct 14, 2015

Current thinking is that we need a new Chrome roll of Dartium to resolve this. That roll is scheduled for 1.14 -- see #24218 -- so moving this to 1.14 also.

@mit-mit mit-mit modified the milestones: 1.14, 1.13 Oct 14, 2015
@zoechi
Copy link
Contributor Author

zoechi commented Oct 22, 2015

This seems fixed after the last update (Dartium 1.13.0-edge.f3f358e5f38829f3284d7f922f2393d0803115dd)

@dgrove
Copy link
Contributor

dgrove commented Oct 22, 2015

great!

@dgrove dgrove closed this as completed Oct 22, 2015
@zoechi
Copy link
Contributor Author

zoechi commented Oct 28, 2015

Since the bleeding edge update id did yesterday, it got it back:

Observatory listening at http://127.0.0.1:45021/
Exception: type 'JsObjectImpl' is not a subtype of type 'MutationObserver' of 'function result'.
main

Dartium:

1.13.0-edge.0a341e97905086356163314798ebf5874673b519

@alan-knight
Copy link
Contributor

I don't think that's the same as your original symptom. Do you have any more details about the circumstances?

@alan-knight alan-knight reopened this Oct 28, 2015
@zoechi
Copy link
Contributor Author

zoechi commented Oct 28, 2015

Right, it's not like the original, but the same or similar to the one mentioned in the comment #24494 (comment)

The circumstances when I get the exception are the same though.

I get this exception in every Polymer 1.0.0-rc application.
Here is a very simple example https://github.com/bwu-dart-playground/polymer1/tree/master/click_this

@zoechi
Copy link
Contributor Author

zoechi commented Oct 28, 2015

I get the exception while the entry page (index.html) is loaded, after some delay, but before I do any user action. It looks like Polymer initialization is failing.

@dgrove
Copy link
Contributor

dgrove commented Oct 28, 2015

/cc @jakemac53

@zoechi
Copy link
Contributor Author

zoechi commented Oct 28, 2015

If I revert to an older Dartium version

1.13.0-edge.f3f358e5f38829f3284d7f922f2393d0803115dd

it works fine.

@alan-knight
Copy link
Contributor

The click_this example is working for me in that exact version, as well as in the tip of bleeding edge. I tried both building it myself on Linux and downloading the Mac version, and both were fine.

@zoechi
Copy link
Contributor Author

zoechi commented Oct 29, 2015

I updated again to bleeding edge latest

Dartium

1.13.0-edge.2529e684f0f5080958941a3baf6414a27a7869a7

VM:

Dart VM version: 1.13.0-edge.0172094a500e0043fadc50df3042ad345f4ec904 (Thu Oct 29 02:00:29 2015) on "linux_x64"

The click_this example fails

Exception: type 'JsObjectImpl' is not a subtype of type 'MutationObserver' of 'function result'.
index_reflectable_original_main.dart:1
mainindex.dart:28
mainindex.bootstrap.dart:5
mainindex.bootstrap.initialize.dart:33
main

After reverting Dartium to

Dart 1.13.0-edge.f3f358e5f38829f3284d7f922f2393d0803115dd

the example works again.

I have no idea what additional information I could provide to make this reproducible.

@alan-knight
Copy link
Contributor

Can you try putting a breakpoint on MutationObserver._create (line 27341 in html_dartium.dart in the current BE) and see what's happening in the wrap_jso call at the end. Presumably that's where you're getting a JsObjectImpl and not the corresponding Dart object.

I'm suspicious there's something strange in your setup, because having all polymer initializations fail is something that we'd probably hear about pretty quickly.

@zoechi
Copy link
Contributor Author

zoechi commented Oct 30, 2015

Dartium

1.13.0-edge.d1e01e205a615257ba9391cb531ad8b053af1fed

without wrap_jso(...)
image
with wrap_jso(...)
image

Dartium

1.13.0-edge.f3f358e5f38829f3284d7f922f2393d0803115dd

Shows different code and this one works

image

@alan-knight
Copy link
Contributor

OK, so the reason it's not getting wrapped is that the thing you're getting back is not [object MutationObserver], but looks like something wrapping a MutationObserver. The field _creationZone does not, as far as I can tell, exist anywhere in the Dart SDK or in Dartium. A quick google search shows something like that in Angular2. Is it possible you've got something from
Angular2 or elsewhere that's monkey-patching MutationObserver?

@zoechi
Copy link
Contributor Author

zoechi commented Oct 30, 2015

Nothing from Angular, just Polymer. Maybe @jakemac53 has any idea?

@alan-knight
Copy link
Contributor

I'm pretty sure it's the Polymer DevTools extension. That explicitly has code that monkey-patches system constructors to add that _creationZone field and replaces them with an unnamed function. Dartium relies on the constructor name when wrapping.

@zoechi
Copy link
Contributor Author

zoechi commented Oct 30, 2015

You are right.
I wasn't aware I had an extension installed, I forgot they are kept, even when Dartium is re-installed and never used it.
Anything that should be done about it? Create a bug report for the Polymer DevTools extension?
Otherwise you can close the issue.
Thanks a lot for figuring that out.

@alan-knight
Copy link
Contributor

Great. Filed #24776 and angular/zone.js#197

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

6 participants