Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817

Running an XCode 12, iPhone 12, iOS 14.3 emulator and receiving this error:

Code Block
Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x35effaa3 2bab3fa8 68f8c96b cd17d15e ... 9bf8f6b7 fd486754 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xe14e0f7b 39a9580e 8e4762c4 846107dc ... 21618def 3c69a5ae }}


This is preventing us from using 'axios' in order to sign into our application. Is there a solution to this issue? What are the steps to remedy?
I'm having the same issue running Xcode 12.3 on Simulator iPhone 11 on Apple M1 Chip.
Can someone help? @JKeane00, have you found resolution to the issue?
I had a somewhat different but similar issue when building on M1 MBP with Xcode running with Rosetta. Some of Apple's APIs failed and together with failing there is this error printed to the console.

In my opinion this is some kind of a simulator bug and it is present as of Xcode 12.3. Maybe 12.4 solves it, but I did not try.

Anyway, what solved it for me was to download iOS 13.7 simulator runtime and create a new simulator with this iOS version.
Same problem:

Note that building my App with Rosetta on Macbook Air M1 and xCode 12.4 do build,
but shows a white screen on emulator. 

In console this error:

Code Block 2021-02-05 14:30:25.803954+0100 MyApp[56865:1897839] 7.5.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-02-05 14:30:25.825210+0100 MyApp[56865:1895569] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.825935+0100 MyApp[56865:1895569] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.827823+0100 MyApp[56865:1895569] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.827908+0100 MyApp[56865:1895569] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.828663+0100 MyApp[56865:1895569] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.828765+0100 MyApp[56865:1895569] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.830113+0100 MyApp[56865:1895569] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.830204+0100 MyApp[56865:1895569] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.831817+0100 MyApp[56865:1895569] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}
2021-02-05 14:30:25.831914+0100 MyApp[56865:1895569] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x64ffa485 dd556ca7 e49bc38c da04e080 ... e817a119 c3dad3ce }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xf74b7cf2 146c7320 f164d932 556def6c ... e5c99aa7 f132eec7 }}



This occurred for me using Xcode 12.5 on an M1 Mac mini.

The solution in my case was to ensure that Xcode was opened without using Rosetta.

To check for this, select Xcode in the Finder in your Applications folder, then press Command-I.

Under the General section of the Info dialog that appears, ensure there is no checkmark beside the "Open using Rosetta" option.

Then close and re-open Xcode, and try building your application and running within the Simulator again.

In my case, this resolved the appearance of the errors described by the original poster.

It's been a year now, and Apple needs to address these M1 related errors. It's messy coding, and we also shouldn't have to do an extra enabling of Rosetta to get things to work in the first place.

Amazing Apple will ship M1 computers that developers cant even run apps on

I found this post while searching for an error encountered while running UI tests on an automated build machine. We were able to fix the issue by prepending arch -arm64 to the xcodebuild command, which tells xcodebuild to run using the apple silicon architecture rather than x86 under rosetta. E.g. arch -arm64 xcodebuild test

Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817
 
 
Q