angular.dart icon indicating copy to clipboard operation
angular.dart copied to clipboard

Travis failing: linked to support for relative URLs ?

Open vicb opened this issue 11 years ago • 7 comments

There is a Travis failure that seems to be linked to the recent PRs about resolving relative URLs.

Please not that the test pass even if a 404 is returned. Is this expected ?

@dsalsbury @chirayuk could you please take a look at this ?

vicb avatar Sep 09 '14 09:09 vicb

Also note those analyzer warnings:

Building angular_dart_example...
[Warning from _Serial on angular_dart_example|web/form.dart]:
line 5, column 1 of web/form.dart: Unable to find form_controller.html at angular_dart_example|form_controller.html
@Component(
^^^^^^^^^^^
[Warning from _Serial on angular_dart_example|web/bouncing_balls.dart]:
line 31, column 1 of web/bouncing_balls.dart: Unable to find bouncing_controller.html at angular_dart_example|bouncing_controller.html
@Component(
^^^^^^^^^^^

vicb avatar Sep 10 '14 11:09 vicb

The failures seem to be linked to access body then I suspect the following code:

HtmlDocument document = new DomParser().parseFromString(
"<!doctype html><html><body>$html</body></html>", "text/html");

I someone with a a Mac and Safari could take a look, it would really help, Thanks.

Edit: the reported error is "NullError: Cannot call "get$body" on null"

vicb avatar Sep 10 '14 19:09 vicb

@vicb: For the 404, that is expected.  It's because we're using an img tag for the test and the browsers aggressively request the resource right away.  We only care about the resolved URL so it's ok if the image doesn't exist.  Perhaps we could stick in a 0 byte image there to get rid of the error.

For the NullError – this is a new one.  I'll take a look.

chirayuk avatar Sep 12 '14 04:09 chirayuk

@vicb:  It turns out that Safari's DOMParser does not parse HTML (but does parse XML, etc.)  It seems to be the only mainstream desktop browser that can't do this.  I'm working on a fix.

chirayuk avatar Sep 12 '14 06:09 chirayuk

@chirayuk thanks for the fix

vicb avatar Sep 15 '14 07:09 vicb

@chirayuk re-opening this, the analyzer warnings are not fixed (see the first comment after the headline). This force us to have html files listed in the pubspec

vicb avatar Sep 15 '14 15:09 vicb

This should be resolved by the fix in https://github.com/angular/angular.dart/issues/1455 when done.

naomiblack avatar Oct 02 '14 22:10 naomiblack