MacOS Sonoma and Initial Install Trouble

I downloaded the latest native MacOS Syncthing bundle (https://github.com/syncthing/syncthing-macos/releases/download/v1.27.6-1/Syncthing-1.27.6-1.dmg) on my Mac running Sonoma 14.4.1. If I open the .dmg file and double-click the Syncthing.app, it opens fine. But if I quit Syncthing, copy the Syncthing.app to the Applications folder, then eject the .dmg, Syncthing fails to start from the Syncthing.app in my Applications folder. Am I doing something wrong? (I thought the idea was to open the .dmg file, drag and drop the Syncthing.app file to copy it to the Applications folder, then eject the .dmg file and run Syncthing.app from the Applications folder.)

Sorry if this is a dumb question…I’m a newbie on Mac and Syncthing.

1 Like

Do you get a specific error message?

It may be required to use the “right-click → Open” trick, as it’s content downloaded from the web. A popup may also appear asking to give Syncthing permission to a specific location.

No. I’m not getting an error message. After copying Syncthing.app from the mounted .dmg to the Applications folder, the first time I attempt open Syncthing.app from the Applications folder, I get a Gatekeeper alert that says: “Synthing.app” is an app downloaded from the Internet. Are you sure you want to open it?

I then click “Open” and nothing happens and Syncthing is not listed as a running process in the Activity Monitor.

If I attempt to open the Syncthing.app from the Applications folder while the Syncthing.dmg is mounted, then Syncthing opens and runs as expected. And if I attempt to Eject the Syncthing.dmg, I get an error that “The disk ‘Syncthing’ wasn’t ejected because one or more programs may be using it.”

It’s almost like copying the Syncthing.app file out of the mounted Syncthing.dmg to the Applications folder really created a symbolic link rather than a true copy. But I also tried copying from the mounted Syncthing.dmg to an external USB, the ejecting the .dmg, then copying from the external USB to the Applications folder, and I observed the same behavior.

I then tried another approach and downloaded the Syncthing.dmg to a USB drive using another computer, then I put the USB drive in my MacBook, opened the Syncthing.dmg file, and copied Syncthing.app to the Applications folder, then Ejected the .dmg and the USB. I experience the same behavior. … BUT, oddly, if I open the Syncthing.dmg file I originally downloaded to my MacBook, I can run Syncthing by opening the Syncthing.app file in the Applications folder–but only if the Syncthing.dmg file is mounted.

Could this be because the first time I ran Syncthing.app I just double-clicked it from within the Syncthing.dmg? Is there a setting somewhere in the Mac that I need to clear/delete to remove Syncthing complete and start over?

Thanks for any help you can offer!

I am having the exactly same issue. MacOS Sonoma: 14.4.1 (23E224) Syncthing-1.27.6-1.dmg

It only works when I run the app from mounted img, but once it’s moved to Application directory, it won’t start. No error message, nothing.

Created an account to say the same issue here as well. Sonoma 14.4.1 with the most recent .dmg .

I thought I was going crazy trying to figure out after I had to ‘force unmount’ the .dmg and it stopped working.

I ensured that I used syncthing from the Applications folder and not from the mounted image.

Same here also creating an account to keep this thread open. Syncthing only work with Syncthing .dmg installed and stops working after ejecting the .dmg, even if the app is in my application folder.

Have to click on the .dmg everytime i restart my mac or eject it. Kinda annoying.

macOS: Sonoma 14.4.1 (23E224)

Sounds like a file alias to the Syncthing executable inside the .dmg was created in the Applications folder instead of Syncthing being copied over. In the Applications folder, open the file info for the Syncthing icon to confirm.

Same problem here. Running syncthing 1.27.6-1 installed from dmg. The dmg can’t be ejected if syncthing is running. After a reboot syncthing won’t run until the dmg is mounted and started manually.

Running Mojave 10.14.6. I’ve been advised to not update this iMac to the next version due to it having a spinning hard drive. This version of syncthing is the last version to run on this version of the OS.

Invoking syncthing from the command line works if the dmg is mounted:

$ /Applications/Syncthing.app/Contents/MacOS/Syncthing
2024-05-22 15:21:41.803 Syncthing[743:31679] Launching Syncthing daemon
[monitor] 2024/05/22 15:21:42 INFO: Log output saved to file "/Users/xxxxxx/Library/Application Support/Syncthing/syncthing.log"
[start] 2024/05/22 15:21:42 INFO: syncthing v1.27.6 "Gold Grasshopper" (go1.22.2 darwin-amd64) builder@github.syncthing.net 2024-04-08 09:14:27 UTC [stnoupgrade]
[start] 2024/05/22 15:21:42 INFO: No automatic upgrades; STNOUPGRADE environment variable defined.
[6V4QC] 2024/05/22 15:21:42 INFO: My ID: XXX-XXX-XXX
[6V4QC] 2024/05/22 15:21:43 INFO: Single thread SHA256 performance is 196 MB/s using minio/sha256-simd (195 MB/s using crypto/sha256).
[6V4QC] 2024/05/22 15:21:44 INFO: Hashing performance is 177.55 MB/s
[6V4QC] 2024/05/22 15:21:44 INFO: Overall send rate is unlimited, receive rate is unlimited

If the dmg is not mounted then it fails with this:

$ /Applications/Syncthing.app/Contents/MacOS/Syncthing
2024-05-22 15:20:58.671 Syncthing[726:30802] Launching Syncthing daemon
2024-05-22 15:20:58.673 Syncthing[726:30802] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'launch path not accessible'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff4ba01191 __exceptionPreprocess + 256
        1   libobjc.A.dylib                     0x00007fff7630e3c6 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff4ba00fc3 +[NSException raise:format:] + 193
        3   Foundation                          0x00007fff4dc17d0f -[NSConcreteTask launchWithDictionary:error:] + 1291
        4   Syncthing                           0x000000010cb8d4b4 $s9Syncthing13DaemonProcessC10launchSync33_0FD8DCCA19D624BF8C5622D28ABDF3D0LLyyF + 1316
        5   Syncthing                           0x000000010cb8f5b0 $s9Syncthing13DaemonProcessC12didTerminate33_0FD8DCCA19D624BF8C5622D28ABDF3D0LLyySo6NSTaskCFyycfU0_TA + 16
        6   Syncthing                           0x000000010cb8ccd9 $sIeg_IeyB_TR + 25
        7   libdispatch.dylib                   0x00007fff77a875f8 _dispatch_call_block_and_release + 12
        8   libdispatch.dylib                   0x00007fff77a8863d _dispatch_client_callout + 8
        9   libdispatch.dylib                   0x00007fff77a8e8e0 _dispatch_lane_serial_drain + 602
        10  libdispatch.dylib                   0x00007fff77a8f396 _dispatch_lane_invoke + 385
        11  libdispatch.dylib                   0x00007fff77a976ed _dispatch_workloop_worker_thread + 598
        12  libsystem_pthread.dylib             0x00007fff77cc8611 _pthread_wqthread + 421
        13  libsystem_pthread.dylib             0x00007fff77cc83fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
1 Like

^ This, I think.

1 Like

Not sure what I’m looking for. Did the file info on the icon in the Applications folder and it says 70MB on disk. I can look into the contents of the app and manually launched the MacOS binary (above): /Applications/Syncthing.app/Contents/MacOS/Syncthing to produce the error messages above.

What size does Finder’s file info report for the Syncthing icon in the Applications folder after the Syncthing .dmg is ejected?

How did you install Syncthing from the .dmg? (Please describe it as though I don’t know anything about macOS.)

That was the size with the dmg ejected.

I downloaded the dmg, double clicked it, a window appears with the syncthing icon and the applications folder icon, I dragged the syncthing icon to the applications folder icon in the same window. There were probably permissions prompts that I acknowledged along the way…

Here is the issue:

When the syncthing app runs it launches the menu tray app:

/Applications/Syncthing.app/Contents/MacOS/Syncthing

The menu tray app in turn launches the syncthing program but uses the path to the mounted dmg:

/Volumes/Syncthing/Syncthing.app/Contents/Resources/syncthing/syncthing

This is visible by running a ps while the dmg is mounted and syncthing is running:

 ps -fe | grep -i syncthing
  501  2568     1   0  1:17PM ??         0:00.45 /Applications/Syncthing.app/Contents/MacOS/Syncthing -psn_0_1212712
  501  2569  2568   0  1:17PM ??         0:00.06 /Volumes/Syncthing/Syncthing.app/Contents/Resources/syncthing/syncthing -no-browser -no-restart -logfile=default
  501  2570  2569   0  1:17PM ??         0:04.44 /Volumes/Syncthing/Syncthing.app/Contents/Resources/syncthing/syncthing -no-browser -no-restart -logfile=default
  501  2592  2538   0  1:17PM ttys000    0:00.00 grep -i syncthing

Where

/Volumes/Syncthing/

is the location where syncthing.dmg is mounted.

I have two (ugly) ways to work around this issue, pick one:

1)

Follow the instructions on the syncthing web site

https://docs.syncthing.net/users/autostart.html#macos

to automatically start syncthing by using

/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing

as the program to launch at login. This works without the dmg being mounted but does not launch the menu tray program.

2)

Create a symbolic link from the mount point to the actual location.

Eject the dmg image.

Create a symbolic link where the dmg was previously mounted:

sudo mkdir /Volumes/Syncthing
sudo ln -s /Applications/Syncthing.app/ /Volumes/Syncthing/Syncthing.app

This allows the syncthing menu tray to run and launch the real syncthing program from the wrong path via the symbolic link.

This is a really ugly hack to work around the bug. I’m OK with the ugliness since I doubt this will be fixed for my old version of macOS.

Sorry for the tangent…

While a SSD almost always an improvement compared to a similar sized HDD, I haven’t seen it stated in any of Apple’s system requirements for macOS releases above Mojave/14 that a SSD is required. Perhaps the advice is in regards to the vintage of the iMac (which model year is yours?).

I skimmed thru the syncthing-macos source code and didn’t see any hard-coded reference that would cause the tray app to always default to the mounted .dmg. The tray app finds the location of the Syncthing executable via the macOS defaults for the user, so I wonder if the problem has something to do with Apple’s sandboxing of apps.

But in any event, syncthing-macos has a hidden feature for advanced configuration. Instead of the “ugly hack” with a separate autostart or symlink to a fake mounted volume, try telling the tray app where to find your Syncing executable with the following command:

defaults write com.github.xor-gate.syncthing-macosx Executable /Users/doublevision/Downloads/syncthing-binary

Customize the /Users/doublevision/Downloads/syncthing-binary path as needed.

(I’m not an Apple Swift programmer, and don’t even play one on TV, so caveat emptor. :wink:)

iMac 27 inch, late 2012 with 16GB of RAM and rotating hard drive. It is painfully slow with multiple programs hitting the drive. I’ve considered but haven’t yet tried running from an external SSD since it does have USB3.

The replacement for this system has already arrived but it is running a newer version of the presentation software that the church uses and they won’t transition to the newer system until they have learned how to drive the newer software.

The suggestion to not upgrade the OS came from this page and is not an Apple system requirement.

https://discussions.apple.com/thread/253890508?sortBy=best

The specific quote:

However, if your iMac has the original mechanical hard drive, it will be quite slow with any os version higher than Mojave 10.14.

The system is already super slow and upgrading it will apparently only make it slower…

I’m interested in trying this! I plan to set it to the “right” location:

/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing

Is there a way to read the current setting of com.github.xor-gate.syncthing-macosx before I overwrite it?

Ah… I see. It’s all the multitasking and optimizations Apple has made for its devices after going all in on SSDs.

Given the iMac’s model year, unfortunately the only upgrade path to a newer major macOS release is Catalina/10.15 with no support from Big Sur, Monterey, Ventura and Sonoma.

With an almost 14-year-old spinning hard drive, it’s not surprising that it’s getting sluggish. Manufacturers of consumer HDDs estimate a 2-3 year lifespan for a drive that’s on 8 hours per day, so anything longer is luck and borrowed time.

Since a late 2012 iMac has a respectable Intel Core i5 quad-core CPU and a 128GB SATA SSD can be easily had for less than $20, it might be worth upgrading: https://ifixit.com/Guide/iMac+Intel+27-Inch+EMC+2546+Hard+Drive+Replacement/15796

(Apple’s love of glue instead of screws makes repairs and upgrades a bigger pain than it needs to be. I’m okay with it on phones and tablets, but a desktop really doesn’t need to be a 1/4" thick.)

Yup, just a minor tweak. Swap out the write command with read and leave out the path like this:

defaults read com.github.xor-gate.syncthing-macosx Executable

In the line above, com.github.xor-gate.syncthing-macosx is referred to as the “domain” while Executable is the “key” in the preferences database (there are multiple keys available under the domain used by syncthing-macos).

I found how to dump it and indeed it is set incorrectly on my system:

defaults find com.github.xor-gate.syncthing-macosx
Found 8 keys in domain 'com.github.xor-gate.syncthing-macosx': {
    ApiKey = ...;
    Arguments = "";
    Executable = "/Volumes/Syncthing/Syncthing.app/Contents/Resources/syncthing/syncthing";
    "NSStatusItem Visible Item-0" = 1;
    SUEnableAutomaticChecks = 0;
    SUHasLaunchedBefore = 1;
    StartAtLogin = 1;
    URI = "https://127.0.0.1:8384";
}

I undid my previous changes, the symlink method, and followed @gadget suggestion with this command:

defaults write com.github.xor-gate.syncthing-macosx Executable /Applications/Syncthing.app/Contents/Resources/syncthing/syncthing

and it works!

Thanks @gadget!