Could not attached to PID

612 views
Skip to first unread message

Nathan Henrie

unread,
Feb 23, 2022, 6:07:26 PM2/23/22
to quicksilver-...@googlegroups.com

Man Xcode is giving me headaches.

Suddenly started getting Could not attach to pid: when I run QS from XCode

No relevant changes to QS — was working on plugins at the time.

Have tried, with rm -rf /tmp/QS and a clean before each

  • fresh checkout from master, refresh all submodules
  • killing a few straggling QS processes
  • quit / relaunch Xcode
  • removing / refreshing permissions in Security & Privacy prefpane

Console messages:

Library Validation failed: Rejecting '/private/tmp/QS/build/Release/Quicksilver.app/Contents/Frameworks/QSFoundation.framework/Versions/A/QSFoundation' (Team ID: none, platform: no) for process 'Quicksilver(12630)' (Team ID: none, platform: no), reason: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
RBSStateCapture remove item called for untracked item 614-1045-318596 (target:app<application.com.blacktree.Quicksilver.95242328.95246857(501)>)
LAUNCH:Returning kLSNoExecutableErr because bundle has no inode, com.blacktree.Quicksilver node=<private> status=-10827

I did get it to launch once by just waiting a few minutes, and then it went back to this.

Any other ideas? I’ll try a reboot shortly.

Screen Shot 2022-02-23 at 15.54.41.png
Nate

Nathan Henrie

unread,
Feb 23, 2022, 8:35:34 PM2/23/22
to quicksilver-...@googlegroups.com
I quit Xcode, gave it an hour, no other changes, no reboot, and it's back to working.

¯\_(ツ)_/¯

Nate

Patrick Robertson

unread,
Feb 23, 2022, 8:44:01 PM2/23/22
to quicksilver-...@googlegroups.com
Xcode is so buggy. “Turn it off and on again” often solves the problem :’(


<Screen Shot 2022-02-23 at 15.54.41.png>
Nate


-- 
You received this message because you are subscribed to the Google Groups "Quicksilver - Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicksilver---deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quicksilver---development/CAOMt5FBTbUJppdfhn5mvFMHk2tyaiGM5Hh8eOUKfq4uXPy_AWA%40mail.gmail.com.

Nathan Henrie

unread,
Feb 24, 2022, 1:12:53 PM2/24/22
to quicksilver-...@googlegroups.com

Problem came back — this time worked with a Debug build but came back with Release. I was using a release build so I could create a release build of the QSQRCode plugin (and push a release build to the plugin server if successful).

Looks likely related to the hardened setting, eventually found this in Console.app:

macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (Quicksilver) (pid: 47485): (Quicksilver) is hardened, (Quicksilver) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger

Some additional info:

get-task-allow
The boolean value of get-task-allow determines whether Xcode’s debugger can attach to the app.

Changing Quicksilver -> Build Settings -> Enabled Hardened Runtime -> Release to No, and then a deep clean:

$ killall Quicksilver
$ rm -rf /tmp/QS ~/Library/Developer/Xcode/DerivedData/Quicksilver-*

and then it builds and attaches again.

I thought perhaps I could leave hardened runtime enabled and just manually run /tmp/QS/build/Release/Quicksilver.app, but nothing seems to happen when I double click it. Launching from CLI I see more codesigning errors:

$ /private/tmp/QS/build/Release/Quicksilver.app/Contents/MacOS/Quicksilver 
dyld[89184]: Library not loaded: @executable_path/../Frameworks/QSFoundation.framework/Versions/A/QSFoundation
  Referenced from: /private/tmp/QS/build/Release/Quicksilver.app/Contents/MacOS/Quicksilver
  Reason: tried: '/private/tmp/QS/build/Release/Quicksilver.app/Contents/MacOS/../Frameworks/QSFoundation.framework/Versions/A/QSFoundation' (code signature in <7BE6936C-B876-3D26-817D-AF80BB4B6FB8> '/private/tmp/QS/build/Release/Quicksilver.app/Contents/Frameworks/QSFoundation.framework/Versions/A/QSFoundation' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/System/Library/Frameworks/QSFoundation.framework/Versions/A/QSFoundation' (no such file)
Abort trap: 6

Seems to be looking for /System/Library/Frameworks/QSFoundation.framework/Versions/A/QSFoundation which obviously doesn’t exist.

Not sure where to go from here.

For building plugins, I’ll probably just do a release build with the hardened runtime disabled (?)

Patrick Robertson

unread,
Feb 24, 2022, 8:16:53 PM2/24/22
to quicksilver-...@googlegroups.com
Seems like you’re trying to attach and run “release” builds. That doesn’t make sense to me, since release builds have their symbols stripped, there’s not a whole lot you can debug. I would recommend:

1. For building, testing and debugging, stick to ‘debug’
2. For actual release, stick to release 

;-)

--
You received this message because you are subscribed to the Google Groups "Quicksilver - Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicksilver---deve...@googlegroups.com.

Nathan Henrie

unread,
Feb 24, 2022, 8:26:48 PM2/24/22
to quicksilver-...@googlegroups.com
That makes sense, except what I'm trying to do is recompile plugins to push to the server. I assume we want the plugins compiled as a `release` build to be as small and optimized as possible. In order to compile a release build of the plugin, I have to already have compiled a release build of Quicksilver.

What I did today was to switch both QS and the plugin to Debug, clean and build, debug, then once running switch both back over to release, clean and build, delete and reinstall the release build of the plugin, and if working then push to the server.

It worked okay, but a little onerous having to switch schemes and switch windows and clean / build everything in the right order (as cleaning from the plugin removes the QS build artifacts, as we discussed, so if I accidentally clean the plugin after building QS then I have to rebuild).

What does your workflow look like? Am I missing an obvious opportunity to cut out a few steps?

Nate


Patrick Robertson

unread,
Feb 24, 2022, 8:33:54 PM2/24/22
to quicksilver-...@googlegroups.com
Yes, that’s my workflow:

1. Build QS & plugin in Debug
2. Test plugin, make sure it’s working
3. If all good: Clean, then build QS & plugin in Release
4. Push to plugin server

Reply all
Reply to author
Forward
0 new messages