Closed Bug 683280 Opened 13 years ago Closed 13 years ago

Workers: creating workers from 'localhost' or an IP address fails

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla9
Tracking Status
firefox8 - affected
firefox9 - fixed
firefox10 --- fixed
firefox11 --- unaffected

People

(Reporter: irakli, Assigned: bent.mozilla)

References

Details

(Keywords: regression, verified-beta, Whiteboard: [inbound][qa+][qa!:9])

Attachments

(2 files)

Any attempts to create a worker from localhost: new Worker("http://localhost/~gozala/Projects/ace/ace/lib/ace/worker/worker.js") new Worker("/~gozala/Projects/ace/ace/lib/ace/worker/worker.js") new Worker("./worker/worker.js") fails with errors: [22:01:08.724] Error: Could not get domain! Both on latest Aurora and Nightly. Also same code works with FF 6.0 What's also interesting is that this issue does not seems to happen if page is accessed via http://jarti.lan/~gozala/Projects/ace/ace/ instead in which case worker URL is: new Worker("http://jarti.lan/~gozala/Projects/ace/ace/lib/ace/worker/worker.js")
For the localhost case, are you accessing the page via http://localhost, or via file:// ?
(In reply to Boris Zbarsky (:bz) from comment #1) > For the localhost case, are you accessing the page via http://localhost, or > via file:// ? localhost it's http://localhost/~gozala/Projects/ace/ace/
Looks like WorkerPrivate::Create tries to do something with the tld service.. which presumably fails for localhost. Ben, what's that code trying to do?
And is this a problem on the beta channel?
We try to limit the number of workers per domain, apparently TLDService doesn't support localhost so we'll just need to add another special case I guess.
Could we just check for NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS and do something sane with it?
Sure. Maybe we should just try to reuse ThirdPartyUtil::GetBaseDomain, it seems much better.
Summary: creating workers from localhost throws errors → Workers: creating workers from 'localhost' or an IP address fails
Attached patch Patch, v1Splinter Review
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #557615 - Flags: review?(jonas)
Whiteboard: [inbound]
Better, this time it was just test_ipAddressOrigin.html timing out. Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/70411e3adb66
Whiteboard: [inbound]
There's some problem with using 127.0.0.1 on linux in our test setup... Other OS seem fine. Not sure what's going on, we'll need to investigate more. For now, checked into inbound without the test: https://hg.mozilla.org/integration/mozilla-inbound/rev/756d9bfae05d
OS: Mac OS X → Windows Mobile 6 Professional
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
Version: Trunk → Other Branch
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
OS: Windows Mobile 6 Professional → Mac OS X
Resolution: --- → FIXED
Target Milestone: mozilla9 → mozilla10
Version: Other Branch → Trunk
This is the patch for branches (simply adds a new interface rather than bumping the existing iid).
Attachment #567130 - Flags: review+
Attachment #567130 - Flags: approval-mozilla-beta?
Attachment #567130 - Flags: approval-mozilla-aurora?
Comment on attachment 567130 [details] [diff] [review] Patch for branches Per todays triage meeting this doesn't seem like a large enough problem to take on branches. If we missed something, please renominate and state why this is important to fix now rather than a few weeks later.
Attachment #567130 - Flags: approval-mozilla-beta?
Attachment #567130 - Flags: approval-mozilla-beta-
Attachment #567130 - Flags: approval-mozilla-aurora?
Attachment #567130 - Flags: approval-mozilla-aurora-
---------------------------------[ Triage Comment ]--------------------------------- Though it is a regression the problem seems small and generally not web facing. We will not track this for a specific Firefox version. The patch appears to have landed on mozilla-central/Firefox 10 in any case.
WaveMaker studio is a development environment that runs on localhost and uses the ACE Editor (ace.ajax.org) which uses workers. All of our users who use FireFox were automatically upgraded from a version where the development environment worked to one where it did not (Ok, it works, but with a crippled editor). We are now able to provide a significantly better user experience to developers using Chrome than FireFox because of this issue. I'd appreciate any information on which version of FireFox this fix will be available for; I'm going to have to post to my user community telling them NOT to upgrade to FireFox 8, and I'm sure they'd appreciate knowing how long they're going to be fighting against your automatic upgrade system.
As things currently stand, this will get fixed in Firefox 10. Renominating based on your feedback.
Stepwells web based application is relying on the use of local web workers. this bug caused us a lot of trouble, we needed to change our entire application design and tell our users to downgrade from firefox 8, or force them to use Chrome. we are eagerly awaiting response on this issue and when will it be fixed.
Also affects the embedded editors of cde.webdetails.org (what we use in the mozilla metrics team to build the dashboards)
We've got reports of multiple broken apps here ... and we're considering taking the fix for blob URI works for 8.0.1, so we should probably consider this too.
Attachment #567130 - Flags: approval-mozilla-beta?
Attachment #567130 - Flags: approval-mozilla-beta-
Attachment #567130 - Flags: approval-mozilla-aurora?
Attachment #567130 - Flags: approval-mozilla-aurora-
Comment on attachment 567130 [details] [diff] [review] Patch for branches /me sets the flags he meant to set.
Attachment #567130 - Flags: approval-mozilla-aurora? → approval-mozilla-release?
Attachment #567130 - Flags: approval-mozilla-release?
Attachment #567130 - Flags: approval-mozilla-release+
Attachment #567130 - Flags: approval-mozilla-beta?
Attachment #567130 - Flags: approval-mozilla-beta+
will this fix be out in the next ff 8.0.1 version? or is it still expected in ff 10 ?
I think it's going to be in Firefox 9 now.
I'm going to assume that the approval-mozilla-release here was a mistake. LegNeato isn't answering me on IRC :-/
Comment on attachment 567130 [details] [diff] [review] Patch for branches That's a safe assumption - we don't know whether we're re-spinning so denying for approval-mozilla-release for now, but will leave the FF8 tracking flag as ?.
Attachment #567130 - Flags: approval-mozilla-release+ → approval-mozilla-release-
We're watching this closely but for now it did not make 8.0.1. If other issues crop up we will consider this as a ride-along now that the extent of the problem is greater than previously thought. We are building Firefox 9 beta 2 today and by the end of the week it should be on the beta channel. You can point users to that if you'd like. It should be fixed in Fx 9 proper, due December 20th.
Is this something QA can verify?
Whiteboard: [inbound] → [inbound][qa?]
FYI: I'm seeing this error when using http://127.0.0.1 on FF8.0 on Ubuntu Linux, so I'm not sure there's a reasonable path to test WebWorkers on a local machine, short of /etc/hosts, which is kind of unfortunate.
If you just need something to test, WaveMaker is a free download; will take a few minutes to install its dependencies (also free). To test the webworkers, you can open a new project, click the source tab, and you'll see the ACE editor running with its javascript-worker either running or failing to run. Everything is open source. http://wavemaker.com/downloads/
Target Milestone: mozilla10 → mozilla9
Whiteboard: [inbound][qa?] → [inbound][qa+]
Setting resolution to Verified fixed on: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0 I've followed the steps from comment36 and everything works as expected. No errors.
Keywords: verified-beta
Whiteboard: [inbound][qa+] → [inbound][qa+][qa!:9]
I have verified that this now works for me; testing the ACE editor's javascript validation worker running on localhost (using the above posted wavemaker application) Thank you for fixing this! Michael
Can we get specific steps to reproduce on this? I tried Wavemaker in Mac Fx 8.0.1, and did get a couple of domain errors similar to Comment 0. However, I got them on the initial load of Wavemaker, and had no further errors creating projects or going to the source pane, nor did I see any app misbehavior (to the extent I understand the app). I did not get these errors in 10.0b2, which I suspect means we're good. However, until I understand exactly where the errors are supposed to appear I do not want to mark it this verified.
1. Visual errors as seen within the application: you should be able to mess up your javascript and webworkers will flag that there are problems with validating javascript by putting red "x" in the left column; the following code has a comma missing and should show a red "x": dojo.declare("Main", wm.Page, { start: function() { try { } catch(e) { app.toastError(this.name + ".start() Failed: " + e.toString()); } } _end: 0 }); 2. Console errors: I don't have FF 8 running so I can't confirm the errors you should be seeing, but another way to look at this from the console is to type in: new Worker("/wavemaker/app/lib/ace/worker-javascript.js") and see what happens.
Hi Geo. Have you found any new errors? I was testing this on Firefox 10b6 on MacOSX 10.6.8 and I got the following error "Error: not well-formed Source File: http://localhost:8094/wavemaker/lib/build/Gzipped/lib_build.js Line: 1, Column: 1 Source Code: /*" (In reply to Geo Mealer [:geo] from comment #39) > Can we get specific steps to reproduce on this? > > I tried Wavemaker in Mac Fx 8.0.1, and did get a couple of domain errors > similar to Comment 0. However, I got them on the initial load of Wavemaker, > and had no further errors creating projects or going to the source pane, nor > did I see any app misbehavior (to the extent I understand the app). > > I did not get these errors in 10.0b2, which I suspect means we're good. > However, until I understand exactly where the errors are supposed to appear > I do not want to mark it this verified.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: