Add-on testrun fails because of broken Selenium XPI file ("Add-on path is neither an XPI nor a directory")

RESOLVED WORKSFORME

Status

Mozilla QA
Infrastructure
RESOLVED WORKSFORME
4 years ago
3 years ago

People

(Reporter: cosmin, Unassigned)

Tracking

Details

Attachments

(4 attachments)

(Reporter)

Description

4 years ago
Addon testruns get abborted on mac machines, with esr24, I checked the affected machines (mm-osx-107-3 and mm-osx-106-3) and it reproduces. It didn't reproduced locally with the same configuration. 

Jenkins log:
01:38:00 *** Application: Firefox 24.0esrpre
01:38:00 *** Updating branch of test repository to 'mozilla-esr24'
01:38:00 Downloading http://release.seleniumhq.org/selenium-ide/editor/2.3.0/selenium-ide-editor-2.3.0.xpi to /var/folders/Hq/HqUlSZIYFum1tKZJFYKimE+++TI/-Tmp-/selenium-ide-editor-2.3.0.xpi
01:38:00 File is not a zip file
01:38:00 *** Removing target add-on '/var/folders/Hq/HqUlSZIYFum1tKZJFYKimE+++TI/-Tmp-/selenium-ide-editor-2.3.0.xpi'.
01:38:00 *** Removing old installation at /var/folders/Hq/HqUlSZIYFum1tKZJFYKimE+++TI/-Tmp-/tmpCsmeun.binary/FirefoxNightly.app
01:38:00 *** Removing test repository '/var/folders/Hq/HqUlSZIYFum1tKZJFYKimE+++TI/-Tmp-/tmpGN3CUu.mozmill-tests'
01:38:00 Traceback (most recent call last):
01:38:00   File "/Users/Mozauto/jenkins/workspace/mozilla-esr24_addons/mozmill-env/bin/testrun_addons", line 8, in <module>
01:38:00     load_entry_point('mozmill-automation==1.5.23', 'console_scripts', 'testrun_addons')()
01:38:00   File "/Users/Mozauto/jenkins/workspace/mozilla-esr24_addons/mozmill-env/python-lib/mozmill_automation/testrun.py", line 1004, in addons_cli
01:38:00     exec_testrun(AddonsTestRun)
01:38:00   File "/Users/Mozauto/jenkins/workspace/mozilla-esr24_addons/mozmill-env/python-lib/mozmill_automation/testrun.py", line 998, in exec_testrun
01:38:00     cls().run()
01:38:00   File "/Users/Mozauto/jenkins/workspace/mozilla-esr24_addons/mozmill-env/python-lib/mozmill_automation/testrun.py", line 449, in run
01:38:00     raise self.last_exception
01:38:00 zipfile.BadZipfile: File is not a zip file
01:38:00 Build step 'Invoke XShell command' marked build as failure
(Reporter)

Updated

4 years ago
status-firefox24: --- → affected
Don't we have a bug already for that? Dave, do you remember? Not sure if it is infrastructure or automation, but I cannot find it atm.

Beside that this bug is indeed in the wrong component, because mozmill-tests have nothing to do with this problem. I would think that this is most likely a network issue with the proxy. 

Cosmin, can you please try to get this reproduced? I would kinda like to see a broken downloaded XPI file.
Component: Mozmill Tests → Infrastructure
Flags: needinfo?(cosmin.malutan)
QA Contact: hskupin
Summary: Testrun stopped with "zipfile.BadZipfile: File is not a zip file" → Add-on testrun fails because of broken Selenium XPI file ("zipfile.BadZipfile: File is not a zip file")
(Reporter)

Comment 2

4 years ago
I did reproduced it when I filed the bug on the affected machines, but it did't reproduced few hours later when I tried again. So most likely it was a network issue.
I will wait to see if it will fail again.
Have you saved the downloaded XPI file at this time? Given that you haven't added an attachment I doubt so. Please do this the next time!
(In reply to Henrik Skupin (:whimboo) from comment #1)
> Don't we have a bug already for that? Dave, do you remember? Not sure if it
> is infrastructure or automation, but I cannot find it atm.

No, I don't think there's another bug on file.

Comment 5

4 years ago
Created attachment 823849 [details]
tmp_j_x0O.selenium-ide-editor-2.3.0.xpi.zip

Here is the selenium.xpi temp file that was present on the failing osx.

Comment 6

4 years ago
Created attachment 823856 [details]
seleniumZip.zip

The selenium.xpi from osx-106. Both xpi had to be zipped as they seem to be folders and cannot be uploaded otherwise.
This is most likely the unpacked version and they are empty. Please try to manually download the xpi file via an infinite loop. I hope that we could fetch such a problem.
(Reporter)

Comment 8

4 years ago
Created attachment 824585 [details]
Broken_xpi.xpi

(In reply to Henrik Skupin (:whimboo) from comment #7)
> This is most likely the unpacked version and they are empty. Please try to
> manually download the xpi file via an infinite loop. I hope that we could
> fetch such a problem.
Hi Henrik, I downloaded the file in an loop and I've got an broken xpi

The bash code for that:
> for i in {1..20};
> do curl -o $i.xpi http://release.seleniumhq.org/selenium-ide/editor/2.3.0/selenium-ide-editor-2.3.0.xpi -Y 300 -y 1;
> done;

The xpi it's broken because the download was aborted, in this case because the download speed was les than 300 kb/s (-Y 300) for one second (-y 1)
I suppose we should check the the md5sum of the file after we download it, before we start the test.
Flags: needinfo?(cosmin.malutan)
Can you please explain why you are using -y 1 here? I don't see how this replicates our situation.
(Reporter)

Comment 10

4 years ago
I used that to simulate a network issue, but you're right, this might not be the case in our test, because python function urllib.urlretrieve should throw an exception.

https://github.com/mozilla/mozmill-automation/blob/master/mozmill_automation/testrun.py#L161
Mario, why has the mm-osx-108-1 node not brought back online? No tests are running on this node and we have release tests to run. I have mentioned that a couple of times already. :/ I re-enable it now.

Comment 12

4 years ago
I left it offline because you told me on IRC that you needed to update Java yesterday and figured you would put it back online after finishing with the updates. Sorry if I misunderstood.
Never leave nodes offline even not if others will work on those later. Whenever you have finished testing, clean-up the box and re-connect the node.
Duplicate of this bug: 988805
mozprofile has been changed in the wording, so this is now listed as "Add-on path is neither an XPI nor a directory". Most likely a network issue.
Summary: Add-on testrun fails because of broken Selenium XPI file ("zipfile.BadZipfile: File is not a zip file") → Add-on testrun fails because of broken Selenium XPI file ("Add-on path is neither an XPI nor a directory")

Comment 16

4 years ago
Created attachment 8398440 [details]
jenkins.log

Failed again today on Firefox 24.4.0 ESR en-US on Mac OSX 10.7.

Jenkins log attached.
Thanks Daniel, but we don't need more logs attached here. We have to figure out why downloading fails and why it's not reported as failure.

Comment 18

3 years ago
I don't think we have seen this in a long time.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.