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

dart2js code interfere with Dart code run on Dartium #15642

Closed
DartBot opened this issue Dec 15, 2013 · 8 comments
Closed

dart2js code interfere with Dart code run on Dartium #15642

DartBot opened this issue Dec 15, 2013 · 8 comments
Labels
needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@DartBot
Copy link

DartBot commented Dec 15, 2013

This issue was originally filed by NawafNai...@gmail.com


What steps will reproduce the problem?

  1. Run as Javascript
  2. Run in Dartium

What is the expected output? What do you see instead?
I expect the app to load successfully. But, instead, it crashes.

Breaking on exception: The null object does not have a getter 'children'.
At this line:
querySelector('.jqte_toolbar').children.add(undoButton);

Removing dart2js code fixes the issed.

What version of the product are you using? On what operating system?
Ubuntu 13.10 64bit. Dart Editor version 1.0.0_r30188 (STABLE)
Dart SDK version 1.0.0.3_r30188

Please provide any additional information below.

@DartBot
Copy link
Author

DartBot commented Dec 15, 2013

This comment was originally written by Nawa...@gmail.com


You can see my code here: https://github.com/nawafnaim/wTutor

@floitschG
Copy link
Contributor

Could you please provide more information.

Normally it is not necessary to mix Dart and dart2js code. How does the code interfere?
Can you provide a minimal example?


Added Area-Dart2JS, NeedsInfo labels.

@DartBot
Copy link
Author

DartBot commented Dec 15, 2013

This comment was originally written by Nawa...@gmail.com


When I run my code as JavaScript, the newly generated js code causes issues when running normal dart code. One of the issues I am getting are null pointer expections like then one I've posted earlier. The issue is resolved by removing dart2js code from my web folder. Is it expected that I remove dart2js from my web folder?

@floitschG
Copy link
Contributor

Normally the dart2js generated files are never loaded into Dartium. The dart.js script only exchanges .dart files with .dart.js files, if it is not running inside of Dartium.

Are you loading both scripts into your page?

@DartBot
Copy link
Author

DartBot commented Dec 15, 2013

This comment was originally written by NawafNa...@gmail.com


I'm not loading any dart2js on my html file. But, after deleting dart2js, DartEditor report this error:

Failed to load resource: the server responded with a status of 404 (Not Found)
  http://127.0.0.1:3030/wTutor/web/wtutor_client.dart.js

@peter-ahe-google
Copy link
Contributor

This sounds more like an issue with Dartium or pkg/browser.


cc @vsmenon.
cc @blois.

@vsmenon
Copy link
Member

vsmenon commented Dec 16, 2013

You may have an out of date package/browser/dart.js. Can you first try running 'pub update'?

If that doesn't work, can you show us your copy of that file?

@DartBot
Copy link
Author

DartBot commented Dec 16, 2013

This comment was originally written by Nawa...@gmail.com


vsm. You're right. The issue was resolved after updating my packages. Thank you for your helpful answer.

@DartBot DartBot added Type-Defect web-dart2js needs-info We need additional information from the issue author (auto-closed after 14 days if no response) labels Dec 16, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

6 participants