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

Errno::ENOENT - No such file or directory @ rb_sysopen #9226

Closed
1 task done
matttobin-ow opened this issue Oct 8, 2019 · 18 comments
Closed
1 task done

Errno::ENOENT - No such file or directory @ rb_sysopen #9226

matttobin-ow opened this issue Oct 8, 2019 · 18 comments

Comments

@matttobin-ow
Copy link

matttobin-ow commented Oct 8, 2019

Report

What did you do?

Run pod repo update on an Azure DevOps agent

What did you expect to happen?

Update all pod dependencies correctly

What happened instead?

Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `initialize'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `open'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `update'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/command/repo/update.rb:23:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/bin/pod:55:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/bin/pod:23:in `load'
/usr/local/lib/ruby/gems/2.6.0/bin/pod:23:in `<main>'

CocoaPods Environment

Stack

   CocoaPods : 1.8.1
        Ruby : ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
    RubyGems : 3.0.3
        Host : Mac OS X 10.14.6 (18G103)
       Xcode : 10.3 (10G8)
         Git : git version 2.23.0
Ruby lib dir : /usr/local/Cellar/ruby/2.6.4_2/lib
Repositories : 

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0
@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

Seems like a duplicate of #9216.

Please upload clear instructions on how you got the issue. I am going to close as duplicate but #9216 is still open and we need instructions on how to reproduce.

@dnkoutso dnkoutso closed this as completed Oct 8, 2019
@Towerism
Copy link

Towerism commented Oct 8, 2019

@dnkoutso How do you figure this is a duplicate? The errors are different.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

The error here is:

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock

The error in #9216 is also:

No such file or directory ~/.cocoapods/repos/Spec_Lock

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

Do you have concrete steps to get this error? i.e Were on CocoaPods 1.7.x and you upgraded? What does the Podfile look like? What is in your pod repo list?

I need clear information so I can reproduce this and fix it.

@Towerism
Copy link

Towerism commented Oct 8, 2019

I'm also on an azure devops agent. Getting the same error. I tried both cocoapods versions 1.8.1 and 1.8.0

@Towerism
Copy link

Towerism commented Oct 8, 2019

$ pod repo list

0 repos

EDIT: this is before trying to run pod repo update

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

What is the output of ls ~/.cocoapods/repos ?

@Towerism
Copy link

Towerism commented Oct 8, 2019

ls: /Users/vsts/.cocoapods/repos: No such file or directory
cocoapods was installed with sudo gem install cocoapods -v 1.8.0 if that helps.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

I guess you had no repo's before. I think I see the issue now. Basically on a clean install of CocoaPods 1.8.x we need to invoke at least one pod install for the repos dir to be created.

@Towerism
Copy link

Towerism commented Oct 8, 2019

Ah okay. So the reason I'm doing pod repo update is that some of my pods don't get installed if I don't. Is this a good workaround:

$ pod install
$ pod repo update
$ pod install

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

You can also do pod install --repo-update once and it should do it together.

@Towerism
Copy link

Towerism commented Oct 8, 2019

Solid. I'll try that.

@Towerism
Copy link

Towerism commented Oct 8, 2019

This works

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 8, 2019

great. Will try to fix the issue for 1.8.3.

@HectorGlez4
Copy link

@Towerism Im having the same problem with azure pipelines I've tried the fix

pod install --repo-update

on the directory where i have my config.xml but I get.

No 'Podfile' found in the directory

This is my first time using a mac agent. could you tell at what level did you excecute the command?

my config:
CocoaPods : 1.8.1
Ruby : ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
RubyGems : 3.0.3
Host : Mac OS X 10.14.6 (18G103)
Xcode : 10.3 (10G8)
Git : git version 2.23.0
Ruby lib dir : /usr/local/Cellar/ruby/2.6.4_2/lib

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0


error: Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock

@dnkoutso
Copy link
Contributor

The issue is fixed and will ship with 1.8.4.

@Towerism
Copy link

@HectorGlez4 For me there is a Podfile in platforms/ios within the directory that contains my config.xml. That's where I would run pod install --repo-update

@MaxDesiatov
Copy link

This makes all our CI builds fail on pod repo update, which is required for pod lib lint to pull the dependencies. Would anyone mind tagging 1.8.4 with the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants