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

Invalid lock file after install/update #4740

Closed
djbe opened this issue Jan 7, 2016 · 24 comments
Closed

Invalid lock file after install/update #4740

djbe opened this issue Jan 7, 2016 · 24 comments
Assignees
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor

Comments

@djbe
Copy link

djbe commented Jan 7, 2016

Ever since I installed the 1.0 beta I keep getting the following error whenever I try pod install or pod update:

[!] Invalid Lockfile in `/Users/....../Podfile.lock`

My Podfile:

platform :ios, '8.0'

inhibit_all_warnings!
use_frameworks!
source 'https://github.com/CocoaPods/Specs.git'

target 'Example' do
    pod 'Crashlytics'
    pod 'DZNEmptyDataSet'
    pod 'Fabric'
    pod 'FontAwesomeKit/IonIcons'
    pod 'Metawear-iOSAPI'
    pod 'Whisper'
end

The contents of the lock file are as follows:

>-
  PODS:
  - >-
    Bolts/Tasks (1.5.1)
  - >-
    Crashlytics (3.4.1):
    - >-
      Fabric (~> 1.6.0)
  - >-
    DZNEmptyDataSet (1.7.3)
  - >-
    Fabric (1.6.1)
  - >-
    FontAwesomeKit/Core (2.2.0)
  - >-
    FontAwesomeKit/IonIcons (2.2.0):
    - >-
      FontAwesomeKit/Core
  - >-
    Metawear-iOSAPI (2.0.1):
    - >-
      Bolts/Tasks (~> 1.5)
  - >-
    Whisper (1.1.0)

>-
  DEPENDENCIES:
  - >-
    Crashlytics
  - >-
    DZNEmptyDataSet
  - >-
    Fabric
  - >-
    FontAwesomeKit/IonIcons
  - >-
    Metawear-iOSAPI
  - >-
    Whisper

>-
  SPEC CHECKSUMS:
  >-
    Bolts: >-
    a12663244b1d3351c738882e71902fc74db54f64
  >-
    Crashlytics: >-
    41574a245bc6ae10c55d57f385ebd2004e5bee05
  >-
    DZNEmptyDataSet: >-
    dd7cca17c1d07dfa78956859b1e70a52505678ef
  >-
    Fabric: >-
    bf0ceb04e7c924090efc5f8c55e4fbcca189e0a0
  >-
    FontAwesomeKit: >-
    025fd4dd1017fe4e3f8d47b03e024deedbb33cd4
  >-
    Metawear-iOSAPI: >-
    6a9df6f09071c11df828e63a49384d6a13d1dc33
  >-
    Whisper: >-
    80f9eafa9d51dbc246f7c6aeb8aaa146a20cddce

>-
  PODFILE CHECKSUM: >-
  fd7525cdeca105104e52d2a7ab3a3719181cdf56

>-
  COCOAPODS: >-
  1.0.0.beta.2

This happens when using both the 1.0 beta1 and beta2. The contents of the Podfile.lock and Manifest.lock are the same.

@orta
Copy link
Member

orta commented Jan 7, 2016

That's a pretty weird looking lockfile - are you doing any scripting on these? Here's mine for example

@djbe
Copy link
Author

djbe commented Jan 7, 2016

I know, my lock files looked like that before the update. Nope, not doing any scripting, just plain pod install

@djbe
Copy link
Author

djbe commented Jan 7, 2016

No idea if this helps, but this is the output of gem query --local:


*** LOCAL GEMS ***

activesupport (4.2.4)
aws-sdk (1.64.0)
aws-sdk-core (2.0.41)
aws-sdk-resources (2.0.41)
aws-sdk-v1 (1.64.0)
bigdecimal (1.2.7, 1.2.0)
builder (3.2.2)
certified (1.0.0)
CFPropertyList (2.3.2, 2.2.8)
claide (1.0.0.beta.1)
cocoapods (1.0.0.beta.2)
cocoapods-core (1.0.0.beta.2)
cocoapods-deintegrate (1.0.0.beta.1)
cocoapods-downloader (1.0.0.beta.1)
cocoapods-plugins (1.0.0.beta.1)
cocoapods-search (1.0.0.beta.1)
cocoapods-stats (1.0.0.beta.2)
cocoapods-trunk (1.0.0.beta.1)
cocoapods-try (1.0.0.beta.2)
colored (1.2)
commander (4.3.4)
dotenv (2.0.1, 1.0.2)
dotenv-deployment (0.3.0)
escape (0.0.4)
faraday (0.9.1, 0.8.9)
faraday_middleware (0.9.1)
fourflusher (0.3.0)
fuzzy_match (2.1.0, 2.0.4)
highline (1.7.2)
i18n (0.7.0)
io-console (0.4.2)
jmespath (1.0.2)
json (1.8.2, 1.7.7)
json_pure (1.8.2)
krausefx-shenzhen (0.14.2)
libxml-ruby (2.8.0, 2.6.0)
mini_portile (0.6.2)
mini_portile2 (2.0.0)
minitest (5.6.1, 4.3.2)
molinillo (0.4.1)
multi_json (1.11.0)
multipart-post (2.0.0, 1.2.0)
nap (1.0.0)
net-sftp (2.1.2)
net-ssh (2.9.2)
netrc (0.10.3, 0.7.8)
nokogiri (1.6.7.1, 1.5.6)
open4 (1.3.4)
plist (3.1.0)
power_assert (0.2.3)
psych (2.0.13, 2.0.0)
rake (10.4.2, 0.9.6)
rdoc (4.2.0, 4.0.0)
rubygems-update (2.4.6)
rubyzip (1.1.7)
security (0.1.3)
shenzhen (0.14.2)
simple-xml (1.0.0)
sqlite3 (1.3.10, 1.3.7)
terminal-table (1.4.5)
test-unit (3.0.9, 2.0.0.0)
thread_safe (0.3.5)
tzinfo (1.2.2)
xcodeproj (1.0.0.beta.2)

@segiddins
Copy link
Member

Can you try deleting the lockfile and re-running pod install?

@S2Ler
Copy link

S2Ler commented Jan 8, 2016

I have the same issue. To update pods I need to delete Podfile.lock and Manifest.lock. My lock file looks the same as djbe's

Before update:

PODS:
  - Bolts (1.5.0):
    - Bolts/AppLinks (= 1.5.0)
    - Bolts/Tasks (= 1.5.0)
...

After update:

>-
  PODS:
  - >-
    Bolts (1.5.1):
    - >-
      Bolts/AppLinks (= 1.5.1)
    - >-
      Bolts/Tasks (= 1.5.1)
...

@S2Ler
Copy link

S2Ler commented Jan 8, 2016

I managed to fix this problem.
I had ruby 2.3.0dev (2015-07-06 trunk 51155) [x86_64-darwin14], switched to ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] and now everything is ok.

@djbe
Copy link
Author

djbe commented Jan 8, 2016

@segiddins I actually can't use cocoapods without deleting both Podfile.lock and Pods/Manifest.lock, so every time I want to run pod install, I have to delete them.

@diejmon I have ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15], which is the default version. I can't image I'd have to install a custom ruby version just to use CocoaPods? Everything worked before, up to and including 0.39.0.

Unless more people are seeing this, I can only assume it's because something on my system, but I have no idea why.

@segiddins
Copy link
Member

I'm guessing its a local configuration issue, but I have no clue what would cause it.

@Athosone
Copy link

same issue there since the new update

@ghost
Copy link

ghost commented Jan 11, 2016

I was able to fix this issue by uninstalling old gems. Here's the before and after output of gem query --local

*** LOCAL GEMS ***

activesupport (4.2.0)
bigdecimal (1.2.5, 1.2.0)
CFPropertyList (2.3.0, 2.2.8)
claide (1.0.0.beta.1, 0.9.1, 0.8.0, 0.7.0)
cocoapods (1.0.0.beta.2, 0.39.0, 0.35.0)
cocoapods-core (1.0.0.beta.2, 0.39.0, 0.35.0)
cocoapods-deintegrate (1.0.0.beta.1)
cocoapods-downloader (1.0.0.beta.1, 0.9.3, 0.8.1)
cocoapods-plugins (1.0.0.beta.1, 0.4.2, 0.4.0, 0.3.2)
cocoapods-search (1.0.0.beta.1, 0.1.0)
cocoapods-stats (1.0.0.beta.2, 0.6.2)
cocoapods-trunk (1.0.0.beta.1, 0.6.4, 0.5.0, 0.4.1)
cocoapods-try (1.0.0.beta.2, 0.5.1, 0.4.3)
colored (1.2)
escape (0.0.4)
fourflusher (0.3.0)
fuzzy_match (2.1.0, 2.0.4)
i18n (0.7.0)
io-console (0.4.2)
json (1.8.2, 1.7.7)
libxml-ruby (2.8.0, 2.6.0)
mini_portile (0.6.2)
minitest (5.5.1, 5.5.0, 4.3.2)
molinillo (0.4.1, 0.4.0, 0.2.0, 0.1.2)
nap (1.0.0, 0.8.0)
netrc (0.10.2, 0.7.8)
nokogiri (1.5.6)
open4 (1.3.4)
power_assert (0.2.2)
psych (2.0.10, 2.0.0)
rake (10.4.2, 0.9.6)
rdoc (4.2.0, 4.0.0)
sqlite3 (1.3.10, 1.3.7)
test-unit (3.0.9, 2.0.0.0)
thread_safe (0.3.4)
tzinfo (1.2.2)
xcodeproj (1.0.0.beta.2, 0.28.2, 0.21.0, 0.20.2)
*** LOCAL GEMS ***

activesupport (4.2.0)
bigdecimal (1.2.0)
CFPropertyList (2.2.8)
claide (1.0.0.beta.1)
cocoapods (1.0.0.beta.2)
cocoapods-core (1.0.0.beta.2)
cocoapods-deintegrate (1.0.0.beta.1)
cocoapods-downloader (1.0.0.beta.1)
cocoapods-plugins (1.0.0.beta.1)
cocoapods-search (1.0.0.beta.1)
cocoapods-stats (1.0.0.beta.2)
cocoapods-trunk (1.0.0.beta.1)
cocoapods-try (1.0.0.beta.2)
colored (1.2)
escape (0.0.4)
fourflusher (0.3.0)
fuzzy_match (2.1.0, 2.0.4)
i18n (0.7.0)
io-console (0.4.2)
json (1.7.7)
libxml-ruby (2.6.0)
mini_portile (0.6.2)
minitest (5.5.1, 4.3.2)
molinillo (0.4.1)
nap (1.0.0)
netrc (0.10.2, 0.7.8)
nokogiri (1.5.6)
open4 (1.3.4)
power_assert (0.2.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
sqlite3 (1.3.7)
test-unit (2.0.0.0)
thread_safe (0.3.4)
tzinfo (1.2.2)
xcodeproj (1.0.0.beta.2)

@djbe
Copy link
Author

djbe commented Jan 11, 2016

Allright, I uninstalled all my gems (had to disable SIP and re-enable it afterwards). I installed cocoapods (and shenzhen) again, and finally don't have the issue anymore!

For the sake of comparison, here is my new list of installed gems:

activesupport (4.2.5)
aws-sdk (1.66.0)
aws-sdk-core (2.2.9)
aws-sdk-resources (2.2.9)
aws-sdk-v1 (1.66.0)
bigdecimal (1.2.0)
claide (1.0.0.beta.1)
cocoapods (1.0.0.beta.2)
cocoapods-core (1.0.0.beta.2)
cocoapods-deintegrate (1.0.0.beta.1)
cocoapods-downloader (1.0.0.beta.1)
cocoapods-plugins (1.0.0.beta.1)
cocoapods-search (1.0.0.beta.1)
cocoapods-stats (1.0.0.beta.2)
cocoapods-trunk (1.0.0.beta.1)
cocoapods-try (1.0.0.beta.2)
colored (1.2)
commander (4.3.5)
dotenv (2.0.2)
escape (0.0.4)
faraday (0.8.11)
faraday_middleware (0.10.0)
fourflusher (0.3.0)
fuzzy_match (2.0.4)
highline (1.7.8)
i18n (0.7.0)
io-console (0.4.2)
jmespath (1.1.3)
json (1.8.3, 1.7.7)
mini_portile2 (2.0.0)
minitest (5.8.3, 4.3.2)
molinillo (0.4.1)
multipart-post (2.0.0, 1.2.0)
nap (1.0.0)
net-sftp (2.1.2)
net-ssh (3.0.2)
netrc (0.7.8)
nokogiri (1.6.7.1)
plist (3.1.0)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubyzip (1.1.7)
security (0.1.3)
shenzhen (0.14.2)
sqlite3 (1.3.7)
terminal-table (1.4.5)
test-unit (2.0.0.0)
thread_safe (0.3.5)
tzinfo (1.2.2)
xcodeproj (1.0.0.beta.2)

@djbe djbe closed this as completed Jan 14, 2016
@fishstix-medhelp
Copy link

I'm also seeing this issue; I'm using ruby -v:
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin15.0.0]

@lagerkoller
Copy link

Same here. ruby -v:
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]

@cameroncooke
Copy link

I'm also having this same issue, so this is not isolated. I currently can't use Cocoapods.

@orta
Copy link
Member

orta commented Jan 25, 2016

If you're blocked on this, the Mac App has all of the environment (and psyche which is likely the issue here ) set up perfectly.

@cameroncooke
Copy link

Brilliant will use that from now on.

@odrobnik
Copy link

odrobnik commented Feb 2, 2016

@orta That does nothing. I have the same ruby and Cocoapods pre auf two machines, but they cannot work with each other's Podfile.lock

This is mine:

PODS:
  - Bolts (1.6.0):
    - Bolts/AppLinks (= 1.6.0)
    - Bolts/Tasks (= 1.6.0)
  - Bolts/AppLinks (1.6.0):
    - Bolts/Tasks
  - Bolts/Tasks (1.6.0)
  - DTFoundation/Core (1.7.9)
  - DTFoundation/UIKit (1.7.9):
    - DTFoundation/Core
  - FBSDKCoreKit (4.9.1):
    - Bolts (~> 1.5)

DEPENDENCIES:
  - Bolts
  - DTFoundation/Core (from `Externals/DTFoundation/DTFoundation.podspec`)
  - DTFoundation/UIKit (from `Externals/DTFoundation/DTFoundation.podspec`)
  - FBSDKCoreKit

EXTERNAL SOURCES:
  DTFoundation:
    :path: Externals/DTFoundation/DTFoundation.podspec

SPEC CHECKSUMS:
  Bolts: f52a250053bb517ca874523c3913776359ab3def
  DTFoundation: 70a0765e3596f82dd421832e95c65e2166eb3102
  FBSDKCoreKit: aee20b6d9855f15b618d4fddd1a5ad45f5a4a59d

PODFILE CHECKSUM: 1ffbf6aaa3023e5199820266d29d57fbec39e342

COCOAPODS: 1.0.0.beta.2

In both cases the pod install or pod update fails until I delete the file and recreate it. The resulting Podfile.lock is completely identitalc

Could it be that there is a problem dealing with development pods? e.g. line 22 local git submodule. This problem appears since we moved from the 0.39 to the 1.0.0.beta.2. Using the Cocoapods app does not seem to do anything different.

@odrobnik
Copy link

odrobnik commented Feb 2, 2016

PS: It seems that the Pods/Manifest.lock gets somehow corrupted if you have Ruby 2.0.0. The problem is, that then the pod update fails and you never know because the Pods folder is usually excluded from git.

I updated to Ruby 2.3.0 with rvm and after deleting the manifest I could update

PS: Cocoapods should force an update if it cannot read the Manifest from an earlier version.

@orta
Copy link
Member

orta commented Feb 2, 2016

From the looks on the YAML spec, >- seems to be something that declares things that follow should be treated as a literal string, for for example

>-
  PODS:
  - >-
    Bolts/Tasks (1.5.1)
  - >-
    Crashlytics (3.4.1):
    - >-
      Fabric (~> 1.6.0)

turns into

"PODS: - >-\n  Bolts/Tasks (1.5.1)\n- >-\n  Crashlytics (3.4.1):\n  - >-\n    Fabric (~> 1.6.0)"

( try it here: http://yaml-online-parser.appspot.com )

Perhaps for a specific version of ruby/psyche it's converting the files into a string?

@ezescaruli
Copy link

I'm also having this issue. I created a brand new project to try in a clean environment:
https://github.com/ezescaruli/CocoaPodsExample

The pod file is very simple, only includes RestKit:
https://github.com/ezescaruli/CocoaPodsExample/blob/master/Podfile
and I ran pod _1.0.0.beta.4_ install.

After that, the Podfile.lock file looks wrong as well:
https://github.com/ezescaruli/CocoaPodsExample/blob/master/Podfile.lock

I don't want to update all my gems cause that could cause inconsistencies in my computer. Is there any of them that I should particularly update, say psych?

This is my psych version:

$ gem list psych
psych (2.0.11, 2.0.5)

Thanks!

@segiddins segiddins reopened this Feb 25, 2016
@segiddins segiddins self-assigned this Feb 25, 2016
@segiddins segiddins added the s2:confirmed Issues that have been confirmed by a CocoaPods contributor label Feb 25, 2016
@ezescaruli
Copy link

Thanks!

@wkoszek
Copy link

wkoszek commented Mar 4, 2016

@segiddins 've installed cocoapods with gem update cocoapods --pre and I've git this issue.

wk:/w/repos/sensorama-ios> pod --version
1.0.0.beta.4

@segiddins
Copy link
Member

@wkoszek it's fixed on master of CocoaPods/Core

@odrobnik
Copy link

odrobnik commented Apr 9, 2016

I just found that updating Cocoapods to 1.0.0.beta.6 - while still on ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15] - fixes the >- problem goes away. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor
Projects
None yet
Development

No branches or pull requests