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

When Syncthing.app is first time started from DMG under /Volumes the Executable is set and not reset back to /Applications #228

Open
bartek-galazka opened this issue Sep 26, 2024 · 17 comments

Comments

@bartek-galazka
Copy link

Recap:

  • Downloaded the DMG release
  • Mounted DMG
  • Installed it on macOS 12.6 by putting .app in Application folder
  • Unmounted DMG
  • Tried to open - nothing happened just tray icon seen for "0.00001 s" and disapeared
  • Nothing works in background
  • The ~/Library/Application Support/Syncthing/syncthing.log syncthing daemon logfile is NOT created

Works only if dmg is mounted

@xor-gate xor-gate added the macos-12 macOS Monterey label Sep 27, 2024
@xor-gate
Copy link
Member

Hi @bartek-galazka, thanks for the report. Could you check the following:

  • Which version are you using?
  • Execute defaults read com.github.xor-gate.syncthing-macosx Executable from Terminal.app (console)

My iMac is running still on macOS 12.7.6 so I have a similair setup.

@xor-gate
Copy link
Member

xor-gate commented Sep 27, 2024

Check for Quarantine Flag

macOS sometimes adds a quarantine flag when downloading apps from the internet, preventing the app from launching properly.

To check for the quarantine flag, run the following command in Terminal:
xattr -lr /Applications/<YourApp>.app

If you see com.apple.quarantine in the output, remove the quarantine flag using:
sudo xattr -dr com.apple.quarantine /Applications/<YourApp>.app

Gatekeeper and App Verification

Sometimes macOS Gatekeeper blocks apps from unknown developers.
Try opening the app by right-clicking the app in /Applications and selecting Open. This often forces Gatekeeper to bypass the security warning.
You can also check System Preferences → Security & Privacy → General to allow the app to be opened if a warning is listed

@bartek-galazka
Copy link
Author

Hi @bartek-galazka, thanks for the report. Could you check the following:

  • Which version are you using?
  • Execute defaults read com.github.xor-gate.syncthing-macosx Executable from Terminal.app (console)

My iMac is running still on macOS 12.7.6 so I have a similair setup.

Syncthing-1.27.12-1.dmg

image

@bartek-galazka
Copy link
Author

Check for Quarantine Flag

macOS sometimes adds a quarantine flag when downloading apps from the internet, preventing the app from launching properly.

To check for the quarantine flag, run the following command in Terminal: xattr -lr /Applications/<YourApp>.app

If you see com.apple.quarantine in the output, remove the quarantine flag using: sudo xattr -dr com.apple.quarantine /Applications/<YourApp>.app

I did this. Still doesn't work. But I still see many other things in the output like this:

image

Maybe this is the reason?

Gatekeeper and App Verification

Sometimes macOS Gatekeeper blocks apps from unknown developers. Try opening the app by right-clicking the app in /Applications and selecting Open. This often forces Gatekeeper to bypass the security warning. You can also check System Preferences → Security & Privacy → General to allow the app to be opened if a warning is listed

Not the case, that was the first thing I have checked :)

@bartek-galazka
Copy link
Author

Now I noticed this:

image

@xor-gate
Copy link
Member

What does Execute defaults read com.github.xor-gate.syncthing-macosx Executable from Terminal.app (console) say?

@xor-gate
Copy link
Member

Please paste the whole error text and not a half a screenshot

@bartek-galazka
Copy link
Author

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

@bartek-galazka
Copy link
Author

Please paste the whole error text and not a half a screenshot

image

@xor-gate
Copy link
Member

xor-gate commented Oct 3, 2024

Problem is you have executed Syncthing.app first time from /Volumes (thus DMG). Reset by deleting the key. After delete quit Syncthing and restart the App.

jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing
jerry@Jerrys-iMac ~ % defaults delete com.github.xor-gate.syncthing-macosx Executable
jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
2024-10-03 18:14:06.948 defaults[23713:8389162]
The domain/default pair of (com.github.xor-gate.syncthing-macosx, Executable) does not exist
jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing

@xor-gate xor-gate closed this as completed Oct 3, 2024
@xor-gate xor-gate added enhancement and removed macos-12 macOS Monterey labels Oct 3, 2024
@xor-gate
Copy link
Member

xor-gate commented Oct 3, 2024

Maybe we should fix this and check if the Syncthing.app is executed from /Volumes. Reopening for an enhancement.

@xor-gate xor-gate reopened this Oct 3, 2024
@xor-gate xor-gate changed the title App works only if dmg is mounted When Syncthing.app is first time started from DMG under /Volumes the Executable is set and not reset back to /Applications Oct 3, 2024
@kevinlinxc
Copy link

Just want to say I came here thinking nothing happened when my syncthing started (I started it from /Applications). Turns out the app doesn't have a UI like I thought, the UI is at http://localhost:8384/ and I just needed to go there

@xor-gate
Copy link
Member

Just want to say I came here thinking nothing happened when my syncthing started (I started it from /Applications). Turns out the app doesn't have a UI like I thought, the UI is at http://localhost:8384/ and I just needed to go there

The Syncthing macOS bundle has a GUI and is only visible in the system status bar. When nothing shows up in the status bar you have hit issue #192. Also when you have a fresh installation we need #188.

@lukcic
Copy link

lukcic commented Oct 31, 2024

Problem is you have executed Syncthing.app first time from /Volumes (thus DMG). Reset by deleting the key. After delete quit Syncthing and restart the App.

jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing
jerry@Jerrys-iMac ~ % defaults delete com.github.xor-gate.syncthing-macosx Executable
jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
2024-10-03 18:14:06.948 defaults[23713:8389162]
The domain/default pair of (com.github.xor-gate.syncthing-macosx, Executable) does not exist
jerry@Jerrys-iMac ~ % defaults read com.github.xor-gate.syncthing-macosx Executable
/Applications/Syncthing.app/Contents/Resources/syncthing/syncthing

I had the same issue, @xor-gate your solution helped. Thanks a lot.

@Yaldabaoth666
Copy link

How do I change the Executable?

@xor-gate
Copy link
Member

xor-gate commented Nov 2, 2024

How do I change the Executable?

As mentioned in the previous comments by me by typing the command in the Terminal.app then quit and start Syncthing from /Applications again:

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

@Yaldabaoth666
Copy link

Thank You! I was confused with other terminal commands and over complicated it 😆. You are the best!

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

No branches or pull requests

5 participants