plu / simctl

Ruby interface to xcrun simctl

Home Page:http://www.rubydoc.info/gems/simctl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error trying to launch a recently created device: device.plist not readable!

UnsafePointer opened this issue · comments

I tried to follow the example provided in the README.md and got the following:

/Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/CFPropertyList-2.3.2/lib/cfpropertylist/rbCFPropertyList.rb:348:in `load': File /Users/renzo.crisostomo/Library/Developer/CoreSimulator/Devices/A326F174-3482-4A2B-A75C-3FF29DFB47F8/device.plist not readable! (IOError)
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/CFPropertyList-2.3.2/lib/cfpropertylist/rbCFPropertyList.rb:253:in `initialize'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl/device.rb:146:in `new'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl/device.rb:146:in `plist'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl/device.rb:30:in `devicetype'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl/command/launch.rb:22:in `launch_device'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl.rb:22:in `method_missing'
    from /Users/renzo.crisostomo/.rvm/gems/ruby-2.3.1/gems/simctl-1.5.0/lib/simctl/device.rb:67:in `launch!'
    from test.rb:13:in `<main>'

Any ideas what could go wrong? I make sure to have the latest simctl and CFPropertyList.

If I replace create_device with reset_device it works. Not sure if this helps to trace the issue, maybe it's something wrong on my computer? (rvm, ruby version, ...)

Thank you for reporting this (and hello XING :))! I found a race condition in simctl: I expected after creating a new device the device.plist to just be there. I actually seen this problem in the tests, but only fixed it there. Silly mistake.

Please let me know if master is fine for you now. I'll release a new version to rubygems.org then.

👋 from XING. I tried master and everything works (both create_device and reset_device), thank you for having a look at it so quickly.

Great! 👍

I'll push a new release out to rubygems.org soonish.

simctl 1.5.1 built to pkg/simctl-1.5.1.gem.
Tagged v1.5.1.
Pushed git commits and tags.
Pushed simctl 1.5.1 to rubygems.org.