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
dylib can't be opened #178
Comments
Actually I was able to bypass this issue by allowing apps from "Anywhere" to run. https://techsviewer.com/allow-installation-of-apps-from-anywhere-in-macos-mojave/ |
😱, That’s a new one, the dylib should be self signing. I’m assuming this is an iOS app as opposed to a mac one. Which version of the Catalina beta is this? Any ideas @zenangst? |
That is correct, this was on an iOS app, I even tried the GettingStarted project, and I got the same issue. I am on Catalina Beta 9 (19A573a). |
Also now I am getting this issue
From reading other issues, you have suggested disabling code coverage support in Build Settings, but it doesn't seem to be doing the trick. |
Is this an Xcode Beta, if so which one exactly? |
Try cleaning and rebuilding the project. |
Not on Xcode Beta just Xcode Version 11.0 (11A420a). Also I just verified and InjectionIII does work on GettingStarted project. |
That’s good news. I don’t know what exactly “a process using Library Validation” is at this stage. Thanks for the workaround but I can’t say it’s recommended for you to hove to set gatekeeper to “Anywhere which hasn’t been necessary up to now.. |
It seems to be rejecting the self signing certificate. Also I tried cleaning and rebuilding the project but still getting |
Just for the record, I was able to get rid of the At first I was going into the Build Settings, and setting "Enable Code Coverage Support" to "No" which doesn't fix this issue. |
One problem down. The README.md is incorrect the moment? Seems like you are building your own version of InjectionIII so perhaps you could try one thing for me. In signer/SignerService.m could you try changing the signing from ‘-‘ to ‘Your signing identity’ and see if it resolves the dyload issue with “Anywhere” off. If this works we can parse the project file and use this instead. |
The README.md is slightly off, it says So I tried that and I also tried changing some codesign parameters but no luck. I did some searching on the web and I keep reading something about having to get it "notarized" by an Apple server. |
I’ve updated the README 379821b (was this an Xcode 11 thing?). Thanks for trying the code sign - looks like notarizing is going to cause us some problems with Catalina :( Dynamic loading is getting progressively more difficult with each release. I may file a radar but I wonder if it will be supported. |
Not sure when that changed. I hadn't had to turn off Code Coverage lol Yeah seems like they really want to protect against that. I saw some other projects have already filed a radar, so it might be worth a try. |
I’ve created a simple macOS project that tests bundle loading you could uudecode to get the zip:
I’m interested to see if macOS bundles are supported but it is just iOS which is the problem. |
In fact, I’ve replicated the problem trying to sign the macOS test app above with my developer ID. Signing mac app with developer ID but signing bundle to run locally I get:
Hmmmmm |
One last thing to try I figure. Revert your InjectionIII to code sign adhoc (‘-‘) and change the signing for the simulator to ‘adhoc’ (run locally) |
I am getting the same results as you when running that macOS with run locally, though the error seems to be a bit different then the one from iOS I removed the signing certificate from the iOS app and still getting the same error. |
Also I don't think the issue is with loading the bundle, seems to be when dlopen is trying to open the dylib file. |
A bundle is just a dylib in a wrapper. There must be a combination of signing that allows you to load a bundle on iOS though it isn’t exactly supported. on macOS only Mac Developer/MacDeveloper or Developer ID (app)/Developer ID (bundle) works. Interesting thing is iOS app Loading my Developer ID signed iOSInjectionI bundle from InjectionIII app works. |
You are correct I just tried |
It's the incremental freshly built dylibs which are the problem. You're sure signing with the same identity as the app build settings didn't work?
|
Yup.
|
When you say:
This was on the console of the Mac app InjectionIII/system console? |
Perhaps it's the code signing complaining so it probably wasn't code signed. Strange it's didn't return an error to the app. You could try turning off the sandboxing in the InjectionIII app but then we'd have to distribute binaries and notarize.. |
Hi again, reading this: it may be worth trying the following code in the signer :
This should suppress the popup then we can focus on the signing identity for iOS.
|
Never mind, you get "Operation not permitted” inside the sandbox unsurprisingly. |
OK, found another way to reset the file. Perhaps try changing SwiftEval.swift:366
|
@johnno1962 Good news! That worked!!! Creating a pull request! |
Great! Does ad-hoc signing work now ('-') or did you have to sign with your identity? |
Ad-hoc signing is working, left the |
Interesting problem. It was the codesign that was setting com.apple.quarantine on the dylib. |
Yeah that is odd, I wonder if it has to do with the simulator trying to open something being generated outside of it. I never tested to see if this issue happens on a mac app. Doesn't this kind of issue usually happen when you self sign on a different computer? |
Who knows, we just cross the bridges as we come to them. BTW, How are you getting InjectionIII to build under Xcode11? I've not found the secret sauce as yet. |
True lol |
That simple eh? Seems Xcode10 xcodebuild was the problem after all. I've filed a PR #181. |
This should be available now as version 1.7 in the App Store. @nickgzzjr, can you verify with Catalina please? |
@johnno1962 So I am actually getting a Fatal Error with version 1.7 as soon as soon as the InjectionClient runs. I am not able to see the actual line but its |
Ouch, that's unfortunate. And you never saw this before? Can you still run the version you built. I don't think anything much has changed related to that code but I have seen occasional similar crashes on Catalina. Can you try again/run your version of the app? |
@nickgzzjr I haven't seen any crashes with Injection 1.7 and I've been using it all day :/ |
@johnno1962 Yes the version I built does work. @zenangst I did do a clean and build. Though, something really weird just happened. I pulled in the changes from this repo, ran it, and it worked. Then I ran the version from the App Store, and now its working |
@nickgzzjr I'll keep an eye out for this, I use InjectionIII at work everyday so if this is a recurring thing it should pop up so that we can fix it :) It didn't provide you a proper stack trace for us to examine ? |
@nickgzzjr is this the same crash has you've seen?
|
@johnno1962 Yup that's the one? How did you get that? |
@zenangst has been able to replicate your problem as he is running Catalina and this seems to be an intermittent problem related to Catalina. We’re looking into it. Have you had this problem crop up again? |
@johnno1962 I haven't had any issues since... |
Thats good news. Let us know if you have any other issues. |
When loading .dylib macOS throws an error
Then in the console I get:
I am using Xcode 11, iOS 13.0 and I am on macOS 10.15 beta.
The text was updated successfully, but these errors were encountered: