Snappy-debug bug

Filing here because there’s no bug tracker for snappy-debug.

I had scanlog running in a terminal today, and it died. I was running the libreoffice snap, and used the file dialog to open/save a file. When I went back to the snappy-debug window, i saw this:

Traceback (most recent call last):
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 1195, in <module>
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 1183, in main
    from_end=opt.only_new, exclude=opt.exclude)
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 209, in __init__
    self.scan_log(logs, snap_name, follow, from_end)
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 377, in scan_log
    _scan_line(line, snap_name)
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 315, in _scan_line
  File "/snap/snappy-debug/414/bin/snappy-security-scanlog", line 261, in _print_entry
    sys.stdout.write("%s\n" % out)
UnicodeEncodeError: 'ascii' codec can't encode character '\xc0' in position 271: ordinal not in range(128)

@popey - thanks for the report. Can you also give the libreoffice denials?

@jdstrand tricky as they’re all just a list of denials about files in my ~/Downloads folder. For example:

 = AppArmor =
Time: Nov  6 16:57:50
Log: apparmor="ALLOWED" operation="open" profile="libreoffice-soffice" name=2F686F6D652F616C616E2F446F63756D656E74732F4170706C69636174696F6E7320746F2074617267657420736E6170 pid=10693 comm="pool-soffice" re
quested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
File: /home/alan/Documents/Applications to target snap (read)
* add 'home' to 'plugs'

I’ve seen this in other python apps. I believe it’s trying to coerce the unicode character 0x00C0 (á) into ASCII resulting in 0x00 (null) and 0xC0 ( in the extended ASCII table sometimes known as the ANSI table) characters of which 0xC0 is the failing one because it has a decimal value of 192 which is larger than the ASCII set’s maximum value of 128.


Unsurprisingly I do have filenames with unicode characters in them which may have triggered it. Files like this.

'Screenshot_2019-10-30 Edit monolith Snap packages Alan Pope 🍺🐧🐱 🦄.png'

1 Like