Project

General

Profile

Bug #15254

Tails Installer breaks due to unicode status messages

Added by anonym 7 months ago. Updated 10 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Internationalization
Target version:
Start date:
01/27/2018
Due date:
% Done:

100%

QA Check:
Pass
Feature Branch:
installer:bugfix/15233-locale-fixes
Type of work:
Code
Blueprint:
Starter:
Affected tool:
Installer

Description


Related issues

Related to Tails - Bug #15233: Tails Installer cannot select an ISO in non-English locales Resolved 01/23/2018
Blocks Tails - Feature #15334: Core work 2018Q3: Foundations Team Confirmed 02/20/2018

History

#1 Updated by anonym 7 months ago

  • Subject changed from Tails Installer breaks due to unicode status messages to Tails Installer breaks due to unicode status messages

To reproduce: run Tails Installer in e.g. the fr_FR.UTF-8 or zh_TW.UTF-8 locale and then plug a too small USB device.

#2 Updated by anonym 7 months ago

  • Status changed from Confirmed to In Progress
  • Assignee changed from anonym to intrigeri
  • % Done changed from 0 to 50
  • Feature Branch set to installer:bugfix/15233-locale-fixes

#3 Updated by anonym 7 months ago

#4 Updated by anonym 7 months ago

  • Related to Bug #15233: Tails Installer cannot select an ISO in non-English locales added

#5 Updated by anonym 7 months ago

  • QA Check set to Ready for QA

(Had forgotten the Ready for QA flag)

goupille wrote on #15233#note-9:

According to several users, the 'install' button is also greyed out and prevent cloning the device.

That should be this ticket. Can you please try to confirm? These users must have triggered some condition that logs something (which due to their locale happen to contain unicode) to the status area, e.g. if a too small USB drive is plugged. Indeed, when the problematic status is attempted and fails, it will look like no USB drive is plugged (even the good ones will not be listed) resulting in the exact situation you describe.

#6 Updated by intrigeri 7 months ago

  • Assignee changed from intrigeri to bertagaz

#7 Updated by goupille 7 months ago

as said on xmpp, some non-english users reported that tails installer just silently ignored their USB sticks (that happened to be less than 8Gb), but a lot of non english users reported that the USB stick was recognized, however, the "install" button stayed grey out. when trying again in english it solved the issue, so I think that maybe even a normal use "must have triggered some condition that logs something"...

#8 Updated by bertagaz 6 months ago

  • Assignee changed from bertagaz to anonym
  • QA Check changed from Ready for QA to Dev Needed

So if I get correctly what this ticket is about:

  • the "Select an ISO" button remains grey and inactive even with "use a downloaded ISO" selected.
  • When a USB stick too small to install Tails on is plugged, nothing happens.

With the package mentioned in #15233, both issues are fixed.

However I still can catch such a bug in this branch. To reproduce:

  1. start a tails session in fr_FR or other
  2. start tails-installer
  3. plug in a valid USB stick (>8G)
  4. Check "use a downloaded Tails ISO"
  5. Select an ISO

The "Install" button remains grey in this case (while not when cloning anymore).

Tails-installer output says:

amnesia@amnesia:~$ tails-installer
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 821, in on_source_file_set
    self.select_source_iso(filechooserbutton.get_filename())
  File "/usr/lib/python2.7/dist-packages/tails_installer/gui.py", line 838, in select_source_iso
    % {'filename': os.path.basename(self.live.source.path)})
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)

I'll have a look later.

#9 Updated by bertagaz 6 months ago

  • Assignee changed from anonym to bertagaz
  • % Done changed from 50 to 70

bertagaz wrote:

However I still can catch such a bug in this branch. To reproduce:

  1. start a tails session in fr_FR or other
  2. start tails-installer
  3. plug in a valid USB stick (>8G)
  4. Check "use a downloaded Tails ISO"
  5. Select an ISO

The "Install" button remains grey in this case (while not when cloning anymore).

I'll have a look later.

Fixed with:

diff --git a/tails_installer/gui.py b/tails_installer/gui.py
index 7216b96..6baf633 100755
--- a/tails_installer/gui.py
+++ b/tails_installer/gui.py
@@ -835,7 +835,7 @@ class TailsInstallerWindow(Gtk.ApplicationWindow):
             return False

         self.live.log.info(_("%(filename)s selected")
-                             % {'filename': os.path.basename(self.live.source.path)})
+                             % {'filename': str(os.path.basename(self.live.source.path))})
         self.source_available = True
         self.live.log.debug("Calling populate_devices()" 
                             " from select_source_iso")

I'll push the commit in the installer repo, and will release it with the package for 3.6.

From my manual tests, everything works fine again, no more inactive buttons in every different use cases.

So I'll consider this branch as good to go and be merged. yay!

#10 Updated by bertagaz 5 months ago

  • Target version changed from Tails_3.6 to Tails_3.7

#11 Updated by intrigeri 5 months ago

bertagaz, it's not clear to me what's the status here. What is the next step?

#12 Updated by intrigeri 4 months ago

#13 Updated by intrigeri 4 months ago

#14 Updated by bertagaz 3 months ago

  • Target version changed from Tails_3.7 to Tails_3.8

#15 Updated by intrigeri 3 months ago

  • QA Check changed from Dev Needed to Info Needed

#16 Updated by intrigeri about 2 months ago

  • Target version changed from Tails_3.8 to Tails_3.9

#17 Updated by intrigeri about 2 months ago

#18 Updated by intrigeri about 2 months ago

#19 Updated by intrigeri 10 days ago

  • Assignee changed from bertagaz to intrigeri
  • QA Check changed from Info Needed to Ready for QA
  • Affected tool changed from Greeter to Installer

intrigeri wrote:

bertagaz, it's not clear to me what's the status here. What is the next step?

Looks like the next step is: review the commit bertagaz added directly while releasing (4d24f0dfb76da593f7186304c70062ad7bda29e9). I'll do that.

#20 Updated by intrigeri 10 days ago

  • Status changed from In Progress to Resolved
  • Assignee deleted (intrigeri)
  • % Done changed from 70 to 100
  • QA Check changed from Ready for QA to Pass

LGTM

Also available in: Atom PDF