Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to unzip file: calabash.framework.zip #682

Closed
katopz opened this Issue Jan 20, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@katopz
Copy link

katopz commented Jan 20, 2015

All working fine for me before, but (I think) until 0.12.1 I got this error

PIs-Mac-mini-2:todoSwift pirsquaremacmini3$ ls
README.md       SingleTodo      SingleTodo.xcodeproj    build.sh
PIs-Mac-mini-2:todoSwift pirsquaremacmini3$ calabash-ios setup
Checking if Xcode is running...
Found Project: SingleTodo

----------Info----------
error:  cannot delete old ./calabash.framework/Headers
error:  cannot delete old ./calabash.framework/Resources
error:  cannot delete old ./calabash.framework/Versions/0.12.0
error:  cannot delete old ./calabash.framework/Versions/Current
caution: excluded filename not matched:  __MACOSX/*
caution: excluded filename not matched:  calabash.framework/.DS_Store

----------Error----------
Unable to unzip file: /usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.1/bin/../staticlib/calabash.framework.zip
You must install manually.
---------------------------

All ruby gems and else is update to present version.
Please advice or give me a hint for how to manually install.

Thanks

@katopz

This comment has been minimized.

Copy link
Author

katopz commented Jan 20, 2015

seem like v0.12.1 calabash.framework.zip is broken and just can't extract

screen shot 2558-01-20 at 14 26 50

my temporary workaround for now is manually replace older version e.g. 0.12.0

$ gem install calabash-cucumber -v "=0.12.0"

then copy
/usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.0/bin/staticlib/calabash.framework.zip
to
/usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.1/bin/staticlib/calabash.framework.zip

and it will working like usual

Thanks

@jmoody

This comment has been minimized.

Copy link
Member

jmoody commented Jan 20, 2015

Also reported on the forum: https://groups.google.com/forum/#!topic/calabash-ios/Igc7G58Msy4

I will have a permanent solution by COB today.

Workaround

Calabash iOS 0.12.1 was a gem-only release; there was not change in the server. If you have already installed the 0.12.0 server, there is no need to update. Put another way, for this release you don't need to run $ calabash-ios download. If you are updating from a pre-release or cannot roll-back your changes in the calabash.framework, you could try installing the 0.12.0 gem, updating the framework as you normally would, and then updating the calabash-ios gem to 0.12.1.

If you are using git and your calabash.framework is under version control:

$ git checkout calabash.framework
Using bundler (Recommended)
# Update your Gemfile
gem 'calabash-cucumber', '0.12.0'

# Install the 0.12.0 server
$ bundle update
$ be calabash-ios download

# Update you Gemfile
gem 'calabash-cucumber', '0.12.1'

# Update your gems
$ bundle update
Using gem
$ mkdir -p /tmp/unzipping-framework
$ cd /tmp/unzipping-framework
$ gem install calabash-cucumber --install-dir "${PWD}" --version 0.12.0
$ cd gems/calabash-cucumber/staticlib
$ cp calabash.framework.zip /path/to/your/project
$ cd /path/to/your/project
$ rm -r calabash.framework
$ unzip -C -K -o -q -d ./ calabash.framework.zip 

# Clean up
$ cd ~/
$ rm -r /tmp/unzipping-framework

Reproduce

I was able to reproduce, but I don't have a cause. The problem is that unzip is failing.

Nothing has changed in the way we build the calabash.framework or archive the calabash.framework.zip.

Locally, I cannot reproduce the behavior when I run the $ rake build_server task - the resulting archive unzips without a problem.

I am going to chalk this up to a corrupt .zip file.

$ mkdir -p ~/tmp/unzipping-framework
$ cd ~/tmp/unzipping-framework
$ gem install calabash-cucumber --install-dir "${PWD}"
$ cd gems/calabash-cucumber/staticlib
$ ls -al
total 71784
drwxr-xr-x   4 moody  staff       136 Jan 20 09:30 .
drwxr-xr-x  11 moody  staff       374 Jan 20 09:03 ..
-rw-r--r--   1 moody  staff  20252106 Jan 20 09:03 calabash.framework.zip
-rw-r--r--   1 moody  staff  16495428 Jan 20 09:03 libFrankCalabash.a

$ unzip -C -K -o -q -d ./ calabash.framework.zip 
error:  cannot delete old ./calabash.framework/Headers
error:  cannot delete old ./calabash.framework/Resources
error:  cannot delete old ./calabash.framework/Versions/0.12.0
error:  cannot delete old ./calabash.framework/Versions/Current

# Clean up
$ cd ~/
$ rm -r ~/tmp/unzipping-framework
@shams-ahmed

This comment has been minimized.

Copy link

shams-ahmed commented Jan 20, 2015

command cd gems/calabash-cucumber/staticlib should be
cd gems/calabash-cucumber-0.12.0/staticlib

also the gem guide forgot to clean up the zip that was copied

@katopz

This comment has been minimized.

Copy link
Author

katopz commented Jan 21, 2015

Here's more detail about corrupted zip via Win7x64
calabash

hit "No to All" to continue and rezip extracted folder (so now we get good zip) and replace it to

/usr/local/lib/ruby/gems/2.2.0/gems/calabash-cucumber-0.12.1/bin/staticlib/calabash.framework.zip

seem to be working on me (another work around for me)

@jmoody

This comment has been minimized.

Copy link
Member

jmoody commented Jan 21, 2015

Will be fixed in calabash-ios 0.12.2 which will be released later today.

@jmoody jmoody referenced this issue Jan 21, 2015

Merged

Release/0.12.2 #689

@jmoody jmoody closed this Jan 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.