WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
221068
[Flatpak SDK] Avoid "Invalid byte sequence in conversion input" errors and other encoding issues
https://bugs.webkit.org/show_bug.cgi?id=221068
Summary
[Flatpak SDK] Avoid "Invalid byte sequence in conversion input" errors and ot...
Lauro Moura
Reported
2021-01-27 16:38:56 PST
After
r271938
, sometimes the flatpak invocation could raise the following error without more information: Error: Invalid byte sequence in conversion input This seems to happen due to LANG being deleted in flatpakutils.py before being set in webkit-bwrap. Also, the webkit-flatpak script may fail with encoding issues when printing the messages "Running..." and "Command.... exited with non-zero status" with the non-ascii prompt.
Attachments
Patch
(3.52 KB, patch)
2021-01-27 16:47 PST
,
Lauro Moura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Lauro Moura
Comment 1
2021-01-27 16:47:59 PST
Created
attachment 418600
[details]
Patch
Philippe Normand
Comment 2
2021-01-28 00:29:47 PST
Comment on
attachment 418600
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418600&action=review
> Tools/ChangeLog:10 > + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and
What's wrong with that?
Alicia Boya García
Comment 3
2021-01-28 03:03:02 PST
Comment on
attachment 418600
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418600&action=review
>> Tools/ChangeLog:10 >> + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and > > What's wrong with that?
It's not supported in Python, it's a case of iterator invalidation: e.g. a = {"a":1, "b": 2, "c": 3} for k in a.keys(): print(k) del a[k] RuntimeError: dictionary changed size during iteration
Lauro Moura
Comment 4
2021-01-28 03:13:39 PST
(In reply to Alicia Boya García from
comment #3
)
> Comment on
attachment 418600
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=418600&action=review
> > >> Tools/ChangeLog:10 > >> + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and > > > > What's wrong with that? > > It's not supported in Python, it's a case of iterator invalidation: > > e.g. > > a = {"a":1, "b": 2, "c": 3} > > for k in a.keys(): > print(k) > del a[k] > > RuntimeError: dictionary changed size during iteration
This. Py2[1] had dict.keys()[1], returning a list, and dict.viewkeys()[2], which returned an iterator (a view) on them. Py3 changed the behavior of keys() to return the view[3]. [1]
https://python.readthedocs.io/en/v2.7.2/library/stdtypes.html#dict.keys
[2]
https://python.readthedocs.io/en/v2.7.2/library/stdtypes.html#dict.viewkeys
[3]
https://docs.python.org/3/library/stdtypes.html#dict.keys
EWS
Comment 5
2021-01-28 04:48:14 PST
Committed
r272011
: <
https://trac.webkit.org/changeset/272011
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 418600
[details]
.
Radar WebKit Bug Importer
Comment 6
2021-01-28 04:49:14 PST
<
rdar://problem/73704686
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug