Re: [wtr-general] Firefox 3.5 compatible with FireWatir?

43 views
Skip to first unread message
Message has been deleted

Angrez Singh

unread,
Jul 1, 2009, 3:48:43 AM7/1/09
to watir-...@googlegroups.com
I tried that and got the same error .. firefox crashed a lot with the XPI. Let me see if new XPI is required

Thanks,
Angrez

On Tue, Jun 30, 2009 at 11:46 PM, George <george....@gmail.com> wrote:

Hi everyone,

Firefox 3.5 just came out today.  I tried opening a FF browser and got
the following error:

C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
container.rb:479:in `recv': An existing connection was forcibly closed
by the remote host. - recvfrom(2) (Errno::ECONNRESET)
       from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
container.rb:479:in `read_socket'
       from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
container.rb:478:in `each'
       from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
container.rb:478:in `read_socket'
       from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
firefox.rb:188:in `get_window_number'
       from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
firefox.rb:162:in `initialize'
       from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'
       from C:/Ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/
browser.rb:65:in `new'

Has anyone else had a chance to try the latest version of FF using
Watir?


Angrez Singh

unread,
Jul 1, 2009, 8:28:50 AM7/1/09
to watir-...@googlegroups.com
They both are based on different GECKO version one is on 1.9.0 and other on 1.9.1 so i think we need to compile the JSSH. Will post a new XPI soon.

- Angrez

George

unread,
Jul 1, 2009, 11:44:26 AM7/1/09
to Watir General
Thanks Angrez. I posted this yesterday but deleted it when I saw it
had something to do with the socket. I thought there was going to be
an update for the JSSH extension, but no luck.

On Jul 1, 5:28 am, Angrez Singh <ang...@gmail.com> wrote:
> They both are based on different GECKO version one is on 1.9.0 and other on
> 1.9.1 so i think we need to compile the JSSH. Will post a new XPI soon.
>
> - Angrez
>
>
>
> On Wed, Jul 1, 2009 at 1:18 PM, Angrez Singh <ang...@gmail.com> wrote:
> > I tried that and got the same error .. firefox crashed a lot with the XPI.
> > Let me see if new XPI is required
>
> > Thanks,
> > Angrez
>

Angrez Singh

unread,
Jul 3, 2009, 3:38:33 AM7/3/09
to watir-...@googlegroups.com
Can you try the attached XPI and see if it works. It works here for me. I am using Windows platform. All unittests ran fine except 1 error which i got in commonwatir test cases. I'll look into it. Let me know if the XPI works so that I can put it on a central place.

Thanks,
Angrez
jssh-20090703-WINNT.xpi

Gonza

unread,
Jul 3, 2009, 7:58:06 AM7/3/09
to Watir General
Works fine! After testing it for a while I can tell you It works! I've
several TCs, if any fails because jssh, I'll let you know.

Thanks,

Gonza

Angrez Singh

unread,
Jul 3, 2009, 8:44:11 AM7/3/09
to watir-...@googlegroups.com
Sure let me know where it fails

Felipe Knorr Kuhn

unread,
Jul 3, 2009, 9:15:56 AM7/3/09
to watir-...@googlegroups.com
Hello Angrez,

To build the XPI, do you have to go through the whole Firefox building process?

I've seen guides to build Firefox+JSSh, but I don't know if it creates the extension file separately or not :)

I could try to build it for Linux.

FK

Angrez Singh

unread,
Jul 6, 2009, 3:01:09 AM7/6/09
to watir-...@googlegroups.com
You need to build Firefox with the JSSh extension enabled. To create the XPI go to JSSh directory and say "make xpi" that will generate the XPI. The only problem with the generated XPI is that its format is compatible with only Firefox 1.5.x versions. We need to tweak the XPI (nothing but a zip file) a bit. Let me know if you need any help while compiling Firefox code.

Thanks,
Angrez

Hari

unread,
Jul 6, 2009, 5:27:26 AM7/6/09
to Watir General
Hi Angrez,

I'm trying to use the FireWatir for automating on Firefox 3.5 on Mac
OS X Leopard (Intel arch). The JSSh XPI I downloaded for Firefox 3.0
was from http://wiki.openqa.org/download/attachments/13893658/jssh-20080924-Darwin.xpi.

I tried to unpack the XPI and modify the <em:maxVersion> value to
3.*.* and repacked. This does not open the port 9997 when Firefox
launched as
# ./firefox-bin -jssh

I tried to download the Mozilla source for v3.5 and build with the
extension jssh. The built firefox-bin (available at ./fx-jssh/dist/
firefox/Shiretoko.app/Contents/MacOS/firefox-bin) solves the problem
but not completely. I'm expecting to have an XPI that could be
installed on a Firefox bundle that is available in the www.mozilla.com/firefox/

Steps I used to build the firefox are

1. Download tar ball from
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.5rc3/source/firefox-3.5rc3-source.tar.bz2

2. Install Xcode, MacPorts and ports for mercurial, libidl and
autoconf213.

3. Create .mozconfig file in the home directory with the contents
######### ~/.mozconfig #############
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/fx-jssh
mk_add_options MOZ_CO_PROJECT=browser,xulrunner
ac_add_options --enable-extensions=default,jssh
#ac_add_options --enable-debug --disable-optimize
#ac_add_options --enable-shared --disable-static
#ac_add_options --enable-static
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
mk_add_options MOZ_MAKE_FLAGS="-s -j4"

4. Compile the source
# cd mozilla; make -f client.mk build

Then I grabbed the libjssh.dylib from the newly built Firefox;
replaced it for the libjssh.dylib in the XPI that was working for
v3.0. Modify the max version tag in the install.rdf and repack it.

The newly packed XPI does not work for both Firefox 3.0 & 3.5. Could
you please help me over here and let me know if I have been doing
something wrong.

thanks,
Hari.

On Jul 6, 12:01 pm, Angrez Singh <ang...@gmail.com> wrote:
> You need to build Firefox with the JSSh extension enabled. To create the XPI
> go to JSSh directory and say "make xpi" that will generate the XPI. The only
> problem with the generated XPI is that its format is compatible with only
> Firefox 1.5.x versions. We need to tweak the XPI (nothing but a zip file) a
> bit. Let me know if you need any help while compiling Firefox code.
>
> Thanks,
> Angrez
>
> On Fri, Jul 3, 2009 at 6:45 PM, Felipe Knorr Kuhn <fkn...@gmail.com> wrote:
>
> > Hello Angrez,
>
> > To build the XPI, do you have to go through the whole Firefox building
> > process?
>
> > I've seen guides to build Firefox+JSSh, but I don't know if it creates the
> > extension file separately or not :)
>
> > I could try to build it for Linux.
>
> > FK
>
> > On Fri, Jul 3, 2009 at 9:44 AM, Angrez Singh <ang...@gmail.com> wrote:
>
> >> Sure let me know where it fails
>

Željko Filipin

unread,
Jul 6, 2009, 5:32:26 AM7/6/09
to watir-...@googlegroups.com
On Mon, Jul 6, 2009 at 11:27 AM, Hari <harid...@gmail.com> wrote:
> The newly packed XPI does not work for both Firefox 3.0 & 3.5.

As far as I remember we always had to have separate xpi for each Firefox version, so if it works with 3.5 only, that is fine.

Angrez Singh

unread,
Jul 6, 2009, 5:40:48 AM7/6/09
to watir-...@googlegroups.com
I think you should create the new xpi using "MAKE xpi" command in JSSH directory. After that you can unpack it and re-structure it like the one that is being used for 3.0. Make sure you don't replace any files just restructure the new XPI. It should work.

- Angrez

Haridharan Nattamai Gangadharan

unread,
Jul 6, 2009, 6:15:56 AM7/6/09
to watir-...@googlegroups.com
I tried to make the new XPI; but there were no make rules defined in the client.mk.  I tried to modify the debug flag details and it seems to be working fine now.

I'm able to use them on FireFox 3.5.  Could you suggest what are the basic necessary flags.

thanks,
Hari.

Angrez Singh

unread,
Jul 6, 2009, 7:23:07 AM7/6/09
to watir-...@googlegroups.com
First you need to do "make xpi" in the [build directory]/extensions/jssh directory. This will create xpi in the following directory:
[build directory]/dist.

I use the following .mozconfig file for building Firefox with JSSh on windows:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/fx35-jssh

ac_add_options --disable-installer
ac_add_options --disable-vista-sdk
ac_add_options --disable-vista-sdk-requirements
ac_add_options --enable-extensions=default,jssh
ac_add_options --disable-xpconnect-idispatch
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --disable-accessibility

Thanks,
Angrez

khaja shaik

unread,
Jul 7, 2009, 3:00:52 AM7/7/09
to watir-...@googlegroups.com
Hi everyone,
 
today i am running the my watir tests on Firefox browser and i got below mentioned error:
 
>ruby news1.rb
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:479:in `recv': An existing connection was forcibly closed by the remote host. - recvfrom(2) (Errno::ECONNRESET)
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:479:in `read_socket'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:478:in `each'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.rb:478:in `read_socket'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:188:in `get_window_number'
 from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:162:in `initialize'
 from news1.rb:7:in `new'
 from news1.rb:7
>Exit code: 1
Please can you please solve the problem for me
 
Thanks
Khaja shariff

Angrez Singh

unread,
Jul 7, 2009, 5:15:05 AM7/7/09
to watir-...@googlegroups.com
We are working on it.

Felipe Knorr Kuhn

unread,
Jul 8, 2009, 9:29:22 AM7/8/09
to watir-...@googlegroups.com
Hello Angrez,

What are these tweaks you mentioned?

I have successfully compiled Firefox but like you said, I can't use the generated XPI :)

Thanks,

FK

Angrez Singh

unread,
Jul 8, 2009, 2:05:46 PM7/8/09
to watir-...@googlegroups.com
The think is this the XPI that is generated can be installed only on Firefox 1.x as the format in which it is generated works only on that version. From version 2.x the format of the XPI has changed. You can try the following solution:

1. Unpack the XPI that works with Firefox 3.0.x and the newly created XPI for Firefox 3.5
2. Make sure the structure i.e. folder structure is same as that for 3.0.x XPI
3. Copy install.rdf file from 3.0.x XPI to 3.5 XPI. Open the file and change the max version to 3.5+
4. Zip the 3.5.x folder
5. Rename it to .xpi

Let me know if that works.

- Angrez

Felipe Knorr Kuhn

unread,
Jul 9, 2009, 9:43:45 AM7/9/09
to watir-...@googlegroups.com
Hello Angrez,

It worked :)

Thanks again.

FK
jssh-20090707-Linux.xpi

Al B.

unread,
Jul 9, 2009, 10:16:23 AM7/9/09
to Watir General
Hi Angrez,

I tried the steps in your July 8 post, using the XPI for Windows that
you posted on July 3, and got the following results when I tried to
run Firewatir:

C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/
firefox.rb:271:in `set_defaults': Unable to connect to machine :
127.0.0.1 on port 9997. Make sure
that JSSh is properly installed and Firefox is running with '-jssh'
option (Watir::Exception::UnableToStartJSShException)
from C:/Ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/
firewatir/firefox.rb:161:in `initialize'
from benchmark.rb:11:in `new'
from benchmark.rb:11

Also, I couldn't telnet to port 9997. I don't have a development
environment with which to build Firefox, so I'm stuck.

Please help!

Thanks,

Al B.
> >>>> On Fri, Jul 3, 2009 at 5:28 PM, Gonza <gonzalogte...@gmail.com> wrote:
>
> >>>>> Works fine! After testing it for a while I can tell you It works! I've
> >>>>> several TCs, if any fails because jssh, I'll let you know.
>
> >>>>> Thanks,
>
> >>>>> Gonza- Hide quoted text -
>
> - Show quoted text -

Angrez Singh

unread,
Jul 10, 2009, 2:50:36 AM7/10/09
to watir-...@googlegroups.com
Can you check event viewer/firefox error console to check if XPI has been installed correctly?

Al B.

unread,
Jul 10, 2009, 10:38:15 AM7/10/09
to Watir General
Hi Angrez. Thanks for getting back to me. The error console says:

Error: Components.classes['@mozilla.org/jssh-server;1'] is undefined

Source File:
file:///C:/Documents%20and%20Settings/baracal/Application%20Data/Mozilla/Firefox/Profiles/bmak0f7g.default/extensions/js...@extensions.mozilla.org/components/nsJSShStarter.js
Line: 133


Thanks,

Al B.
> > > - Show quoted text -- Hide quoted text -

Angrez Singh

unread,
Jul 13, 2009, 2:44:25 AM7/13/09
to watir-...@googlegroups.com
Which XPI you are using & on which Firefox version?

Al B.

unread,
Jul 13, 2009, 7:44:42 AM7/13/09
to Watir General
Angrez,

I'm using 'jssh-20090703-WINNT.xpi', which you posted on July 3. I'm
using version 3.5 of Firefox, which was just recently released.

Al B.



On Jul 13, 2:44 am, Angrez Singh <ang...@gmail.com> wrote:
> Which XPI you are using & on which Firefox version?
>
> On Fri, Jul 10, 2009 at 8:08 PM, Al B. <a...@comcast.net> wrote:
>
> > Hi Angrez. Thanks for getting back to me. The error console says:
>
> > Error: Components.classes['...@mozilla.org/jssh-server;1'] is undefined
>
> > Source File:
>
> > file:///C:/Documents%20and%20Settings/baracal/Application%20Data/Mozilla/Firefox/Profiles/bmak0f7g.default/extensions/
> > j...@extensions.mozilla.org/components/nsJSShStarter.js

al3kc

unread,
Jul 16, 2009, 4:29:12 AM7/16/09
to Watir General
I have a similar error

Failed to load XPCOM component: C:\Documents and Settings\username
\Application Data\Mozilla\Firefox\Profiles\mk3pna4d.default\extensions
\js...@extensions.mozilla.org\components\jssh.dll

I don't have 'extensions' folder in mk3pna4d.default at all.

Angrez Singh

unread,
Jul 16, 2009, 5:44:32 AM7/16/09
to watir-...@googlegroups.com
for those whom XPI is not working on Firefox 3.5 can you try installing "Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)" from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&displaylang=en

Let me know if this helps.

Thanks,
Angrez

Al B.

unread,
Jul 16, 2009, 10:02:06 AM7/16/09
to Watir General
Hi Angrez,

I tried it and it didn't work. I still get the same error in the
error console.

Regards,

Al B.


On Jul 16, 5:44 am, Angrez Singh <ang...@gmail.com> wrote:
> for those whom XPI is not working on Firefox 3.5 can you try
> installing "Microsoft
> Visual C++ 2008 SP1 Redistributable Package (x86)" from here:http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b9...
>
> Let me know if this helps.
>
> Thanks,
> Angrez
>
>
>
> On Thu, Jul 16, 2009 at 1:59 PM, al3kc <aleks.kiev...@gmail.com> wrote:
>
> > I have a similar error
>
> > Failed to load XPCOM component: C:\Documents and Settings\username
> > \Application Data\Mozilla\Firefox\Profiles\mk3pna4d.default\extensions
> > \j...@extensions.mozilla.org\components\jssh.dll
>
> > I don't have 'extensions' folder in mk3pna4d.default at all.- Hide quoted text -

Al B.

unread,
Jul 16, 2009, 10:24:17 AM7/16/09
to Watir General
Hello again, Angrez,

I just got it to work. I de-installed jssh, then manually deleted the
'js...@extensions.mozilla.org' directory from the 'extensions'
directory under the 'mozilla firefox' directory as well as the
extensions directory in my profile directory tree. Then I re-
installed 'jssh'. Now it works. It may have been a permissions
problem preventing the XPI from updating one of those directories.

Regards,

Al B.
> > - Show quoted text -- Hide quoted text -

Lonny Eachus

unread,
Jul 22, 2009, 10:47:48 PM7/22/09
to Watir General

There have been no replies to the above. Does anybody know if this
works? Does anyone have a workable XPI for OS X?

Angrez Singh

unread,
Jul 23, 2009, 2:35:19 AM7/23/09
to watir-...@googlegroups.com
Don't think so, we need to compile the JSSH with newer version of Firewatir on MAC OSX

venkatesh kumar

unread,
Jul 23, 2009, 4:50:03 PM7/23/09
to watir-...@googlegroups.com
Hi Angrez,

Please provide a JSSH which works all time. I am really fedup, sometimes it works sometimes it does't. Now its not working tried all what you said before.

Thanks,
venkat
http://prog2impress.com/

Lonny Eachus

unread,
Jul 23, 2009, 4:46:59 PM7/23/09
to Watir General

Well, I would be willing to do it if I had some explicit instruction.
I did not quite follow all of the conversation on the topic.


Lonny Eachus
=================

Joseph Liu

unread,
Jul 23, 2009, 5:32:44 PM7/23/09
to watir-...@googlegroups.com
You can try the attached version of jssh for os x. I've added an option to specify the port which jssh starts on, but if no port is specified it should default to 9997 and work with firewatir.

Specify port via:
./firefox-bin -jssh <port>

Joseph
jssh-20090712-Darwin-param.xpi

Angrez Singh

unread,
Jul 24, 2009, 2:10:32 AM7/24/09
to watir-...@googlegroups.com
Venkatesh, I understand your problem but until you tell me which firefox version you are using, which platform, how would I can provide you with the XPI.

Thanks,
Angrez

Lonny Eachus

unread,
Jul 24, 2009, 3:24:19 PM7/24/09
to Watir General
Joseph:

So other Mac OS X users will know: your version of the XPI worked
great for me, using the default (no port specified). I haven't tried
it with a specified port but 9997 is fine with me. I am running OS X
10.5.7.

Thank you very much.


Lonny Eachus
=============

Lonny Eachus

unread,
Jul 24, 2009, 8:41:21 PM7/24/09
to Watir General

Angrez,

This may or may not be an issue with FF 3.5, but I, too, am running
Firewatir 1.6.2 on a Mac and cannot get attach() to work. Can you send
me the latest gem?

Thanks.

Lonny Eachus
============

venky

unread,
Jul 25, 2009, 7:17:00 AM7/25/09
to Watir General
Hi Angrez,

I tried with firefox 3.5.1 with the above provided jssh its working
fine and thanks a lot for that. will let u know if i encounter any
problem.

Thanks,
Venkat
http://prog2impress.com/

On Jul 16, 2:44 pm, Angrez Singh <ang...@gmail.com> wrote:
> for those whom XPI is not working on Firefox 3.5 can you try
> installing "Microsoft
> Visual C++ 2008 SP1 Redistributable Package (x86)" from here:http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b9...
>
> Let me know if this helps.
>
> Thanks,
> Angrez
>
>
>
> On Thu, Jul 16, 2009 at 1:59 PM, al3kc <aleks.kiev...@gmail.com> wrote:
>
> > I have a similar error
>
> > Failed to load XPCOM component: C:\Documents and Settings\username
> > \Application Data\Mozilla\Firefox\Profiles\mk3pna4d.default\extensions
> > \j...@extensions.mozilla.org\components\jssh.dll

Tony Zanella

unread,
Aug 12, 2009, 12:59:09 PM8/12/09
to Watir General
Hello all,
I work in an office with developers using Linux, Mac, and Windows
boxes. We have a set of regression tests written in FireWatir that we
run on these various boxes. Since a couple of us (Mac and Windows)
have upgraded to Firefox 3.5, the jssh plugins (on Mac jssh 0.1 and on
Windows jssh 0.9) no longer work. I haven't yet updated Firefox on the
Linux box to 3.5 (currently 3.0.13 with jssh 0.9), but I would like to
eventually. Any suggestions, or news on updating the plugin for the
different platforms?

On Jul 16, 10:02 am, "Al B." <a...@comcast.net> wrote:
> Hi Angrez,
>
> I tried it and it didn't work.  I still get the same error in the
> error console.
>
> Regards,
>
> Al B.
>
> On Jul 16, 5:44 am, Angrez Singh <ang...@gmail.com> wrote:
>
> > for those whom XPI is not working onFirefox3.5can you try

Angrez Singh

unread,
Aug 13, 2009, 2:45:28 AM8/13/09
to watir-...@googlegroups.com
Can you use the plug-ins provided here?
http://wiki.openqa.org/display/WTR/FireWatir+Installation
Reply all
Reply to author
Forward
0 new messages