trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
695 stars 246 forks source link

Reload app on "Install new firmware" prompt. App never loads. #4267

Closed tomasklim closed 1 year ago

tomasklim commented 3 years ago

Describe the bug A user wants to abort firmware installation but doesn't notice the prompt on the device so he will try to reload the app. However, the app never loads.

Info:

Steps to reproduce:

  1. Settings/Device
  2. Update firmware
  3. Reboot to bootloader
  4. Do not Abort/Continue to “Install new firmware? Never do this without your recovery card!”
  5. Refresh app

Expected result: App loads and says to user, that he has a device in BL mode.

Actual result: Webusbplugin - App never loads Bridge - App loads but first bridge crashes (so desktop app is unusable until restart)

Screenshots: Web webusbplugin: Screenshot 2021-09-14 at 9 25 26 Web bridge

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x43ddfa9]

runtime stack:
runtime.throw(0x44f3760, 0x2a)
    /usr/local/go/src/runtime/panic.go:774 +0x72
runtime.sigpanic()
    /usr/local/go/src/runtime/signal_unix.go:378 +0x47c

Desktop bridge:

Screenshot 2021-09-14 at 9 39 35
marekrjpolak commented 3 years ago

Reproduced on production as well, with exception that in step 5 I have to refresh twice to encounter the error. After the first attempt, one refresh is enough to produce the error.

Info:

tsusanka commented 2 years ago

Let's retest on 21.10.1.

wendys-cats commented 2 years ago

Confirming for Suite APP 21.10.2, both for Windows10 and macOS (intel) Big Sur.

Once the install firmware prompt is present on device, refreshing Suite leads to forever loading.

Info: OS: Windows10 AND macOS Big Sur 11.6 (intel) Device: TT FW 2.4.2 Suite: APP 21.10.2 3cb57ead18474b380841b479a542c0b910b3d936

Another bug is present - reported here #4388 Moreover, once the install prompt is present on device, and user cancels it and then opens a new Suite instance, device gets a RSOD (Suite does not need to be reloaded before canceling the install prompt).

Info: OS: Windows10 AND macOS Big Sur 11.6 (intel) Device: TT FW 2.0.5 AND 2.4.0 Suite: APP AND WEB 21.10.2 3cb57ead18474b380841b479a542c0b910b3d936

Steps:

  1. Initiate Update firmware action
  2. Reboot to bootloader mode
  3. Click "Install firmware" button
  4. Close Suite
  5. Cancel install firmware on device
  6. Device stays in BL
  7. Open Suite
  8. RSOD photo_2021-10-19_09-43-13
tomasklim commented 2 years ago

Still available, both bridge and webusb. I do not get RSOD error though.

The problem is that the device is not responding so Suite never gets TRANSPORT_EVENT event which is a prerequisite for the app to be loaded.

@mroz22 Do you have some solution in mind how to stop communication with "lagged" device? It would be nice to get to Welcome screen in Suite and inform user to replug his device.

STew790 commented 2 years ago

QA NOK

Still present in recent Suite version.

Info:

bosomt commented 1 year ago

QA OK

both web and app are reporting device in bootloader mode after reload

image

Info: