Bug #15254

Tails Installer breaks due to unicode status messages

Added by anonym 2018-01-27 11:10:03 . Updated 2018-08-09 15:14:06 .

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

100%

Feature Branch:
installer:bugfix/15233-locale-fixes
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Installer
Deliverable for:

Description


Subtasks


Related issues

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

History

#1 Updated by anonym 2018-01-27 11:11:00

  • 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 2018-01-27 11:14:42

  • 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

See Bug #15233#note-7.

#3 Updated by anonym 2018-01-27 11:15:58

#4 Updated by anonym 2018-01-27 11:16:09

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

#5 Updated by anonym 2018-01-29 11:00:25

  • QA Check set to Ready for QA

(Had forgotten the Ready for QA flag)

goupille wrote on Bug #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 2018-01-30 08:06:10

  • Assignee changed from intrigeri to bertagaz

#7 Updated by goupille 2018-01-31 22:14:08

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 2018-02-21 18:06:49

  • 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 Bug #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 2018-02-22 13:03:14

  • 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:
>
> # start a tails session in fr_FR or other
> # start tails-installer
> # plug in a valid USB stick (>8G)
> # Check “use a downloaded Tails ISO”
> # 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 2018-03-14 11:32:28

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

#11 Updated by intrigeri 2018-03-28 13:02:36

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

#12 Updated by intrigeri 2018-04-08 13:56:02

  • blocked by deleted (Feature #13245: Core work 2018Q1: Foundations Team)

#13 Updated by intrigeri 2018-04-08 13:56:06

#14 Updated by bertagaz 2018-05-10 11:09:31

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

#15 Updated by intrigeri 2018-05-28 14:06:38

  • QA Check changed from Dev Needed to Info Needed

#16 Updated by intrigeri 2018-06-26 16:28:04

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

#17 Updated by intrigeri 2018-06-28 14:00:22

  • blocked by deleted (Feature #15139: Core work 2018Q2: Foundations Team)

#18 Updated by intrigeri 2018-06-28 14:00:35

#19 Updated by intrigeri 2018-08-09 15:11:25

  • 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 2018-08-09 15:14:06

  • 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