bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.07k stars 229 forks source link

Fatal error uncaught exception after selecting default profile #1058

Open p2635 opened 4 days ago

p2635 commented 4 days ago

Context

Hi all, I came to know unison from https://github.com/lra/mackup/issues/1924, because I was exploring ways to backup any important application configurations that I use daily. My needs are simple, they can be configs such as vscode settings, slack preferences etc. Your generic stuff basically. I am still learning how to do this stuff for the first time.

Problem

It's my first time trying to use unison, but unfortunately I get this error. Let me know if I can somehow get you more logs.

Environment

Steps to reproduce:

  1. Launch unison the first time
  2. Select the default profile by double clicking it
image

Actual Results

image

I can consistently reproduce this bug.

Logs

2024-09-26 20:35:49.614 Unison[41819:9976841] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
Preferences:
ui = graphic
listen =
socket =
server = false
prefsman =
prefsdocs = false
doc =
version = false
i = false
color = default
silent = false
dumbtty = false
testserver = false
showprev = false
selftest = false
confirmmerge = false
retry = 0
repeat =
contactquietly = false
key =
label =
expert = false
height = 15
auto = false
maxthreads = 0
maxsizethreshold = -1
prefer =
force =
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u OLDER NEWER
copyonconflict = false
backupdir =
maxbackups = 2
backups = false
backupsuffix =
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = default
ignorelocks = false
dumparchives = false
showarchive = false
rootsName =
ignorearchives = false
fastercheckUNSAFE = false
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
confirmbigdel = true
batch = false
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd =
sshargs =
sshcmd = ssh
xferbycopying = true
clientHostName = Philip-Wong
ignoreinodenumbers = false
links-aux = true
links = default
acl = false
xattrignore = Regex !(security|trusted)[.].*
xattrignore = Path !system.posix_acl_*
xattrs = false
times = false
group = false
owner = false
numericids = false
dontchmod = false
perms = 1023
watch = false
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = unison.log
log = true
debugtimes = false
debug = all
addprefsto =
[globals] Installing roots...[features] Supported features:
  - Sync: ACL
  - Sync: xattr
[features] Enabled features:
  - Sync: ACL
  - Sync: xattr
Uncaught exception (please report a bug): File "/Users/runner/work/unison/unison/src/globals.ml", line 109, characters 9-15: Assertion failed
p2635 commented 4 days ago

Side question: I also noticed the brew version of unison has no gui, is that right? I have to always manually download the release to get the gui version.

gdt commented 4 days ago

Looks likely a legit bug for the tracker, but this is for bona fide bugs only, not help. Please read

and address brew questions to brew.

gdt commented 4 days ago

Please read the bugs wiki page and:

tleedjarv commented 4 days ago

I can't test or work on the Mac-native GUI, but it seems that the error is caused by the sync roots being unspecified. Normally, you'd get a proper error/usage message for this but it seems that the Mac-native GUI skips this validation.

In other words, you shouldn't use the default profile (create another one), alternatively you should add the sync roots into the default profile configuration.

You could also try the GTK GUI (what's called unison-gui in the release package), which should run on macOS (I guess you'd need to install GTK via brew).

This is still a bug in the Mac-native GUI (it blindly assumes that if a profile is specified then the roots are also specified, without checking it).