sqweek / dialog

Simple cross-platform dialog API for go-lang
ISC License
493 stars 76 forks source link

File and Directory warning on MacOS: "Class FIFinderSyncExtensionHost is implemented in both ..." #24

Open ghost opened 5 years ago

ghost commented 5 years ago

MacOS version. 10.14.2


func fileRead() {
    filename, err := dialog.File().Filter("pdf file", "pdf").Load()
    if err != nil {
        panic(err)
    }

    fmt.Println(filename)
    // now read from that file name ...
}

func directoryRead() {
    directory, err := dialog.Directory().Title("Load images").Browse()
    if err != nil {
        panic(err)
    }
    fmt.Println(directory)
}

Both work, but do get this error on the way through.

objc[39586]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fff97ac1210) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x12abfdc8). One of the two will be used. Which one is undefined.
sqweek commented 5 years ago

Seems to be an issue with OSX itself. Tons of other reports, but no solution:

https://core.tcl.tk/tk/tktview?name=182cf051ed https://stackoverflow.com/questions/46999695/class-fifindersyncextensionhost-is-implemented-in-both-warning-in-xcode-si jarvisteach/appJar#285 electron/electron#11456 https://stackoverflow.com/questions/46601077/java-exception-since-mac-os-high-sierra lionheart/openradar-mirror#17659

ghost commented 5 years ago

hey @sqweek ah thanks for checking. I bombed you with the issue without first checking.

I guess it will be sorted eventually by Apple with a OS Update. A New MacOS update hit yesterday, so am downloading and will try again. Will leave open, so we can remember to check it later...

nelsonvassalo commented 5 years ago

Still reporting this as of today

bensh commented 5 years ago

I found this thread because I got the same bug, but I got it in my own program written in Python, so seems to be a MacOS issue when you browse the local filesystem programatically.

https://stackoverflow.com/a/47013488/1291738

designerfuzzi commented 1 year ago

simple. When an NSSavePanel becomes modal it also has access to the Filesystem and has usually a Filetype given to be allowed or not allowed, so the Finder gets involved, means setting properly FileType UTI in info.plist should be done. apart from that it is also a sign for messed up framework linking, and can even be silenced via OTHER_LDFLAGS -framework [Duplicated framework]

see https://stackoverflow.com/questions/46932341/class-is-implemented-in-both-one-of-the-two-will-be-used-which-one-is-undefine