web workers not working in firefox 8, works in firefox 7

1.5k Views Asked by At

I am using library called arbor.js(beautified). It contains the following line of code,

i = new Worker(<path to arbor.js>);

At this point an error is thrown, and the following message is reported in Firebug,

"Could not get domain!"

The line which gives this error is 258. The arbor_path() function on that line returns "js/", so effectively function called is i = new Worker("js/arbor.js").

This used to work perfectly in Firefox 7. Does anybody know how to solve it, or what the problem could be?

2

There are 2 best solutions below

1
On BEST ANSWER

You're running into https://bugzilla.mozilla.org/show_bug.cgi?id=683280

It'll be fixed in Firefox 9 in about a month....

0
On

I came across the same thing, however I only noticed the problem on one of my computers, and not the other (both running Firefox 8), so I started to explore a little bit. It turns out, the computer the workers were working on is using a subdomain of localhost (and modified HOSTS file). I just tested it out as simply as I could think of, just adding localhost.com to the HOSTS file, and accessing the site through that and the workers are doing ok with it. I didn't create any virtual hosts or directories, just mapped localhost.com to 127.0.0.1. If you are running on Windows (or otherwise can do the same kind of mapping) you might want to give that a try as a temporary solution.

Edit: In response to chinmayv's comment:
Something I noticed I have set in the HOSTS file is the IPv6 version of the local IP address, so there is both: ::1 localhost and 127.0.0.1 localhost, as well as the one to get the worker running on FF8 127.0.0.1 localhost.com.
I don't know why this would matter, however. I just did a fresh install of Apache, so I don't think there is any setting that could account for the difference in behavior. Are you still getting the 'Could not get domain!' error? Maybe there is an absolute URL in the script somewhere that is throwing it off?