commaai / commaai/flash

Show better error descriptions

Open
#95 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
20
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Instead of showing "Flash failed" with generic instructions, we might know the cause of a particular error.

Examples:
- `NotFoundError: Failed to execute '*' on 'USBDevice': The device was disconnected.`
- Most likely caused by the device being unplugged/faulty cable
- `NetworkError: Failed to execute '*' on 'USBDevice': A transfer error has occurred.`
- The device has stopped responding or we are unable to communicate with the device. Either an issue with qcserial driver being bound to the device, the device is in a bad state, or the power delivered to the device is not enough.
- `SecurityError: Failed to execute 'open' on 'USBDevice': Access denied.`
- This may be caused by `udev` rules preventing communication with the device - [example rules here](https://github.com/nelsonjchen/c3-faux-touch-keyboard?tab=readme-ov-file#ubuntu-linux-preparing-ubuntu-linux-to-allow-the-device-to-flash-via-a-chromium-based-browser)
- `NetworkError: Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.`
- Likely caused by qcserial driver being bound to the device.
- `Unsupported mode: error. Please reboot the device.`
- Device is in Sahara error state - we should tell the user to unplug their device for 30 seconds and then try again!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.