-1

I am trying to setup the detox build for ios in circleci using the macos executor. The issue I had was with applesmiutils. When the app tries to run, it executes the command applesimutils --list byId='SIM_ID'. This command if run locally, gives the desired results but causes a failure on CircleCI. The failure is:

rror: The data couldn’t be read because it isn’t in the correct format.. See “applesimutils --help” for usage.

Error: Unable to obtain a list of simulators. See “applesimutils --help” for usage.
Kaushil Ruparelia
  • 1,179
  • 2
  • 9
  • 26

1 Answers1

0

After a lot of debugging and trying different versions of applesimutils, it did not help. Even without the detox commands the applesimutils --list command was failing but if we do sudo applesimutils --list that was successful.

So, definitely something wrong with the applesimutils --list. I downgraded the utils but no use.

The issue was that I was using NVM in my CircleCI setup that printed these lines when the xcrun simctl list devices command was run by applesimutils:

v16.19.1 is already installed.
Now using node v16.19.1 (npm v8.19.3)

This caused the data format to change from JSON to a format not recognizable by applesimutils.

I changed the node installation script to brew install node@16 and everything started working including detox tests!

Kaushil Ruparelia
  • 1,179
  • 2
  • 9
  • 26