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

MacOS open from Finder #13

Closed
JanAxelsson opened this issue Oct 17, 2019 · 17 comments
Closed

MacOS open from Finder #13

JanAxelsson opened this issue Oct 17, 2019 · 17 comments

Comments

@JanAxelsson
Copy link

Opening a text file in geany from Finder does not work if Geany is already running.
Neither of these options works :

  • right-clicking and selecting Open With does not open the document
  • double-clicking on file does not open the document (but I have time to see Finder animation of the document's icon, indicating instruction to opening is issued)

If Geany is closed, both above options starts Geany, and opens the file.

I have a feeling this started with MacOS Catalina
I have allowed Geany and bash full disk access from System Security settings, so that is not the issue.

@elextr elextr transferred this issue from geany/geany Oct 17, 2019
@techee
Copy link
Member

techee commented Oct 18, 2019

This is most probably geany/geany#2344. Try the snapshot build from that bug report - it should fix your issues.

@JanAxelsson
Copy link
Author

The snapshot found in https://github.com/geany/geany/issues/2344 gives exactly the same error, as the error initially reported.

@techee
Copy link
Member

techee commented Oct 19, 2019

OK, I've seen something similar but what I get now is that macOS opens a new instance of Geany instead of the existing one which is wrong too. Frankly I have no idea what could be wrong - I've tried various things without much success. The output inside the Console app isn't very helpful either. It's also possible it's a Catalina bug but no idea really.

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 20, 2019 via email

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 20, 2019 via email

@techee
Copy link
Member

techee commented Oct 20, 2019

Try to have a look into the Console app if you see some interesting log regarding this problem that could tell us more (I haven't found anything descriptive though ;-(

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 20, 2019 via email

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 20, 2019 via email

@techee
Copy link
Member

techee commented Oct 20, 2019

I don't think you'll see anything in Geany's logs - it isn't even launched by macOS in these cases.

The Console app isn't a terminal - it's a log viewer on macOS (you can find it under the Other folder in the launchpad). You can open the console app, then double-click a file in Finder and see if it says something interesting regarding Geany.

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 20, 2019 via email

@techee
Copy link
Member

techee commented Oct 20, 2019

The 1.36 GTK3 version should work much better on Catalina.

I can't reproduce this exactly - in my case it starts a new Geany instance for every opened file (which isn't the right thing either).

@JanAxelsson
Copy link
Author

JanAxelsson commented Oct 21, 2019

Normal start of Geany 1.36 in Console (filtered by geany)

One error (error=fel in swedish, förval=default/preselect in swedish):

fel 20:47:37.546538+0200 tccd Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for RESP:{ID: geany-bin, PID[19263], auid: 501, euid: 501, responsible path: '/Applications/Geany.app/Contents/MacOS/geany', binary path: '/Applications/Geany.app/Contents/MacOS/geany-bin'}, ACC:{ID: geany-bin, PID[19263], auid: 501, euid: 501, binary path: '/Applications/Geany.app/Contents/MacOS/geany-bin'}, REQ:{ID: com.apple.appleeventsd, PID[522], auid: 55, euid: 55, binary path: '/System/Library/CoreServices/appleeventsd'}

Complete launch log for Geany

förval	20:47:35.773238+0200	Spotlight	LAUNCHING:0x0-0xd57d57 Geany foreground=1 bringForward=1 seed=3183 userActivityCount=0
förval	20:47:35.785859+0200	loginwindow	-[PersistentAppsSupport applicationReady:] | App: Geany, ready, updating active tracking timer
förval	20:47:35.785936+0200	loginwindow	-[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : Geany
förval	20:47:35.802284+0200	distnoted	register name: com.apple.sharedfilelist.change object: com.apple.LSSharedFileList.ApplicationRecentDocuments/org.geany.geany token: f50ba pid: 8705
förval	20:47:35.863245+0200	geany-bin	FRONTLOGGING: version 1
förval	20:47:35.863270+0200	geany-bin	Registering, pid=19263
förval	20:47:35.865824+0200	geany-bin	CHECKIN: pid=19263
förval	20:47:35.874293+0200	runningboardd	Resolved pid 19263 to [executable<geany-bin(501)>:19263]
förval	20:47:35.879719+0200	runningboardd	[executable<geany-bin(501)>:19263] This process will not be managed.
förval	20:47:35.879762+0200	runningboardd	Now tracking process: [executable<geany-bin(501)>:19263]
förval	20:47:35.880372+0200	runningboardd	Acquiring assertion targeting executable<geany-bin(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:19263; ID: 471-162-9674; target: 19263> attributes = {
    <RBSDomainAttribute: 0x7ff45b10fd20; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
förval	20:47:35.880558+0200	runningboardd	Assertion 471-162-9674 (target:executable<geany-bin(501)>) will be created as active
förval	20:47:35.882110+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring jetsam update because this process is not memory-managed
förval	20:47:35.882193+0200	runningboardd	Finished acquiring assertion 471-162-9674 (target:executable<geany-bin(501)>)
förval	20:47:35.882239+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring resume because this process is not lifecycle managed
förval	20:47:35.882617+0200	runningboardd	[executable<geany-bin(501)>:19263] Set darwin role to: UserInteractiveNonFocal
förval	20:47:35.882827+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring GPU update because this process is not GPU managed
förval	20:47:35.882867+0200	runningboardd	Acquiring assertion targeting executable<geany-bin(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; foregroundApp:19263; ID: 471-162-9675; target: 19263> attributes = {
    <RBSDomainAttribute: 0x7ff459638c30; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
förval	20:47:35.883197+0200	runningboardd	Assertion 471-162-9675 (target:executable<geany-bin(501)>) will be created as active
förval	20:47:35.884314+0200	runningboardd	Finished acquiring assertion 471-162-9675 (target:executable<geany-bin(501)>)
förval	20:47:35.884325+0200	runningboardd	Invalidating assertion 471-162-9674 (target:executable<geany-bin(501)>) from originator 162
förval	20:47:35.896423+0200	launchservicesd	CHECKIN:0x0-0xd57d57 19263 org.geany.geany
förval	20:47:35.897494+0200	geany-bin	CHECKEDIN: pid=19263 asn=0x0-0xd57d57 foreground=1
förval	20:47:35.902499+0200	loginwindow	-[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : Geany
förval	20:47:35.902745+0200	lockoutagent	Requesting policy for bundle IDs: (
    "org.geany.geany"
)
förval	20:47:35.909828+0200	tccd	-[TCCDAccessIdentity staticCode]: static code for: identifier org.geany.geany, type: 0: 0x7ffabca038a0 at /Applications/Geany.app
förval	20:47:35.931066+0200	tccd	-[TCCDAccessIdentity staticCode]: static code for: identifier org.geany.geany, type: 0: 0x7ffabc898080 at /Applications/Geany.app
förval	20:47:35.948903+0200	geany-bin	Registered, pid=19263 ASN=0x0,0xd57d57
förval	20:47:35.949129+0200	geany-bin	Registered, pid=19263 cgConnectionID=41c2b
förval	20:47:35.953195+0200	geany-bin	BringForward: pid=19263 asn=0x0-0xd57d57 bringForward=1 foreground=1 uiElement=0 launchedByLS=1 modifiersCount=1 allDisabled=0
förval	20:47:35.953289+0200	geany-bin	BringFrontModifier: pid=19263 asn=0x0-0xd57d57 Modifier 0 hideAfter=0 hideOthers=0 dontMakeFrontmost=0 mouseDown=0/0 seed=0/0
förval	20:47:35.953412+0200	geany-bin	BringForward: pid=19263 asn=0x0-0xd57d57
förval	20:47:35.953604+0200	geany-bin	SetFrontProcess: asn=0x0-0xd57d57 options=0
förval	20:47:35.960155+0200	runningboardd	Acquiring assertion targeting executable<geany-bin(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:162] with description <RBSAssertionDescriptor; frontmost:19263; ID: 471-162-9676; target: 19263> attributes = {
    <RBSDomainAttribute: 0x7ff459639ec0; domain: com.apple.launchservicesd; name: RoleUserInteractiveFocal; sourceEnvironment: 0x0>;
}
förval	20:47:35.960330+0200	runningboardd	Assertion 471-162-9676 (target:executable<geany-bin(501)>) will be created as active
förval	20:47:35.967609+0200	geany-bin	Current system appearance, (HLTB: 2), (SLS: 1)
förval	20:47:35.963718+0200	runningboardd	Finished acquiring assertion 471-162-9676 (target:executable<geany-bin(501)>)
förval	20:47:35.961462+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring jetsam update because this process is not memory-managed
förval	20:47:35.966819+0200	runningboardd	[executable<geany-bin(501)>:19263] Set darwin role to: UserInteractiveFocal
förval	20:47:35.968442+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring GPU update because this process is not GPU managed
förval	20:47:35.971935+0200	geany-bin	Post-registration system appearance: (HLTB: 2)
förval	20:47:35.996988+0200	distnoted	register name: com.apple.xctest.FakeForceTouchDevice object: org.geany.geany token: f4268 pid: 19263
förval	20:47:37.091665+0200	geany-bin	NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 1
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x7ff77ac97210
 (
    "<NSAquaAppearance: 0x7ff775e2b3e0>",
    "<NSSystemAppearance: 0x7ff775e2b890>"
)>
förval	20:47:37.092529+0200	distnoted	register name: com.apple.nsquiet_safe_quit_give_reason object: org.geany.geany token: f4288 pid: 19263
förval	20:47:37.162357+0200	tccd	-[TCCDAccessIdentity staticCode]: static code for: identifier org.geany.geany, type: 0: 0x7ffabb7179e0 at /Applications/Geany.app
förval	20:47:37.392973+0200	geany-bin	Registering for test daemon availability notify post.
förval	20:47:37.393126+0200	geany-bin	notify_get_state check indicated test daemon not ready.
förval	20:47:37.477293+0200	geany-bin	SignalReady: pid=19263 asn=0x0-0xd57d57
förval	20:47:37.482640+0200	geany-bin	SIGNAL: pid=19263 asn=0x0x-0x13991255
förval	20:47:37.507241+0200	tccd	-[TCCDAccessIdentity staticCode]: static code for: identifier org.geany.geany, type: 0: 0x7ffabc8a0770 at /Applications/Geany.app
fel	20:47:37.546538+0200	tccd	Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for RESP:{ID: geany-bin, PID[19263], auid: 501, euid: 501, responsible path: '/Applications/Geany.app/Contents/MacOS/geany', binary path: '/Applications/Geany.app/Contents/MacOS/geany-bin'}, ACC:{ID: geany-bin, PID[19263], auid: 501, euid: 501, binary path: '/Applications/Geany.app/Contents/MacOS/geany-bin'}, REQ:{ID: com.apple.appleeventsd, PID[522], auid: 55, euid: 55, binary path: '/System/Library/CoreServices/appleeventsd'}
förval	20:47:37.722994+0200	hidd	Connection added: IOHIDEventSystemConnection uuid:B9B65472-09DB-4267-8382-9E64DD14C4C3 pid:19263 process:geany-bin type:Passive entitlements:0x0 caller:HIToolbox: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) inactive:1 events:0 mask:0x0
förval	20:47:38.010258+0200	hidd	Connection added: IOHIDEventSystemConnection uuid:6D2CD2E5-BBB9-4394-99E3-FD30B99FE86C pid:19263 process:geany-bin type:Passive entitlements:0x0 caller:HIServices: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) inactive:1 events:0 mask:0x0
förval	20:47:39.725698+0200	runningboardd	Invalidating assertion 471-162-9676 (target:executable<geany-bin(501)>) from originator 162
förval	20:47:39.827948+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring jetsam update because this process is not memory-managed
förval	20:47:39.828063+0200	runningboardd	[executable<geany-bin(501)>:19263] Set darwin role to: UserInteractiveNonFocal
förval	20:47:39.828203+0200	runningboardd	[executable<geany-bin(501)>:19263] Ignoring GPU update because this process is not GPU managed
förval	20:47:39.895435+0200	tccd	-[TCCDAccessIdentity staticCode]: static code for: identifier org.geany.geany, type: 0: 0x7ffabb723650 at /Applications/Geany.app
förval	20:47:40.791146+0200	loginwindow	-[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] |      checkAgainstApp is : Geany
förval	20:47:40.791168+0200	loginwindow	-[PersistentAppsSupport appShouldBeRelaunched:] | entered. checking app: Geany
förval	20:47:40.791197+0200	loginwindow	-[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] |           Adding to relaunchArray: Geany
förval	20:47:40.802680+0200	loginwindow	-[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] |           Contents:(
        {
        BackgroundState = 2;
        BundleID = "com.apple.console";
        Hide = 0;
        Path = "/System/Applications/Utilities/Console.app";
    },
        {
        BackgroundState = 2;
        BundleID = "org.geany.geany";
        Hide = 0;
        Path = "/Applications/Geany.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.finder";
        Hide = 0;
        Path = "/System/Library/CoreServices/Finder.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.safari";
        Hide = 0;
        Path = "/Applications/Safari.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.mail";
        Hide = 0;
        Path = "/System/Applications/Mail.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.terminal";
        Hide = 0;
        Path = "/System/Applications/Utilities/Terminal.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.activitymonitor";
        Hide = 0;
        Path = "/System/Applications/Utilities/Activity Monitor.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.mathworks.matlab";
        Hide = 0;
        Path = "/Applications/MATLAB_R2018a.app";
    },
        {
        BackgroundState = 3;
        BundleID = "com.axosoft.gitkraken";
        Hide = 0;
        Path = "/Applications/GitKraken.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.ical";
        Hide = 0;
        Path = "/System/Applications/Calendar.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.apple.preview";
        Hide = 0;
        Path = "/System/Applications/Preview.app";
    },
        {
        BackgroundState = 3;
        BundleID = "com.nomachine.nxdock";
        Hide = 0;
        Path = "/Applications/NoMachine.app";
    },
        {
        BackgroundState = 2;
        BundleID = "com.google.chrome";
        Hide = 0;
        Path = "/Applications/Google Chrome.app";
    },
        {
        BackgroundState = 3;
        BundleID = "com.apple.reminders";
        Hide = 0;
        Path = "/System/Applications/Reminders.app";
    },
        {
        BackgroundState = 3;
        BundleID = "com.tinyspeck.slackmacgap";
        Hide = 0;
        Path = "/Applications/Slack.app";
    }
)
förval	20:47:47.423358+0200	geany-bin	LSExceptions shared instance invalidated for timeout.```

@JanAxelsson
Copy link
Author

When double-clicking a file in Finder, this error occurs:

förval 20:48:21.359189+0200 Finder LAUNCHING:0x0-0xd59d59 Geany foreground=1 bringForward=1 seed=3186 userActivityCount=0 fel 20:48:21.360214+0200 Finder LaunchedApplication: failed with error -13052 (null){ "ApplicationType"="Foreground", "BundleIdentifierLowerCase"="org.geany.geany", "CFBundleExecutablePath"="/Applications/Geany.app/Contents/MacOS/geany", "CFBundleExecutablePathDeviceID"=16777220, "CFBundleExecutablePathINode"=8629669541, "CFBundleIdentifier"="org.geany.geany", "CFBundleName"="Geany", "CFBundlePackageType"="APPL", "LSASN"=ASN:0x0-0xd59d59:, "LSBundlePath"="/Applications/Geany.app", "LSBundlePathDeviceID"=16777220, "LSBundlePathINode"=8629669534, "LSDisplayName"="Geany", "LSExecutableFormat"="LSExecutableMachOFormat", "LSLaunchDLabel"="org.geany.geany.8120", "LSLaunchedByLaunchServices"=true, "LSLaunchedWithLaunchD"=true, "LSLaunchEventRecordTime"=284003307290086, "LSLaunchTime"=now-ish 2019/10/21 20:48:21, "LSParentASN"=ASN:0x0-0xae5ae5:, "LSWantsToComeForwardAtRegistrationTimeKey"=true, "pid"=19263 }

@techee
Copy link
Member

techee commented Oct 21, 2019

Yeah, I saw those too but I don't know what they mean.

Anyway, I think I nailed it. The problem is this:

a723620

I've reuploaded the snapshot here https://download.geany.org/snapshots/geany-1.36_osx.dmg and I believe it will fix the problem for you. I don't think that what we did before was wrong, it's just that Catalina doesn't like it.

@JanAxelsson
Copy link
Author

After rebuilding the Launch Services,

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"

I got the same behavior as reported by techee. That is, double-clicking a file now opens a new instance of Geany 1.36.

Still a problem -- but we see the same thing.

@techee
Copy link
Member

techee commented Oct 21, 2019

Hmm, but have you downloaded the latest snapshot? It should work now.

@JanAxelsson
Copy link
Author

You did indeed nail the problem. Problem solve -- thanks a lot for your skills, and your professional communication

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

No branches or pull requests

2 participants