Random failures in debug deploy on device: Assertion failed: (product_version != nil)

1,185 views
Skip to first unread message

John Sheets

unread,
Jul 5, 2013, 3:48:09 PM7/5/13
to rubym...@googlegroups.com
Anyone else seeing this?

Lately I've been hitting a strange sporadic deploy error about 50% - 75% of the time when deploying to my device in debug mode. Typically re-running the same command with no changes a time or two will succeed. (I don't think I've ever seen it in a non-debug device deploy.)

I'm simply running this command:

  rake device debug=1

    …
    Create ./build/iPhoneOS-6.0-Development/vivogig.dSYM
  Codesign ./build/iPhoneOS-6.0-Development/vivogig.app
    Create ./build/iPhoneOS-6.0-Development/vivogig.ipa
    Deploy ./build/iPhoneOS-6.0-Development/vivogig.ipa
Assertion failed: (product_version != nil), function start_debugger, file deploy.m, line 354.
rake aborted!
Command failed with status (): [XCODE_DIR="/Applications/Xcode.app/Content...]
/Users/jsheets/.rvm/gems/ruby-1.9.3-p392@motion/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/jsheets/.rvm/gems/ruby-1.9.3-p392@motion/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'
/Users/jsheets/.rvm/gems/ruby-1.9.3-p392@motion/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'
/Users/jsheets/.rvm/gems/ruby-1.9.3-p392@motion/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'
/Library/RubyMotion/lib/motion/project/template/ios.rb:157:in `block in <top (required)>'

Incidentally, I've found that I cannot run device debug at all while Xcode is running. Not sure if that's related, but it's a different error message when that happens. I've learned to shut down Xcode while debugging.

Thanks,
John

--
John Sheets
Tw: @johnsheets

Greg Fodor

unread,
Jul 5, 2013, 7:14:57 PM7/5/13
to rubym...@googlegroups.com
I've been getting this exact error for a while. It used to be something that worked on retry but it seems that over time it has gotten to the point where it literally never works (I can't say if it's been a steady degradation or a motion update made it worse or what.) I opened a ticket a long time ago but since it could not be reproduced next steps were I needed to send my source code, which I was unwilling to do, or send a test case, which I was unable to create since it seems to be related to something I am doing in my project, and creating a fresh project works just fine. I would imagine the RM team would be thrilled if you were willing to submit your project for testing.

Sorry this isn't helpful :( I can confirm it's not just you though.

John Sheets

unread,
Jul 8, 2013, 10:25:00 AM7/8/13
to rubym...@googlegroups.com
Thanks Greg, good to know I'm not alone. After I sent the email, the debug=1 started failing all the time. I couldn't get it to run at all any more. Restarting my laptop and phone didn't help. However, I did finally try a 'rake clean' and that seemed to fix the problem. I ran debug a few times without error. I suspect it'll probably start degrading again over time, who knows. However, if it is a build glitch that a clean fixes, then sending in the source code probably won't help.

I'm curious to hear if rake clean has fixed the errors on your end.

John



--
 
---
You received this message because you are subscribed to the Google Groups "RubyMotion - Ruby for iOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubymotion+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Louis-Alban KIM

unread,
Sep 4, 2013, 4:57:52 AM9/4/13
to rubym...@googlegroups.com
Hi there,

I'm getting the exact same error here. It happens all the time on the device, while everything runs just fine on the simulator.
Have you guyz found a solution?

What I've tried so far:
  • rake clean => no success
  • rm -r ~/Library/RubyMotion/build/build/* (where the gems are built) => no success
  • creating a new project => works fine
I'll try to pinpoint the problem on my side. Really need this to work!

$ rake device --trace
** Invoke pixate:sass (first_time)
** Execute pixate:sass
sass sass/default.scss resources/default.css
** Invoke device (first_time)
** Invoke archive (first_time)
** Invoke build:device (first_time)
** Execute build:device
** Execute archive
** Execute device
XCODE_DIR="/Applications/Xcode.app/Contents/Developer" /Library/RubyMotion/bin/ios/deploy -d "4dea17ea83b2622755b98c3feffebacexxxxxxxx" "./build/iPhoneOS-6.0-Development/NoReceipt.ipa"
log: subscribing to device notification
log: found usb mobile device 4dea17ea83b2622755b98c3feffebace39c06fee
log: connecting to device
log: pairing device
log: creating lockdown session
log: starting file copy service
log: starting installer proxy service
log: opening file copy connection
log: creating staging directory
log: opening remote package path
log: writing data
log: closing remote package path
log: sending install command
log: progress report: 5% status: CreatingStagingDirectory
log: progress report: 15% status: ExtractingPackage
log: progress report: 20% status: InspectingPackage
log: progress report: 20% status: TakingInstallLock
log: progress report: 30% status: PreflightingApplication
log: progress report: 30% status: InstallingEmbeddedProfile
log: progress report: 40% status: VerifyingApplication
log: progress report: 50% status: CreatingContainer
log: progress report: 60% status: InstallingApplication
log: progress report: 70% status: PostflightingApplication
log: progress report: 80% status: SandboxingApplication
log: progress report: 90% status: GeneratingApplicationMap
log: progress report: 100% status: Complete
log: package has been successfully installed on device
Assertion failed: (product_version != nil), function start_debug_server, file deploy.m, line 483.
rake aborted!
Command failed with status (): [XCODE_DIR="/Applications/Xcode.app/Content...]
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/file_utils_ext.rb:40:in `sh'
/Library/RubyMotion/lib/motion/project/template/ios.rb:161:in `block in <top (required)>'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/lakim/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/lakim/.rbenv/versions/1.9.3-p448/bin/rake:23:in `load'
/Users/lakim/.rbenv/versions/1.9.3-p448/bin/rake:23:in `<main>'
Tasks: TOP => device

John Sheets

unread,
Sep 4, 2013, 9:46:50 AM9/4/13
to rubym...@googlegroups.com
No luck here. I still get it most of the time. If I do a rake clean, sometimes it works for a bit (still randomly failing, but at least not all the time). One thing I haven't tried is a fresh code checkout. I've always built and run it in my original checkout directory.

John




For more options, visit https://groups.google.com/groups/opt_out.

Louis-Alban KIM

unread,
Sep 4, 2013, 11:03:18 AM9/4/13
to rubym...@googlegroups.com
I've spent a fair amount of time trying to find the source of the problem, but I don't get it: it really seems random!
Just tried a fresh code checkout without luck.

This is not a solution, but here's how I deal with it until we fix it:
rake device install_only=1
motion device:console (you can leave that open all the time)
Then launch the app directly on the device (tap on app icon...).
So no debugging possible, but at least I have the app logs. I can also still attach the process in Instruments if needed.

Duane Morin

unread,
Sep 9, 2013, 2:11:55 PM9/9/13
to rubym...@googlegroups.com
Here's my input for what it's worth (I just started getting this error today):

1) This has nothing to do with the debug flag, that I can tell.  I've never set it, and am still getting this problem on both "rake device" and "rake testflight", but not for the simulator.

2) It does appear to have something to do with XCode in general, not just RubyMotion, if this thread is any indication: http://stackoverflow.com/questions/9987192/xcode-will-run-app-on-simulator-but-not-on-device

3) If I delete my app from the device and then run "rake device", I still get the error ... but my app appears to have been correctly deployed!

4) It's possible that this error shows up after changing provisioning profiles?  There's mention of that in the Xcode thread from point #2, and I'm certainly in that case.  

Hope that moves some folks forward in their development.  Good luck!

Duane

Duane Morin

unread,
Sep 9, 2013, 2:41:42 PM9/9/13
to rubym...@googlegroups.com
Oh, and here's a bit of good news?  I had been using rubymotion 2.7 during all this, so I rolled back to 2.6 using the cool new --cache-verson=2.6 option.

After a rake clean && rake device?  No more error.  I also successfully did a "rake testflight".

So with that successfully in hand I then went back to using 2.7.  Same deal, "rake clean && rake device". 

Error comes back.  So maybe something's having trouble in combination between motion 2.7 and the latest version of Xcode?

Hope that helps somebody,

Duane
Message has been deleted

John Sheets

unread,
Oct 9, 2013, 11:13:49 AM10/9/13
to rubym...@googlegroups.com
Interesting, wow, that worked for me too.

I would have assumed I'd tried that in the past, but thinking back, maybe I didn't. I honestly can't remember if things broke for me when my provisioning profile changed, but that's likely, as my testers added new devices. I will now start paying attention to that.

Very cool and very strange. Thanks for sharing that!
John



On Wed, Oct 9, 2013 at 7:24 AM, Koen Schmeets <k.sch...@gmail.com> wrote:
I got this error after changing my provisioning profile, I still had the old app installed on my phone that was compiled with a different provisioning profile, after removing the app from the device, everything is working again.

Since it was mentioned before, I thought I would write my experiences here too.

Op vrijdag 5 juli 2013 21:48:09 UTC+2 schreef John Sheets:

--
You received this message because you are subscribed to the Google Groups "RubyMotion - Ruby for iOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubymotion+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
John Sheets
CTO, vivogig inc.
http://www.vivogig.com
t: @vivogig | @johnsheets

Fabian Aussems

unread,
Jul 21, 2014, 2:06:02 PM7/21/14
to rubym...@googlegroups.com
I have found out that this problem is caused when I got big files in my resources directory
Without big files in my resources directory everything went fine.

naren chainani

unread,
Jan 4, 2015, 12:20:52 AM1/4/15
to rubym...@googlegroups.com
Getting the same error on rubymotion 3.1. I am surprised this is still a problem with no fix/workaround available.

Fabian Aussems

unread,
Apr 3, 2015, 4:21:29 PM4/3/15
to rubym...@googlegroups.com
I got a workaround by putting big files in the documents folder on my device via ifuse.
Reply all
Reply to author
Forward
0 new messages