Thanks eskimo. No worries, the error was caused for a letter â (a with circumvent) when read a string at the byte level using UTF-8. While the said character can be expressed with one byte when using ISO-8859-1, it requires two bytes in UTF-8.
I very much appreciate your prompt answer!
Post
Replies
Boosts
Views
Activity
Thanks, I have seen MacOS apps that do that. That is why I was wondering if there is an "authorized" way to do it, and assumed they are, because these apps are notarized or otherwise approved my Apple. Those apps show the home screen of the device as soon as they are connected (and work both in Mac and Windows).
I've heard that Apple may authorize developers to do that, providing the compliance of certain rules. Can you confirm that is NOT the case? Or as the case may be, can you please point me to the right direction on this matter?
Best,
Lautaro
Yes, of course, but that is not what I need. Sorry!
Thanks for the extremely enlightening comment. I very much appreciate it!
Please, when possible, comment on the following:
"I’m not sure why removing CommonCrypto prevents this crash..." As I mentioned, this is a large application that uses CommonCryto at the very beginning. As just by bypassing the code where it was being used, the app worked fine, AND the app was working fine also on the Intel MacBook (with the very same code), my conclusion (now proved erroneous) was to indict ARM - "CommonCrypt" as the culprit.
With your feedback, I reviewed the code and I think the error should had occurred on these instructions (particularly on the readLicense() one):
// if licenseFileFound {
// let licenseDetails = readLicense().components(separatedBy: "\n")
// self.licenseType = licenseDetails[0]
// self.licenseSerial = licenseDetails[1]
// else {
// self.licenseStatus = "File not found"
// }
Where readLicense function returns a string after processing an encrypted file using CommonCrypto. For some reason that I ignore, it recognizes the text stream from the read file correctly when working within Intel - T2 environment, but fails when the app was ported to ARM. Can you give me some hints on how to look so to dig into this error and understand why it works fine on an Intel hardware and fails on ARM hardware (the very same code)?
Thanks Quinn,
Seeking to discard any other cause, I isolate the code that uses CommonCrypto in a separated app and run it. Same behavior. In my computer run perfectly well, but when trying to use the very same app in another Mac (in this case a MacBook air M2) it crashes immediately with the message "...quit unexpectedly" (Attached the crash log it offered just after the failure).
So, I'm pretty sure this is somehow caused by CommonCrypto. I even tried using the package CryptoSwift but fails exactly the same way.
Any help will be highly appreciated.
Thanks
TestLic_quitUnexp_March1-2024.txt
Thanks Quinn! as to your question:
if you clone the repo using the git command-line tool and then open the project in Xcode, does that still crash
**YES, that is exactly what happened and it surprised me a lot. **
OK, that could happened, but the problem is that hdiutil crashed, instead of ignore the file and go to the next. Anyways, /Library/VoiceTrigger seems to be related to Siri. I will test again given permission to the terminal for Siri and see what happens.
hi Quinn, thanks for your replay!.. I was able to find a solution for my problem. Thanks any ways for asking! Happy new Year!
Thanks!
The app (under development, using Xcode) IS NOT sandboxed. So, it must be a permission issue. Now, I was able to run some commands that requires sudo (certain hdiutil for example), so I verified that the sudo passw was transmited correctly and some kind of permission were actually granted. The issue happened with asr, which even after being able to validate the admin password (which I passed in a command via process and pipe) it still produced the error.
You said "I recommend against using sudo". What would you recommend to to? Would it be using a helper tool (and if that case, could you please point me to a good tutorial on implementing and using a helper tool within a swiftUI app?
Further comments:
(from the first link)
2 says- If you’re working interactively on the command line, use sudo.
That is nearly my case, I'm just trying to have the terminal command executed from my swift app and show/uses there some results.
3 says- If you’re building an ad hoc solution to distribute to a limited audience, and you need one-shot privileges, use either AuthorizationExecuteWithPrivileges or AppleScript.
That is also my case, only need to execute a couple of sudo commands just to grab some info produced by asr and hdiutil.
After knowing a little more about what I'm trying to do, would you recommend a helper or using the deprecated AuthorizationExecuteWithPrivileges would be fine? Or how can I get my sudo command being sent from my app thru Process() fully recognized as when I use it right in the terminal console?
Again, thanks a lot for your prompt reply and insightful information,
Best,
Lautaro
Hi, I have the same problem when using a tkinter-python app which have a few windows and several widgets in each one. The error seemed to be random (sometimes it happens when going from the second window to the third, but also happens in other stages as well). Using Sonoma (14.1), python 3.11.5 and Tcl 8.6 (the lastest available).
Oddly, the very same app works fine in Windows OS (10 and 11). The error is qualified in the mac terminal as 'segmentation error' but nothing more specific is being said.
Quinn, once more time, thank you very much for your help!
What I am trying to achieve is to distribute a single file compiled exe (originally a python script compiled using pyinstaller) directly to certain customers. (it is an exe file, that runs by open it or double click on it from Finder).
So, the idea is to have the said exe as an App available to download or otherwise, send it over to selected users. We already have a Zip file with the exe inside, duly signed and notarized (I meant, we went to the process to get an accepted notarization from Apple using exclusively cmd tools).
When I say "convert it to an app" (sorry for not use the appropriate language is that is the case) I meant to have the app opened by double clicking in the downloaded exe file (once the downloaded Zip is opened). Please, point to me to info on how to do this properly. On the other hand, as using zip files are not compatible with stapling, we would prefer to distribute the app using pkg or dmg, whichever is appropriate and more straight forward. (Any hints will be highly appreciated!)
The exe should work as follows: once double click on it, it opens a terminal session in which the user need to input a series of information interactively. Once it finished, the exe executes a series of processes within the terminal. and produce certain reports. It will finish when the user says so using the console (by input certain letter on the keyboard when prompted for it)
I hope to have replied properly to your questions and now my goals are clear.
Another issue I am confronting, is that the exe runs in some equipment, but not in others when using the signed-notarized version, while the unsigned version (after being authorized and bypass Gatekeeper) runs everywhere (M1/M2 and Intel with or without T2). The issue seems to be related to the signature. Somehow the process I went through for signing causes a kind of corruption in some binaries. Any suggestion or comment on this?
Thanks!
Thanks Quinn!, as usual, very informative..
Now, I'm trying to convert my exe file (python compiled for MacOS) in an App, so I can avoid the Gatekeeper issue. Following instruction I read, I create a directory (named MyApp.app) inside Desktop folder. on the said MyApp.app dir, I create a Contents directory, and inside the latter, MacOS (where the exe file was placed) and Resources (where the icon was placed). Inside the Contents directory, besides Dirs MacOS and Resources, I put the file Info.plist.
When using the comand pkgbuild, it threw the error: MyApp.app is NOT a valid bundle component (using destination path"/Users//Desktop").
Could you please, point me to where I can learn about this error and on how to do an App from an exe file?
One more:
I tested my App in a completely new Mac (I meant, new to the App, actually it was an Intel Non T2 Mac build in year 2017). To my surprise, the non-signed app runs perfectly while the Signed-Notarized one throw an execution error complaining about the signature (both surpass Gatekeeper with no complain whatsoever from it side). However, in an another non T2 Mac affiliated to my icloud address, both worked well at the first time (likewise, surpassing Gatekeeper).
So far, the only complain from Gatekeeper came from an Intel T2, in which case, I needed to disabled it. But once I did that, both the signed-Notarized and the non-signed run perfectly well as expected. (tests on M1/M2 pending). [note: when I say non-signed, I meant non signed according to Apple rules. PyInstaller somehow sign the file at the time of compilation (is a very limited signature, much less informative compared to Apple's)].
As the facts are non coherent (the signed App works well in some macs and not in others with the same hardware) what would be your suggestion to clarify these issues?
Once more time, THANKS!! for all your help!
thanks for such a very useful points!
Once notarized, the app still reject to run in MACs with T2, but oddly to me, it runs OK in older Macs. Make sense?. If so, I guess the Gatekeeper behaves differently on old Intel Macs vs T2 ones...
How old is that GateKeeper problem? And when is it expected to be solved?
Again, thanks for all your help!
Thanks Again.
After seeing the suggested post, using the cmd: "security find-identity -p codesigning" I noticed that I don't have "matching entities", only entities (and, as indicated, therefore I "don’t have a code signing identity to sign with"). Now, the problem remains, as I followed the recommended steps: generate de cert request, download the cert and install de intermediate certs (in that order, just in case the order matters). Any suggestions?