Detecting default Firefox installation doesn't work anymore

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
VERIFIED FIXED
8 years ago
a year ago

People

(Reporter: Shriram (irc: Mavericks), Assigned: whimboo)

Tracking

Details

(Whiteboard: [verified-mozmill-1.2.7])

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)

I tried the command
mozmill -t firefox/testPreferences/testRestoreHomepageToDefault.js
@ 
http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/run-mozmill-tests

on the command prompt and didn't change to the mozmill-tests directory beforedoing so.
As a result, I get the following error:
Traceback (most recent call last):
  File "c:\Python25\Scripts\mozmill-script.py", line 8, in <module>
    load_entry_point('mozmill==1.2.3', 'console_scripts', 'mozmill')()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 416, in cli
    CLI().run()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 348, in run
    runner = self.parse_and_get_runner()
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 480, in parse_and_get_runner
  File "c:\python25\lib\site-packages\jsbridge-2.3.1-py2.5.egg\jsbridge\__init__.py", line 118, in get_runner
    runner = super(CLI, self).get_runner(*args, **kwargs)
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 496, in get_runner
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 321, in __init__
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 360, in find_binary
  File "C:\Python25\lib\ntpath.py", line 283, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, tuple found


Traceback (most recent call last):
  File "c:\Python25\Scripts\mozmill-script.py", line 8, in <module>
    load_entry_point('mozmill==1.2.3', 'console_scripts', 'mozmill')()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 416, in cli
    CLI().run()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 348, in run
    runner = self.parse_and_get_runner()
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 480, in parse_and_get_runner
  File "c:\python25\lib\site-packages\jsbridge-2.3.1-py2.5.egg\jsbridge\__init__.py", line 118, in get_runner
    runner = super(CLI, self).get_runner(*args, **kwargs)
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 496, in get_runner
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 321, in __init__
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 360, in find_binary
  File "C:\Python25\lib\ntpath.py", line 283, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, tuple found

Reproducible: Always

Steps to Reproduce:
1.Launch the command prompt on windows vista basic
2.Make sure you have mozmill-tests running rom the command prompt and enter the following command :
mozmill -t firefox/testPreferences/testRestoreHomepageToDefault.js 
3. command and additional information can be found @ http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/run-mozmill-tests and
Actual Results:  
Traceback (most recent call last):
  File "c:\Python25\Scripts\mozmill-script.py", line 8, in <module>
    load_entry_point('mozmill==1.2.3', 'console_scripts', 'mozmill')()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 416, in cli
    CLI().run()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 348, in run
    runner = self.parse_and_get_runner()
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 480, in parse_and_get_runner
  File "c:\python25\lib\site-packages\jsbridge-2.3.1-py2.5.egg\jsbridge\__init__.py", line 118, in get_runner
    runner = super(CLI, self).get_runner(*args, **kwargs)
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 496, in get_runner
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 321, in __init__
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 360, in find_binary
  File "C:\Python25\lib\ntpath.py", line 283, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, tuple found


Traceback (most recent call last):
  File "c:\Python25\Scripts\mozmill-script.py", line 8, in <module>
    load_entry_point('mozmill==1.2.3', 'console_scripts', 'mozmill')()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 416, in cli
    CLI().run()
  File "c:\python25\lib\site-packages\mozmill-1.2.3-py2.5.egg\mozmill\__init__.py", line 348, in run
    runner = self.parse_and_get_runner()
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 480, in parse_and_get_runner
  File "c:\python25\lib\site-packages\jsbridge-2.3.1-py2.5.egg\jsbridge\__init__.py", line 118, in get_runner
    runner = super(CLI, self).get_runner(*args, **kwargs)
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 496, in get_runner
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 321, in __init__
  File "build\bdist.win32\egg\mozrunner\__init__.py", line 360, in find_binary
  File "C:\Python25\lib\ntpath.py", line 283, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, tuple found

Expected Results:  
Passed 3::Failed 0::Skipped 0

It should have done the same as running the command with the -b option 
mentioned @ http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/run-mozmill-tests
In addition to the expected results, the need to change to the mozmill-tests directory in order for the command to give expected results upon including the -b option , is added to http://quality.mozilla.org/documents-home/code-docs/mozmill-test-creation/run-mozmill-tests by whimboo.
(Assignee)

Comment 1

8 years ago
Mikeal, have we made any changes to that code which detects the default installation on Windows? Eventually with the default profile patch? If yes we should try to find it by using the registry.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: Unable to run mozmill test successfully without -b option. → Detecting default Firefox installation doesn't work anymore
To my knowledge this hasn't changed other than removing the profile finding code.

I'll look in to it later today.
(Assignee)

Comment 3

8 years ago
Thanks Sam! That traceback was really helpful. I found the cause of that issue and pushed a changeset to my github repository:

http://github.com/whimboo/mozrunner/commit/1f12a7ba48adf7150df9aa0d68e4ec914d838ca8

Mikeal, can you please have a look at?
Assignee: nobody → hskupin
(Assignee)

Comment 4

8 years ago
I should test it too. os.path.join doesn't support tuples. With the followup it is working now:

http://github.com/whimboo/mozrunner/commit/4ce602706e67a267707ed9730ace77799ad15eb1
(Assignee)

Updated

8 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 5

8 years ago
After a discussion on IRC I pushed another patch with another approach. We will merge it to the master and create 1.3 beta builds later today.

Sam, it would be great when you can test the fix tomorrow by just updating your easy_install version of Mozmill.
Keywords: regression
(Assignee)

Comment 6

8 years ago
Pushed to master.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.2.7]
(Assignee)

Comment 7

8 years ago
As send out by Sam via email the default binary detection works fine now again on Windows. Marking as verified.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2.7] → [verified-mozmill-1.2.7]
(Assignee)

Comment 8

8 years ago
Mikeal, we are still failing here. Thanks Sam for notifying me. Next time please directly comment on the bug.

The magic *bin parameter doesn't work with tuples. If you want that os.path.join really joins the given arguments you will have to push an array and not a tuple.

Pushed change as:
http://github.com/whimboo/mozrunner/commit/40a1b6afdaa901c68ff14ad0e8474b62afd13eda

Mikeal, please check so we can include it into the release.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

8 years ago
Status: REOPENED → ASSIGNED
Whiteboard: [verified-mozmill-1.2.7] → [mozmill-1.2.7]
(Assignee)

Comment 9

8 years ago
Sam, it looks like that your mozrunner library is out of date. After talking with Mikeal on IRC and retesting again it works with tuples. I have reverted my above patch.

Can you please run a "easy_install -U mozrunner" and check if simply calling "mozmill" will work afterward? Thanks.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

8 years ago
Something messed up with the mozrunner version. Checked with Sam on IRC and everything is fine. Marking verified.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2.7] → [verified-mozmill-1.2.7]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.