Skip to content

macOS app throws "library load disallowed by system policy" error while loading 3rd-party Python .so modules #4543

@FeodorFitsner

Description

@FeodorFitsner

Duplicate Check

Describe the bug

Original report: #4514 (comment)

I got this error when I release it to test flight and test on my mac M4:

  File "/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/__init__.py", line 6, in <module>
    from ._pydantic_core import (
ImportError: dlopen(/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so, 0x0002): tried: '/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so' (code signature in <17D6EF5C-4D71-3E06-912D-5464BC98FC00> '/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so' not valid for use in process: library load disallowed by system policy), '/System/Volumes/Preboot/Cryptexes/OS/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so' (no such file), '/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so' (code signature in <17D6EF5C-4D71-3E06-912D-5464BC98FC00> '/Users/simon/Library/Containers/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/Data/Library/Application Support/com.diogenes.ai.chatbot.flet.diogenesaibutlerflet/flet/app/__pypackages__/pydantic_core/_pydantic_core.cpython-312-darwin.so' not valid for use in process: library load disallowed by system policy)

Code sample

Code
# n/a

To reproduce

n/a

Expected behavior

No response

Screenshots / Videos

Captures

[Upload media here]

Operating System

macOS

Operating system details

Any version

Flet version

0.25.1

Regression

No, it isn't

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions