Cannot set language/locale

Since 1.3 whenever I try to use the language capability I get the error “Appium was unable to set locale info: Error: Settings file /Users/srv_teste_aut_hmg/Library/Developer/CoreSimulator/Devices/26243EFA-2F9E-4D21-95F5-0D2C6F441474/data/Library/Preferences/.GlobalPreferences.plist did not exist”. I can’t set the language so my tests failing.
Somebody has a clue of what can be happening?

1.3.1 behaves the same way

Someone can help me?

We just went through this same issue and did not find anything on the web to help so adding a comment in case it can help someone else.

We found that there were alot of simulator device files that still had handles on them from previous runs. Not sure how it happened but likely some combination of killing appium and/or killing the simulator and/or killing process and/or running xcrun simctl [delete|shutdown].

We ended up killing any processes that had a handle to Library/Developer/CoreSimulator/Devices//data. There were alot of them!

The one liner is: lsof | grep Library/Developer/CoreSimulator/Devices/ | awk -F’ ’ ‘{print "kill -9 "$2}’ | sort -u
Pipe that to sh to actually kill the processes with the leaky file handles.

So far it has been working for us. We are once again able to start an iOS session without getting any of the following errors:

[simctl] Error: simctl error: An error was encountered processing the command (domain=NSCocoaErrorDomain, code=513):
“data” couldn’t be removed because you don’t have permission to access it.

or

[Error: Could not save plist: ENOENT: no such file or directory, open ‘/Users//Library/Developer/CoreSimulator/Devices/8431B85C-6E34-46A5-9424-0657AB4CE351/data/Library/Preferences/.GlobalPreferences.plist’]
[iOS] Error: Appium was unable to set locale info: Error: Could not save plist: ENOENT: no such file or directory, open ‘/Users//Library/Developer/CoreSimulator/Devices/8431B85C-6E34-46A5-9424-0657AB4CE351/data/Library/Preferences/.GlobalPreferences.plist’