2nv2u / gnome-shell-extension-syncthing-indicator

Put an indicator on the panel signalling the Syncthing daemon status using SystemD
https://extensions.gnome.org/extension/1070/syncthing-indicator/
GNU General Public License v3.0
59 stars 10 forks source link

syncthing-indicator starts syncthing but issues 'can't find syncthing confi' notification and doesn't update tray app #19

Closed xiccarph closed 2 years ago

xiccarph commented 2 years ago

Hi, Great, simple indicator.

After syncing gnome-shell extensions between two machines, my previously working syncthing tray indicator on an updated (from 25 to 27) machine started throwing this error message "Syncthing Indicator Cannot find syncthing config, syncthing might not be installed, check log for more details."

The syncthing-indicator is starting syncthing. I can access the web interface independently, and files sync. The .local/share/gnome-shell/extensions/syncthing@gnome.2nv2u.com directories and files are identical.

The tray app show syncthing as not running, the host device and other connected devices are not identified, and no folder are populated in the drop down. I can toggle the Service and Autostart toggles, and they start and stop the service and autostarting.

Not sure where else to look to troubleshoot this and hoping you can help, is there some other setting that may or may not have been synced which would throw this error? I have uninstalled the extension multiple times between shell restarts and complete reboots, and nothing will get the tray indicator to update with devices and folders, although syncthing is running.

Thank you for any insight you might have.

2nv2u commented 2 years ago

Hi, I did change the way it detects the syncthing config by retrieving the config from synthing itself, can you execute this command: "syncthing --paths" in a terminal and tell me if the result of the config line matches your config location? If it doesn't work can you tell me how you installed syncthing?

xiccarph commented 2 years ago

Okay, that obvious step helped me figure out what was going on, Thank you for your prompt reply.

For future knuckleheads like me...I had at sometime tried the inferior synchthing-tray app image...it existed in my PATH in my user bin where I had 'helpfully' created a symbolic link for 'syncthing'. Your 'syncthing --paths' was pulling that symbolic link that I had left active, and would fail without being able to pickup the configs in their default location.

All fixed now. Thanks again for this nice little extension, and suggesting the obvious test to see what was going on.

lucker999 commented 2 years ago

On NixOS syncthing --paths just doesn't work, alas.

$ systemctl status syncthing
● syncthing.service - Syncthing service
     Loaded: loaded (/etc/systemd/system/syncthing.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-11-03 17:08:25 MSK; 49min ago
   Main PID: 7205 (syncthing)
         IP: 137.9M in, 12.2M out
         IO: 20.5M read, 216.6M written
      Tasks: 20 (limit: 9504)
     Memory: 304.9M
        CPU: 19.298s
     CGroup: /system.slice/syncthing.service
             ├─7205 /nix/store/7x0m9g1kqa6gn4vg9lmizr2lysdkhqz8-syncthing-1.20.4/bin/syncthing -no-browser -gui-address=127.0.0.1:8384 -home=/home/vitaly/.config/syncthing
             └─7220 /nix/store/7x0m9g1kqa6gn4vg9lmizr2lysdkhqz8-syncthing-1.20.4/bin/syncthing -no-browser -gui-address=127.0.0.1:8384 -home=/home/vitaly/.config/syncthing

... and

$ whereis syncthing
syncthing:

This path /nix/store/7x0m9g1kqa6gn4vg9lmizr2lysdkhqz8-syncthing-1.20.4/bin/syncthing is changed each time a run nixos-rebuild switch, meaning with each change in my configuration.nix, e.g. after each update