Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#14402 closed defect (fixed)

[regression] page loaded via file:// uses XHR for dojo.require() to CDN, should use script-io

Reported by: Ruth Lang Owned by: Rawld Gill
Priority: high Milestone: 1.8
Component: Loader Version: 1.7.0
Keywords: Cc:
Blocked By: Blocking:

Description

When starting a html file locally which includes PraseOnLoad?=true then Firefox brings an error "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)". The same file works fine with IE9 and Opera. and when using Dojo 1.6 it works well with Firefox too. I have attached two html files test_16.html and test_17.html.

Attachments (3)

test.zip (2.0 KB) - added by Ruth Lang 8 years ago.
test_17.html (813 bytes) - added by bill 8 years ago.
simplified (single file) test case
test_172..html (1.0 KB) - added by Ruth Lang 8 years ago.
test for Dojo 1.7.2

Download all attachments as: .zip

Change History (18)

Changed 8 years ago by Ruth Lang

Attachment: test.zip added

comment:1 Changed 8 years ago by bill

Component: GeneralLoader
Milestone: 1.7.1
Owner: set to Rawld Gill

When I change "dojo.js" to "dojo.js.uncompressed.js" I can see that it's trying to do a XHR to get TitlePane.js... so that's a bug, it should be trying to get it via script-io, since it's going to CDN, right?

A weird thing the test case is doing though is to pull in the file with the dojo.require() calls via a <script> tag. IIRC that's something that we've fixed since the 1.7.0 release, and will be in the 1.7.1 release.

Last edited 8 years ago by bill (previous) (diff)

comment:2 Changed 8 years ago by Kenneth G. Franqueiro

Owner: changed from Rawld Gill to Kenneth G. Franqueiro
Status: newassigned

According to Rawld, this should be fixed with the recent changes for other bugs such as #14394 or #13183.

I'll test this on a 1.7 branch build, but expect to not be able to reproduce it at this point.

comment:3 Changed 8 years ago by Kenneth G. Franqueiro

Cc: Rawld Gill added

I am actually unable to reproduce this with the attached files, even as-is against Google CDN 1.7.0. Even tried FF 3.6 for good measure.

Rawld, were you able to reproduce this with the attached files? If so, on what browser version?

comment:4 Changed 8 years ago by bill

This reproduced for me. Simply:

  1. download test.zip and unzip
  2. load file:///Users/bill/Downloads/test/test_17.html in firefox. Your path may vary but be sure to use file://
  3. check firebug console

I reproduced on mac.

Last edited 8 years ago by bill (previous) (diff)

comment:5 Changed 8 years ago by bill

Summary: NS_ERROR_FAILURE when using ParseOnLoadpage loaded via file:// uses XHR for dojo.require() to CDN, should use script-io

comment:6 Changed 8 years ago by Kenneth G. Franqueiro

Cc: Rawld Gill removed
Owner: changed from Kenneth G. Franqueiro to Rawld Gill
Status: assignednew

Oops, I should have interpreted this as meaning using file URL. Yes, I can reproduce it against Google CDN, and can still reproduce it against a build with the latest 1.7 branch files. Looks like this is not resolved with the other fixes that have gone in.

Rawld, I guess this is still hitting the sync code path for some reason. Given that we generally discourage people from running scripts from file:// URLs anyway, I'm not sure how high-priority this should be, but the test case makes it evident that it worked with 1.6 and doesn't with 1.7. Any idea how tough this would be to track down?

Changed 8 years ago by bill

Attachment: test_17.html added

simplified (single file) test case

comment:7 Changed 8 years ago by bill

Summary: page loaded via file:// uses XHR for dojo.require() to CDN, should use script-io[regression] page loaded via file:// uses XHR for dojo.require() to CDN, should use script-io

comment:8 Changed 8 years ago by bill

Milestone: 1.7.11.7.2

These didn't make it into the 1.7.1RC, so bumping them to 1.7.2 (as stated in the email I sent yesterday).

comment:9 Changed 8 years ago by Rawld Gill

Status: newassigned

comment:10 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

This problem has the same root cause as indicated in #14459 and was repaired in [27763]; see http://trac.dojotoolkit.org/ticket/14459#comment:7 for details.

test_17.html works against a dojo built with cdnBuild.sh and simulating xdomain (after 27763).

Thanks for the test bill!

comment:11 Changed 8 years ago by Ruth Lang

Problem still exists with 1.7.2 and CDN

Changed 8 years ago by Ruth Lang

Attachment: test_172..html added

test for Dojo 1.7.2

comment:12 Changed 8 years ago by bill

Milestone: 1.7.2tbd
Resolution: fixed
Status: closedreopened

I tried file:///Users/bill/Downloads/test_172..html (your path may vary but use file://), and it's grabbing TitlePane.html via XHR, so still seems broken to me too.

comment:13 Changed 8 years ago by Rawld Gill

Status: reopenedassigned

comment:14 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [28422]:

removed assumption that page loaded via file protocol resulted in no xd requests; fixes #14402; !strict

comment:15 Changed 7 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.