Last Comment Bug 683280 - Workers: creating workers from 'localhost' or an IP address fails
: Workers: creating workers from 'localhost' or an IP address fails
Status: RESOLVED FIXED
[inbound][qa+][qa!:9]
: regression, verified-beta
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: x86 Mac OS X
: -- major (vote)
: mozilla9
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
:
Mentors:
: 682450 683722 702011 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-30 13:04 PDT by Irakli Gozalishvili [:irakli] [:gozala] [@gozala]
Modified: 2013-12-27 14:36 PST (History)
30 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
affected
-
fixed
fixed
unaffected


Attachments
Patch, v1 (12.32 KB, patch)
2011-09-01 12:48 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
jonas: review+
Details | Diff | Splinter Review
Patch for branches (9.45 KB, patch)
2011-10-14 10:19 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
bent.mozilla: review+
christian: approval‑mozilla‑beta+
akeybl: approval‑mozilla‑release-
Details | Diff | Splinter Review

Description Irakli Gozalishvili [:irakli] [:gozala] [@gozala] 2011-08-30 13:04:59 PDT
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")
Comment 1 Boris Zbarsky [:bz] 2011-08-30 13:11:45 PDT
For the localhost case, are you accessing the page via http://localhost, or via file:// ?
Comment 2 Irakli Gozalishvili [:irakli] [:gozala] [@gozala] 2011-08-30 13:29:28 PDT
(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/
Comment 3 Boris Zbarsky [:bz] 2011-08-30 13:46:49 PDT
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?
Comment 4 Boris Zbarsky [:bz] 2011-08-30 13:47:06 PDT
And is this a problem on the beta channel?
Comment 5 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-30 14:33:10 PDT
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.
Comment 6 Boris Zbarsky [:bz] 2011-08-31 14:58:41 PDT
Could we just check for NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS and do something sane with it?
Comment 7 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-31 15:32:28 PDT
Sure. Maybe we should just try to reuse ThirdPartyUtil::GetBaseDomain, it seems much better.
Comment 8 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-31 15:37:43 PDT
*** Bug 683722 has been marked as a duplicate of this bug. ***
Comment 9 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-08-31 15:38:24 PDT
Alon, see comment 7?
Comment 10 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-09-01 12:48:18 PDT
Created attachment 557615 [details] [diff] [review]
Patch, v1
Comment 11 Boris Zbarsky [:bz] 2011-09-01 18:26:50 PDT
*** Bug 682450 has been marked as a duplicate of this bug. ***
Comment 12 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-09-08 17:27:14 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/cfdf675266b2
Comment 13 :Ehsan Akhgari 2011-09-08 19:06:45 PDT
Backed out as part of <http://hg.mozilla.org/integration/mozilla-inbound/rev/cc0753a23f8b> because of mochitest-3 crashes like this: <https://tbpl.mozilla.org/php/getParsedLog.php?id=6340142&full=1>
Comment 14 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-09-14 07:56:43 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/307b5fa030fd
Comment 15 Phil Ringnalda (:philor, back in August) 2011-09-14 09:12:06 PDT
Better, this time it was just test_ipAddressOrigin.html timing out. Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/70411e3adb66
Comment 16 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-10-13 14:47:26 PDT
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
Comment 17 Ed Morley [:emorley] 2011-10-14 03:50:50 PDT
https://hg.mozilla.org/mozilla-central/rev/756d9bfae05d
Comment 18 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-10-14 10:19:16 PDT
Created attachment 567130 [details] [diff] [review]
Patch for branches

This is the patch for branches (simply adds a new interface rather than bumping the existing iid).
Comment 19 Johnny Stenback (:jst, jst@mozilla.com) 2011-10-20 14:23:29 PDT
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.
Comment 20 christian 2011-10-25 21:40:59 PDT
---------------------------------[ 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.
Comment 21 Michael 2011-11-10 16:44:10 PST
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.
Comment 22 Jonas Sicking (:sicking) PTO Until July 5th 2011-11-10 16:46:49 PST
As things currently stand, this will get fixed in Firefox 10. Renominating based on your feedback.
Comment 23 Doron 2011-11-11 13:10:50 PST
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.
Comment 24 Pedro Alves 2011-11-11 13:17:51 PST
Also affects the embedded editors of cde.webdetails.org (what we use in the mozilla metrics team to build the dashboards)
Comment 25 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-11-11 13:18:17 PST
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.
Comment 26 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-11-11 13:20:37 PST
Comment on attachment 567130 [details] [diff] [review]
Patch for branches

/me sets the flags he meant to set.
Comment 27 Josh Matthews [:jdm] 2011-11-12 07:34:26 PST
*** Bug 702011 has been marked as a duplicate of this bug. ***
Comment 28 Doron 2011-11-15 14:05:43 PST
will this fix be out in the next ff 8.0.1 version? 
or is it still expected in ff 10 ?
Comment 29 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-11-15 14:18:48 PST
I think it's going to be in Firefox 9 now.
Comment 30 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-11-15 14:38:09 PST
https://hg.mozilla.org/releases/mozilla-beta/rev/2e0d543637d3
Comment 31 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-11-15 14:41:58 PST
I'm going to assume that the approval-mozilla-release here was a mistake.  LegNeato isn't answering me on IRC :-/
Comment 32 Alex Keybl [:akeybl] 2011-11-15 15:18:49 PST
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 ?.
Comment 33 christian 2011-11-15 15:27:15 PST
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.
Comment 34 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-12-01 14:32:46 PST
Is this something QA can verify?
Comment 35 Ben Adida [:benadida] 2011-12-03 14:45:27 PST
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.
Comment 36 Michael 2011-12-03 20:05:56 PST
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/
Comment 37 Vlad [QA] 2011-12-14 05:41:25 PST
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.
Comment 38 Michael 2011-12-21 10:10:36 PST
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
Comment 39 Geo Mealer [:geo] -- This account is inactive after 2015-07-07 2011-12-30 13:02:14 PST
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.
Comment 40 Michael 2011-12-30 13:35:51 PST
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.
Comment 41 Vlad [QA] 2012-01-25 07:45:09 PST
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.

Note You need to log in before you can comment on or make changes to this bug.