-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flatpak won't open due to brotli #81
Comments
Yes, since v0.10.1, CoBang has been broken in production (after releasing to FlatHub), while is still Ok if run in development. I'm still trying to fix. It is difficult though, because it can only reproducible after releasing to FlatHub. |
Could you try the v0.10.3? It is not listed on FlatHub yet, but can still try the test build as in flathub/vn.hoabinh.quan.CoBang#9 (comment) |
From #76 (comment), this still exists, though I cannot reproduce it. |
I have recorded an strace log if that helps, after completely uninstalling CoBang and deleting its data and reinstalling it from flathub stable. |
@Artim96 Looking into your log, I find something weird. Your log said that CoBang is running with Python 3.10, but the base Flatpak image of the v0.10.3 comes with Python 3.11. Maybe your system still install the old version of CoBang? |
Ah, the strace.txt log is newer, it is Python 3.11. |
@Artim96 CoBang v0.10.4 has been released, with Python dependencies being upgraded. Could you test if the issue of missing brotli still happen? It doesn't appear on FlatHub yet, you can install by the command in flathub/vn.hoabinh.quan.CoBang#10 (comment) |
Again, same error.
|
The Flatpak package of CoBang is supposed to not include Brotli, its sandbox environment should not have Brotli Python library. But somehow your sandbox environment has an old version of Brotli. I wonder where it is from, maybe the host system leaks to Flatpak sandbox?
$ flatpak run --command=sh vn.hoabinh.quan.CoBang
>>> import brotli
>>> brotli.__file__ and >>> import brotlicffi
>>> brotlicffi.__file__ |
|
I also just went through a few flatpak directories with ripgrep-all to find all mentions of brotli. Here's what I found, maybe that might help.
And looking for files or directories containing brotli in their name, I found this:
|
Your Python shell shows that if brotli is not None:
DECODER_ERROR_CLASSES += (brotli.error,) So weird. |
Could you run Python REPL in the sandbox again and try to run parts of urllib3's code, to see how the First, run all the After this step, please check how Second, run these lines. |
|
Thank you, looking into this >>> import brotli
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'brotli'
>>> brotli.__file__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute '__file__'. Did you mean: '__le__'? I want to cry. Right previously, Python said that -- Update -- Ah, the result: >>> brotli.__file__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute '__file__'. Did you mean: '__le__'? is because |
I notice that when you run the definition code of DECODER_ERROR_CLASSES += (brotli.error,) So in this shell test, the code behaves as expected. |
Sadly, I also can't test if there may be leakage from the OS into the Flatpak container. I have python3-brotli installed (on Debian) because it's required by python3-urllib3 which itself is required e.g. by gnome-music and gnome-browser-connector. And both are required by gnome itself. So Brotli as a Python package may be present on any system with Gnome installed. |
I use Ubuntu and also have |
Hi. I has released v0.10.5, where I include Python Brotli lib. Could you help test? |
When I'm able to update, sure. Right now I only get the error |
0.10.5 was now released. It works now with the only error message being Though the UI seems a bit wonky. In maximized screen you have the results bar in the right, but when scanning e.g. a WiFi QR Code generated by Android (by the settings app, at least on Pixel devices, no idea if that's a Pixel or an Android feature), the results bar moves to the bottom edge to very litlle height with the content showing up in raw results underneath it. The scaling of the raw results bar is off though. It's barely high enough for the text, but the copy button is being cut off. In not maximized screen, there's also only the narrow results bar at the bottom with the raw results underneath, but here the text box is even narrower, also cutting off the top of the text. But that would be something for a different issue. |
Thank you. The UI issue is known. It is the result of my attempt to make the UI responsive, working both on desktop screen and mobile (Linux phone) screen. To workaround it, I will work on a feature of remember window size. The message of "missing libpython3.11.so" is undesired, though. |
While I can't tell if my last issue was fixed with this release, there's now another issue with 0.10.2 preventing the app from even opening:
The text was updated successfully, but these errors were encountered: