Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

CoreML MLModelErrorModelDecryption error

Somehow I'm not able to decrypt our ml models on my machine. It does not matter:

  • If I clean the build / delete the build folder
  • If it's a local build or a build downloaded from our build server
  • I log in as a different user
  • I reboot my system (15.4.1 (24E263)
  • I use a different network
  • Re-generate the encryption keys.

I'm the only one in my team confronted with this issue. Using the encrypted models works fine for everyone else.

As soon as our application tries to load the bundled ml model the following error is logged and returned:

Could not create persistent key blob for CD49E04F-1A42-4FBE-BFC1-2576B89EC233 : error=Error Domain=com.apple.CoreML Code=9 "Failed to generate key request for CD49E04F-1A42-4FBE-BFC1-2576B89EC233 with error: -42908"

Error code 9 points to a decryption issue, but offers no useful pointers and suggests that some sort of network request needs to be made in order to decrypt our models.

/*!  Core ML throws/returns this error when the framework encounters an error in the model
  decryption subsystem.

  The typical cause for this error is in the key server configuration and the client application
  cannot do much about it.

  For example, a model loading method will throw/return the error when it uses incorrect model
  decryption key.
*/
MLModelErrorModelDecryption API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) = 9,

I could not find a reference to error '-42908' anywhere.

ChatGPT just lied to me, as usual...

How do can I resolve this or diagnose this further?

Thanks.

Answered by DTS Engineer in 838490022

Looking through the source I can see -42908 isn an ML error related to decryption with a tag "invalid system state". I couldn't find anything else about it. Maybe through the bug reporting process we can learn more.

Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

Looking through the source I can see -42908 isn an ML error related to decryption with a tag "invalid system state". I couldn't find anything else about it. Maybe through the bug reporting process we can learn more.

Please file a bug report, include a small Xcode project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

FB17542119

Thank you.

CoreML MLModelErrorModelDecryption error
 
 
Q