-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Uncaught NullError: method not found: 'constructor' on null - js_helper.dart:1697 #24898
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
Comments
@MikeMitterer you're on 1.13.0-dev.7.10 right? |
Could you share the code with us or a way to run the app (e.g. if you host the generated js code somewhere) so we can reproduce it and investigate more closely? If not, one thing that could help us would be to give us a more detailed stack trace in JS. For example, Thanks! |
@kevmoo Yes. Sorry I can't give you this part of the source - it's part of my internal project but tomorrow I will try to split out this part... |
OK guys - took me quite a while to separate out all the necessary files but here is the sample: http://www.mikemitterer.at/fileadmin/_temp_/jsbug.tgz I also recorded my tests - check out this mp4: http://www.mikemitterer.at/fileadmin/_temp_/jsbug.mp4 BTW: Today the error message is a bit different: `Uncaught Value was missing for variable tag: device.uniqueID. (1:6) {{device.uniqueID}} `
I'm using this SKD version today: https://goo.gl/ZMh3AF (1.13.0-dev.7.11) My video also shows this bug: #24868 (12:02) It looks as if #24868 is my fault but as you can see it works in Chromium but fails in the JS-Version... (The double to int cast problem is already fixed in my internal master...) |
I found the problem - it was an Object not marked for mirrors. But as said before - for such cases it's really hard to find the problem. It's more or less try and error - no support from DevTools or Source-Maps... |
Mirrors is deprecated, isn't it? |
@MikeMitterer - I'm glad you were able to find the problem, thanks for keeping us updated! As @zoechi suggests, the ideal is to use something that can check that the object is available before we access it via mirrors. Reflectable is great for this - it declares explicitly what and how you use mirrors. It does it in a way that would prevent this kind of situations: if you can use it in dartium, it means it was included for dart2js to use as well. Are you using mirrors directly or through a framework like polymer or angular? |
I'm using it directly. Both of you - thanks for the answer. |
@zoechi I think it's not deprecated - I think reflectable uses it internally if it runs in the VM... |
@MikeMitterer |
After compiling my app to JS I get this exception/error.
The worst thing here is that I have no chance to find out where it comes from!
Here is the callstack:
I attache a SS so that you can see how it looks like in DevTools

(The 46 errors are just my _logger.error-messages!!!! not real errors)
The text was updated successfully, but these errors were encountered: