Closed Bug 1264656 Opened 8 years ago Closed 8 years ago

"./mach android-emulator --force-update" is broken on Windows

Categories

(Testing :: General, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: Dexter, Assigned: gbrown)

Details

Attachments

(1 file)

It looks like --force-update fails to update the AVD on Windows.

$ ./mach android-emulator --force-update
 0:00.93 Fetching and installing AVD. This may take a few minutes...
Error running mach:

    ['android-emulator', '--force-update']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

WindowsError: [Error 183] Impossibile creare un file, se il file esiste gi

  File "c:\mozilla-central\mobile/android/mach_commands.py", line 140, in emulator
    emulator.update_avd(force_update)
  File "c:\mozilla-central\testing/mozbase/mozrunner\mozrunner\devices\android_device.py", line 363, in update_avd
    self._update_avd_paths()
  File "c:\mozilla-central\testing/mozbase/mozrunner\mozrunner\devices\android_device.py", line 462, in _update_avd_paths

"WindowsError: [Error 183] Impossibile creare un file, se il file esiste gi" roughtly translates to "Unable to create a file, if it exists already".
Assignee: nobody → gbrown
I think this could happen on any platform. With --force-update, mach deletes the avd directory, but not the ini file, so the ini file may exist when mach tries to replace it. This patch deletes the ini file once the avd directory is gone and before trying to update.

:Dexter -- Does this fix it for you?
Attachment #8741407 - Flags: review?(jmaher)
Attachment #8741407 - Flags: feedback?(alessio.placitelli)
Comment on attachment 8741407 [details] [diff] [review]
remove ini file before updating

Review of attachment 8741407 [details] [diff] [review]:
-----------------------------------------------------------------

good stuff!
Attachment #8741407 - Flags: review?(jmaher) → review+
Comment on attachment 8741407 [details] [diff] [review]
remove ini file before updating

Review of attachment 8741407 [details] [diff] [review]:
-----------------------------------------------------------------

Super, works like a charm.
Attachment #8741407 - Flags: feedback?(alessio.placitelli) → feedback+
https://hg.mozilla.org/mozilla-central/rev/b4b843abf463
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.