Skip to content
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

torbrowser-launcher does not run ubuntu 22.04 #628

Closed
NoLandMen496 opened this issue Mar 9, 2022 · 18 comments
Closed

torbrowser-launcher does not run ubuntu 22.04 #628

NoLandMen496 opened this issue Mar 9, 2022 · 18 comments

Comments

@NoLandMen496
Copy link

Hi. I know I am using a daily build of ubuntu 22.04, but is there any way to solve the issue? The code:

torbrowser-launcher 
Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.3
https://github.com/micahflee/torbrowser-launcher
Downloading Tor Browser for the first time.
Downloading https://aus1.torproject.org/torbrowser/update_3/release/Linux_x86_64-gcc3/x/en-US

Traceback (most recent call last):
  File "/usr/bin/torbrowser-launcher", line 30, in <module>
    torbrowser_launcher.main()
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/__init__.py", line 98, in main
    gui.move(
TypeError: arguments did not match any overloaded call:
  move(self, QPoint): argument 1 has unexpected type 'float'
  move(self, int, int): argument 1 has unexpected type 'float'
@timoa
Copy link

timoa commented Apr 24, 2022

Same issue with the official Ubuntu 22.04 LTS, released on the 21st April 2022.

The shortcuts on menu and desktop are created, but it is not able to download the latest Tor Browser release.

The install crashed every time we launch Tor Browser Launcher with same error.

@Am0rphous
Copy link

Same on Kali Linux:

Kernel: 5.8.0-kali3-amd64
Release: 2022.2
Codename: kali-rolling

@teward
Copy link
Contributor

teward commented Jun 22, 2022

All: This is a Python 3.10 issue introduced by heavier strictness - see #599 - it's the same issue regardless of the distro in use

niccokunzmann added a commit to niccokunzmann/torbrowser-launcher that referenced this issue Jul 5, 2022
@j2l
Copy link

j2l commented Jul 28, 2022

I guess it's fixed because it's closed, but 0.3.3.6 is still the installable deb package and it fails to run.
I understand it's updated on flatpak ... which I uninstalled completely since it sucks at memory management and bloats my Linux, example, on a brand new Ubuntu 22.04:

Required runtime for com.github.micahflee.torbrowser-launcher/x86_64/stable (runtime/org.kde.Platform/x86_64/5.15-21.08) found in remote flathub
        ID                                                  Branch     Op Remote  Download
 1. [ ] org.freedesktop.Platform.GL.default                 21.08      i  flathub   131.0 MB
 2. [ ] org.freedesktop.Platform.GL.nvidia-515-48-07        1.4        i  flathub   361.3 MB
 3. [ ] org.freedesktop.Platform.openh264                   2.0        i  flathub   < 1.5 MB
 4. [ ] org.gtk.Gtk3theme.Pop-dark                          3.22       i  flathub < 226.0 kB
 5. [ ] org.kde.Platform.Locale                             5.15-21.08 i  flathub < 345.7 MB (partial)
 6. [ ] org.kde.PlatformTheme.QGnomePlatform                5.15-21.08 i  flathub  < 10.0 MB
 7. [ ] org.kde.PlatformTheme.QtSNI                         5.15-21.08 i  flathub   < 1.3 MB
 8. [ ] org.kde.WaylandDecoration.QGnomePlatform-decoration 5.15-21.08 i  flathub  < 10.5 MB
 9. [ ] org.kde.Platform                                    5.15-21.08 i  flathub < 306.9 MB
10. [ ] com.github.micahflee.torbrowser-launcher            stable     i  flathub   < 8.0 MB

Yeah, around 1.3GB, just to launch already present Tor!

The only useful flatpak commands I know is flatpak uninstall --all and its friend: rm -R ~/.local/share/flatpak

Hope it will be updated soon as deb.
Meanwhile CLI is my friend: <tor_location>/Browser/start-tor-browser --detach or copy the downloaded Tor Browser .desktop file and it's folder into ~/.local/share/applications and ALT+F2 > r
Have a great day!

@lazytownfan
Copy link

According to this Q&A from Ask Ubuntu, the location of the __init__.py file is at /usr/lib/python3/dist-packages/torbrowser_launcher/__init__.py - in case you haven't been able to find this info by looking at only GitHub comments.

I think I will try to report this directly on Ubuntu Launchpad, as this is affecting me on Pop!_OS 22.04. However, this issue doesn't occur on Debian Sid, which is on version 0.3.5-3 and doesn't experience this issue. (The bug tracker hasn't seen any activity since 2019.)

For whatever reason, Ubuntu's packaging of torbrowser-launcher lags behind upstream Debian Sid (even for the latest, non-LTS releases of Ubuntu). Even the upcoming release Kinetic is still on 0.3.3-6ubuntu1.

You may compare Jammy with Debian Sid. Also, you can compare Ubuntu's changelog with the GitHub release tags.

@Flashwalker
Copy link

Flashwalker commented Aug 2, 2022

The same fail, Pop!_OS 22.04, python 3.10
Even if set python to 3.9:
sudo update-alternatives --config python

@icceland
Copy link

icceland commented Aug 6, 2022

Open as root file
/usr/lib/python3/dist-packages/torbrowser_launcher/init.py

At the end of the file (lines 98 - 101) locate:

            gui.move(
                (desktop.width() - window_size.width()) / 2,
                (desktop.height() - window_size.height()) / 2
            )

Edit it to:

            gui.move(
                (desktop.width() - window_size.width()) // 2,
                (desktop.height() - window_size.height()) // 2
            )

As you see, the difference is replacing / with //.

Done.

@Am0rphous
Copy link

Awesome, thanks @icceland !
I can confirm that this made it work on 22.04.

Did you make a pull request?

@icceland
Copy link

icceland commented Aug 7, 2022

Thanks for your kind answer @Am0rphous .
I'm honestly glad to be somehow helpful. I'm barely familiar with github structure and out of time to learn it at the moment. It would be generous if you could do this for me and all thees other users out there.
Feel free to do it for me. Can we count with you?
Kind regards!

Awesome, thanks @icceland ! I can confirm that this made it work on 22.04.

Did you make a pull request?

@teward
Copy link
Contributor

teward commented Aug 7, 2022

Thanks for your kind answer @Am0rphous . I'm honestly glad to be somehow helpful. I'm barely familiar with github structure and out of time to learn it at the moment. It would be generous if you could do this for me and all thees other users out there. Feel free to do it for me. Can we count with you? Kind regards!

Awesome, thanks @icceland ! I can confirm that this made it work on 22.04.
Did you make a pull request?

I was already prepping a patch that I can SRU into Ubuntu's packaging. I can adapt it to a PR and give you credit in the commit message @icceland.

teward added a commit to teward/torbrowser-launcher that referenced this issue Aug 7, 2022
Python 3.9+ started doing strict enforcement of types.  This results in the GUI function methods not functioning properly in modern Python environments.

Fixes torproject#628

Thanks to @icceland in bug 628 for the fix stated in the bug.
@teward
Copy link
Contributor

teward commented Aug 7, 2022

@icceland and others: Pull request made (see #646) using the code as stated here by icceland modified into the init file as based here in the code (which is ${GIT_ROOT}/torbrowser_launcher/__init__.py)

@Am0rphous
Copy link

Seems @teward was a bit faster then me @icceland :D

Thanks to both of you!! 🥇🥇

@lazytownfan
Copy link

The bug fix by @teward for Ubuntu's packaging will likely be processed in at least 1 week before PR #646 is accepted here on GitHub.

@siriusstar2007
Copy link

Hello,

How do I open the file init.py to modify it?

Thank you!

@siriusstar2007
Copy link

I managed to open the init.py file with the Qt Creator application but I can't save the changes I made because I don't have the permission.
Should I open the init.py file in root mode and if so, how should I do?

Thanks a lot!

@Am0rphous
Copy link

@siriusstar2007 Yes, use e.g. nano.
sudo nano /name/my/file

@teward
Copy link
Contributor

teward commented Sep 12, 2022

FYI in Ubuntu 22.04 this has been fixed with my patch and an SRU.

@ghost ghost mentioned this issue Dec 9, 2022
@micahflee
Copy link
Collaborator

Fixed in 8c69da1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
10 participants