'cros flash' in simple chrome workflow is broken |
|||||||
Issue description'cros flash' worked fine for me earlier this week in simple chrome workflow. I just pulled from master and ran 'gclient sync'. 'cros flash' is not working: (sdk eve R68-10684.0.0) hansberry$ ~/chromium/src $ cros flash usb:// ./chromiumos_test_image.bin Removable device(s) found. Please select/confirm to continue: [0]: JetFlash Mass Storage Device 7.4G (/dev/sdb) Please choose an option [0-0]: 0 12:18:45: ERROR: cros flash failed before completing. 12:18:45: ERROR: Cannot find xbuddy module. Devserver package directory does not exist: /usr/local/google/home/hansberry/chromium/src/third_party/src/platform/dev Since something seems to be missing from third_party/, I tried both 'cros chrome-sdk --board=eve --clear-sdk-cache' and 'gclient sync', but to no avail :( I have confirmed that 'cros flash' works fine for me in the chromiumos workflow: (cr) (-) hansberry$ ~/trunk/src/scripts $ cros flash usb:// xbuddy://remote/eve/latest-dev/test Removable device(s) found. Please select/confirm to continue: [0]: JetFlash Mass Storage Device 7.4G (/dev/sdb) Please choose an option [0-0]: 0 12:44:35: NOTICE: cros flash completed successfully.
,
Jun 14 2018
Amin: could you check to see if this was caused by your recent au_generator rework ? you should be able to reproduce by: (1) get a Chromium check out (2) run `cros chrome-sdk --board=amd64-generic` (3) try running a `cros flash usb:// ./some-disk-image.bin` in that env
,
Jun 14 2018
definitely, I'll take a look. cros flash should have nothing to do with the au-generator regarding that change, but there could be some middle ground code path that has gone bad as a result.
,
Jun 14 2018
I couldn't reproduce the error you got. Can you run cros flash with --debug to see if it gives any more information? But just an FYI, I don't think you are on the latest SK(R68-10684.0.0), right? $ cros chrome-sdk --board=amd64-generic (sdk amd64-generic R69-10776.0.0-b2658542) ahassani@ahassani ~/chromium/src $ cros flash usb:// ~/chromiumos/images/chromeos_10539.0.0_veyron-minnie_recovery_dev-channel_minnie-mp-v4.bin Removable device(s) found. Please select/confirm to continue: [0]: Patriot Memory 7.4G (/dev/sdb) Please choose an option [0-0]: 0 [sudo] password for ahassani: [#########################################################################################################################################################] 100% 15:31:22: NOTICE: cros flash completed successfully.
,
Jun 14 2018
You're correct, when I filed the bug, I was on an older SK. However, I did run $ git pull origin master $ gclient sync $ (R68-10684.0.0) exit $ cros chrome-sdk --board=eve --clear-sdk-cache to update everything. In any case, I just followed the same steps above again, and now cros flash works fine. Looks like the issue has either already been fixed, or I just hit a really weird transient error :/
,
Dec 3
I'm running into this issue again - can anyone help out? Here is the output running with --debug:
>cros flash usb:// ~/chromiumos_test_image.bin --debug
10:52:37: DEBUG: Cache dir lookup.
10:52:37: DEBUG: Configured cache_dir to '/usr/local/google/home/khorimoto/chromium/src/build/cros_cache'
10:52:37: INFO: Preparing to image the removable device
10:52:37: DEBUG: RunCommand: lsblk --pairs --output NAME,RM,TYPE,SIZE
10:52:37: DEBUG: RunCommand: lsblk --pairs /dev/sda --output NAME,RM,TYPE,SIZE
Removable device(s) found. Please select/confirm to continue:
[0]: SanDisk Ultra USB 3.0 14.3G (/dev/sda)
Please choose an option [0-0]: 0
10:52:38: ERROR: cros flash failed before completing.
cros: Unhandled exception:
Traceback (most recent call last):
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/bin/cros", line 169, in <module>
DoMain()
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/bin/cros", line 165, in DoMain
commandline.ScriptWrapperMain(FindTarget)
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/lib/commandline.py", line 912, in ScriptWrapperMain
ret = target(argv[1:])
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/scripts/cros.py", line 66, in main
code = _RunSubCommand(subcommand)
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/scripts/cros.py", line 51, in _RunSubCommand
return subcommand.Run()
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/cli/cros/cros_flash.py", line 161, in Run
send_payload_in_parallel=self.options.send_payload_in_parallel)
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/cli/flash.py", line 587, in Flash
imager.Run()
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/cli/flash.py", line 297, in Run
image_path = self._GetImagePath()
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/cli/flash.py", line 264, in _GetImagePath
self.image, self.board, static_dir=DEVSERVER_STATIC_DIR)
File "/usr/local/google/home/khorimoto/chromium/src/third_party/chromite/lib/dev_server_wrapper.py", line 133, in GetImagePathWithXbuddy
'does not exist: %s' % DEVSERVER_PKG_DIR)
Exception: Cannot find xbuddy module. Devserver package directory does not exist: /usr/local/google/home/khorimoto/chromium/src/third_party/src/platform/dev
,
Dec 5
vapier@ is chromium code supposed to pull in the devserver?
,
Dec 5
currently, no. but flashing from a file shouldn't trigger the devserver code path (at least it didn't in the past). i.e. using xbuddy:// is known to be broken and that's OK (from a status quo pov). but file:// should work in a browser checkout.
,
Dec 5
My other teammates are also now affected by this issue. Bumping priority as we are all blocked on flashing images from Goldeneye.
,
Dec 5
`sudo dd` generally works fine to copy disk images to a usb stick, so I don't think anyone is really blocked
,
Dec 5
I'll look at it tomorrow since I'm not on my workstation right now, but basically following the code path the only thing I can see might be that the path to the image is not getting passed properly somehow or there is some permission issues to the image file passed to the cros flash. That's why it can't find the file and it tries to use devserver to catch it.
,
Dec 5
I just ran the cros flash flawlessly: (sdk amd64-generic R72-11237.0.0-rc2) ahassani@ahassani ~/chromiumos/images $ cros flash usb:// chromeos_11151.40.0_coral_recovery_stable-channel_mp-v12.bin Removable device(s) found. Please select/confirm to continue: [0]: Generic USB Storage 7.5G (/dev/sdb) Please choose an option [0-0]: 0 [sudo] password for ahassani: [################################ Can you provide more information on how to repro this? Which version of cros_sdk you are in? Its not obvious from #6
,
Dec 5
I wasn't running the command from within the cros_sdk shell. I just tried it from within the shell, and it is working this time! However, I've been flashing images for years without being inside cros_sdk. Is this now a requirement? Did something change here?
,
Dec 5
Well, outside cros_sdk works for me too: $ cd chromium $ cros flash usb:// ../chromiumos/images/chromeos_10176.47.2_coral_recovery_stable-channel_mp-v4.bin Removable device(s) found. Please select/confirm to continue: [0]: Generic USB Storage 7.5G (/dev/sdb) Please choose an option [0-0]: 0 [#############
,
Dec 17
I'm closing this as I assume this is not an issue anymore, feel free to reopen if it emerges.
,
Dec 17
Thanks - it is working for me again. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by hansberry@chromium.org
, Jun 14 2018