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

Can't enter a Control Server URL due to permission issues #103

Open
dariusarnold opened this issue Mar 20, 2024 · 2 comments
Open

Can't enter a Control Server URL due to permission issues #103

dariusarnold opened this issue Mar 20, 2024 · 2 comments

Comments

@dariusarnold
Copy link

dariusarnold commented Mar 20, 2024

Hi,
I wanted to try Trayscale as a tailscale GUI client on my laptop. I have experienced the following issue when entering a custom Control Server URL:

Steps to reproduce:

  1. On a default (not configured install)
  2. Open the preferences with the hamburger menu
  3. Try to enter any text in the Control Server URL Box in the Advanced section

Observed behaviour:

  1. Every character is immediately deleted after it is typed. The characters just flash up once and are gone after ~50 ms. It seems like they are actually deleted and not just invisible, since entering my Control Server URL and accepting by pressing the checkmark still does not let me connect (I am unable to toggle the slider in the top left of the screen).

Expected behaviour:

  1. Characters are not deleted when typing the the Control Server URL box.

Further analysis results

  • I am able to type in other textboxes of other applications just fine
  • I ran sudo tailscale set --operator=$USER from the command line; I am unsure if there is a way for tailscale to print the config. But I can run 'tailscale serve reset' with my user account without sudo being required, while it requires sudo on another machine where I did not set the operator
  • I tried restarting the tailscaled systemd service and then restarting Trayscale. This seemed to help somewhat, the characters weren't getting deleted immediately and I was able to enter a URL and accept it. But toggling the connection still did not work and Trayscale froze:
    image
  • EDIT: I tried the different command for setting the operator mentioned here, and this solved the issue I described. I was able to enter and accept a server. Trying to toggle the connection would open a browser page for the login of the original URL though. Restarting the tailscaled service returned the original issue of characters getting deleted every few seconds and the access denied log messages came back.

I collected the following logs:

flatpak run dev.deedles.Trayscale
2024/03/20 22:28:49 systray error: failed to request name: org.freedesktop.DBus.Error.ServiceUnknown
2024/03/20 22:28:49 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:28:49 ERROR adw_application_window_set_content: assertion 'gtk_widget_get_parent (content) == NULL' failed glib_old_log_api=1 priority=4 glib_domain=Adwaita
2024/03/20 22:28:49 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:28:49 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:28:49 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:28:54 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:28:54 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:28:59 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:28:59 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:29:00 WARN No IM module matching GTK_IM_MODULE=cedilla found priority=4 code_file=../gtk/gtkimmodule.c code_line=212 code_func=_gtk_im_module_get_default_context_id glib_domain=Gtk
2024/03/20 22:29:04 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:29:04 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:29:09 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:29:09 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""
2024/03/20 22:29:14 ERROR get waiting files err="Access denied: file access denied"
2024/03/20 22:29:14 ERROR update control plane server URL err="start local client: Access denied: access denied" url=""

The lines with access denied are printed every time the characters get deleted.

Information about my system:
I installed Trayscale using flatpak and tailscale from the Tumbleweed repository using zypper, this is the version information:

flatpak info dev.deedles.Trayscale

DeedleFake - An unofficial GUI wrapper around the Tailscale CLI.

          ID: dev.deedles.Trayscale
         Ref: app/dev.deedles.Trayscale/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: v0.11.0
     License: MIT
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 59.4 MB
     Runtime: org.gnome.Platform/x86_64/45
         Sdk: org.gnome.Sdk/x86_64/45

      Commit: 5f476f7e2e10c30971d4e2d500b060c28b9bd056e5ab2a8f692c3b7dac5cc36b
      Parent: cd8261a185aa75acdc856668649a1fd9db43acc4e1512229ba243a834578a216
     Subject: update Tailscale to v1.62.0 (#22) (85bdfce3)
        Date: 2024-03-18 15:11:46 +0000
tailscale --version
1.62.0
  tailscale commit: cc950c079140abfdaaf69777fa171f0bcfa63598-dirty
  go version: go1.22.1

My system:
KDE Plasma Version 6.0.2 with X11
KDE Frameworks Version 6.0.0
Qt Version 6.6.2

lsb_release -a
LSB Version:	n/a
Distributor ID:	openSUSE
Description:	openSUSE Tumbleweed
Release:	20240315
Codename:	n/a
uname -a
Linux pygmy 6.7.7-1-default #1 SMP PREEMPT_DYNAMIC Fri Mar  1 13:51:21 UTC 2024 (1ff84c5) x86_64 x86_64 x86_64 GNU/Linux
@DeedleFake
Copy link
Owner

Hmmm... The URL that it sends you to for authentication is given to Trayscale by the Tailscale daemon. This may be a bit of a chicken and egg problem, as the login server can only be set when starting the server, unlike most options. There's a TODO in Tailscale's code to make it work like the other ones, but at the moment it does not.

Can you try changing the URL manually and then restarting Trayscale? It should be

$ tailscale up --login-server <URL>

It might complain about not setting other options that are already set. If so, just copy the options that it tells you about and add them to the above command. There is also a possibility that it'll need to be brought down manually with tailscale down first.

@dariusarnold
Copy link
Author

If I set the URL using tailscale command and then start Trayscale, the URL will be shown in preferences. Trying to connect opens the browser with the custom URL passed in the command. So that is a valid workaround. I think it deserves mentioning in the README like the operator flag. Otherwise new users who try to setup the GUI first will run into this.

I experienced a minor issue when I first had a typo in the URL, making it not being resolved by DNS: Trayscale shows a modal popup asking me to confirm opening the Browser for the authentication. Confirming it shows a error message related to not being able to launch the browser (it was previously able to). This is the screenshot of the error:
image

The following is logged to console:

2024/03/22 20:39:55 systray error: failed to request name: org.freedesktop.DBus.Error.ServiceUnknown
2024/03/22 20:39:55 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:39:55 ERROR adw_application_window_set_content: assertion 'gtk_widget_get_parent (content) == NULL' failed glib_old_log_api=1 priority=4 glib_domain=Adwaita
2024/03/22 20:39:55 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:40:00 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:40:02 WARN No IM module matching GTK_IM_MODULE=cedilla found priority=4 code_file=../gtk/gtkimmodule.c code_line=212 code_func=_gtk_im_module_get_default_context_id glib_domain=Gtk
2024/03/22 20:40:05 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:40:10 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:40:15 ERROR get waiting files err="Access denied: file access denied"
2024/03/22 20:40:20 ERROR get waiting files err="Access denied: file access denied"

The last line is then repeated infinitely every 5 s.
I noticed ratelimits to bootstrapDNS in the tailscaled log and noticed the typo. But maybe the error message could show the URL it is failing to open.

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

No branches or pull requests

2 participants