Sandbox crashes application

I have build a python app by pyinstaller for Mac OS. The app run correctly and I can sign and send to App Store. As Appstore requires to sandbox the app, I put sandbox option in my app.entitlements but sandboxing the app crashes the app with "hardware illegal instruction". I tried many options in my app.entitlements and no way to avoid the crash. Send may hours , fed up do not find valuable information, please advise.

I have built a python app by pyinstaller for Mac OS. The app running correctly and I can sign and send it to App Store. As App Store requires to sandbox the app, I put sandbox option in my app.entitlements but sandboxing the app crashes the app with "hardware illegal instruction". I tried many options in my app.entitlements and no way to avoid the crash.Spend many hours but couldn’t find the reason, fed up do not find valuable information, please advise.

my current app.entitlements :

but sandboxing the app crashes the app with "hardware illegal instruction"

That usually means the code hit a trap (Intel code usually traps by executing the ud2, which is reported in this way).

It’s hard say why this code has trapped. It’s unlikely to be caused by your Python code but something to do with the packaging. Given that, I recommend that you escalate this via the support channel for your third-party packaging tool.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I found the solution for this problem but I don't have a valid explanation. I have rebuilt the application with pyinstaller without "--onefile option". Now the app can be signed and the result can be executed without "illegal instruction". I thought that ""-onefile " option just add a single file plus .app file. Apparently the .app result are not the same. The result app could be delivered to Appstore and now I am waiting the result. I think the problem is related to child and parent process issues. your advise and explanations are welcome— Massoud 1 day ago 

Sandbox crashes application
 
 
Q