Post

Replies

Boosts

Views

Activity

Reply to Encrypted CoreML model load failed with error : Failed to set up decrypt context for /path/to/xxx.mlmodelc. error:-42905"
Confirmed, If I manully release MLModel in sceneDidDisconnect, and then the problem disappear. I'm convinced this is a system-level bug; if the app crashes or killed, it causes something to leak in the system, that makes absolutely no sense. Although I temporarily resolved the issue using sceneDidDisconnect. However, sceneDidDisconnect is not a reliable cleanup point because it is not guaranteed to be invoked in many real-world termination scenarios. For example, the callback may not be called when the app is force-terminated by Xcode Stop, killed by the system due to memory pressure (Jetsam), terminated by the watchdog, crashes unexpectedly, or is otherwise killed before scene teardown occurs. I have also reproduced the -42905 failure by repeatedly launching the app, loading the encrypted model, and then pressing Xcode's Stop button. In that scenario the process is terminated without a guaranteed opportunity to execute sceneDidDisconnect, yet the failure still accumulates over time. This suggests that cleanup cannot rely solely on application-level lifecycle callbacks. This must be a system bug; it’s hard to believe this issue has persisted for over four years and still hasn’t been resolved.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Jun ’26
Reply to Encrypted CoreML model load failed with error : Failed to set up decrypt context for /path/to/xxx.mlmodelc. error:-42905"
@Apple Fine, @ not working 🙃🙃🙃
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jun ’26
Reply to Encrypted CoreML model load failed with error : Failed to set up decrypt context for /path/to/xxx.mlmodelc. error:-42905"
Confirmed, If I manully release MLModel in sceneDidDisconnect, and then the problem disappear. I'm convinced this is a system-level bug; if the app crashes or killed, it causes something to leak in the system, that makes absolutely no sense. Although I temporarily resolved the issue using sceneDidDisconnect. However, sceneDidDisconnect is not a reliable cleanup point because it is not guaranteed to be invoked in many real-world termination scenarios. For example, the callback may not be called when the app is force-terminated by Xcode Stop, killed by the system due to memory pressure (Jetsam), terminated by the watchdog, crashes unexpectedly, or is otherwise killed before scene teardown occurs. I have also reproduced the -42905 failure by repeatedly launching the app, loading the encrypted model, and then pressing Xcode's Stop button. In that scenario the process is terminated without a guaranteed opportunity to execute sceneDidDisconnect, yet the failure still accumulates over time. This suggests that cleanup cannot rely solely on application-level lifecycle callbacks. This must be a system bug; it’s hard to believe this issue has persisted for over four years and still hasn’t been resolved.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jun ’26
Reply to CoreML fails to decrypt a model
This issue still persists. It’s like a ghost—you never know when it will appear or when it will vanish. Is this really not a system-level bug? @Apple
Replies
Boosts
Views
Activity
May ’26
Reply to CoreML model load failed with this error : Failed to set up decrypt context for /private/var/mobile/Containers/Data/Application/ACB94507-F8DE-494B-8499-B0CF75FC3B55/Library/Caches/temp.m/xxx.mlmodelc. error:-42905"
On my device, the app has already been killed, so where is the "leak" coming from? The only way to get things back to normal is to restart the device or uninstall and then reinstall the app.
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
May ’26