Windows 11 2024H2 - TrayIcon won't load when starting Duplicati as a service

When I’ve started the first tray icon, it’s always hung after that so lately ( after I stop the service ) , I’ve also used “TASKKILL /F /IM duplicati* /T” to make sure all tray tasks are stopped.

I’ve also checked the drive to confirm there are no other older versions hiding / referenced.

You are currently running Duplicati - 2.1.0.3_beta_2025-01-22

To get messages into the EventLog, Duplicati first needs to create the event log, which requires elevated privileges. Usually, if you have started the Server once with elevated privileges, this should have created the event logs.

When you run Duplicati.GUI.TrayIcon.exe --no-hosted-server --webservice-password=xxx does it exit immediately? Can you see any process in TaskMgr.exe?

If it crashes there should be an entry in the Windows Event Viewer with some details on the crash. If not, it looks like it simply exits, which I do not understand.

It is possible that something has locked the folder %LOCALAPPDATA%\Duplicati\control_dir_v2 and Duplicati might treat this as an indication that another process is running, but this logic should not be triggered when --no-hosted-server is set.

Test setup attempt

Just for testing, if you start a command prompt and start the server:

Duplicati.Server.exe --webservice-password=1234 --webservice-port=8111

It should keep running (until you close the shell) and you should be able to access it from the browser with the insecure password.

Then, in another command pompt, run:

Duplicati.GUI.TrayIcon.exe --webservice-password=1234 --no-hosted-server --hosturl=http://localhost:8111

This should then show the icon in the Windows Tray area.
It is sometimes hidden with a small arrow next to the clock and icons in the bottom right.

With this you should be able to see in TaskMgr.exe that you have both Duplicati.Server.exe and Duplicati.GUI.TrayIcon.exe running.

Can you try that and see if it triggers some errors or messsages of any kind?

Although I’d encourage more voices, lots of this was commented on in my testing earlier.
To add to that, I just tried again with the previously running Windows service and 2.1.0.3.
This time I didn’t put 2.1.0.2 in the mix. 2.1.0.3 put nothing to the terminal. Event may be:

(deleted since I can’t get it again)

based on the time. It’s still a guess, but the TaskBar icon and distorted TrayIcon menu happened.
Because I don’t like it telling Microsoft about crashes, I’ll do Task Manager kill instead, to remove both of those visual artifacts.

EDIT:

Windows Terminal looks like below. I start Windows service on port 8900 to keep it out of the way.

C:\Duplicati\duplicati-2.1.0.3_beta_2025-01-22-win-x64-gui>Duplicati.GUI.TrayIcon --no-hosted-server --webservice-password=password --hosturl=http://localhost:8900

C:\Duplicati\duplicati-2.1.0.3_beta_2025-01-22-win-x64-gui>

Same issue occurs when using this approach.

  1. generated server on port 8111 using your command line
  2. attempted to connect to server on port 8111 using your other command line
  3. Tray icon launches as normal, when I right click and attempt to connect, it does not respond. (Took screenshot)
  4. No events in System, Security or App log appear related.
  5. Starting the server with --log-file=C:\duplicati-server.log generates logs (one line, the “No database encryption key was found” )
  6. Starting the tray icon with --log-file=C:\duplicati-tray.log generates nothing

Didn’t find any duplicati related events and could not get tray icon logging per other response just now.

I’ll tentatively retract my timing-related event, as I can’t get it again in another test run that failed.

Thanks for trying this and reporting the results.

I have updated the code a lot around the TrayIcon, so I believe this will be fixed with the next canary build.

With the new code, it will support a “disconnected” state where the icon is gray and a menu can be used to “reconnect”. I have also fixed a few issues with authentication failing and rewritten the menu’s to use continuations so they are less prone to hanging the UI. This was tested on Windows, Ubuntu, and MacOS.

2 Likes