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

bad pack header #15621

Closed
3 tasks done
Dmole opened this issue Jul 3, 2023 · 13 comments
Closed
3 tasks done

bad pack header #15621

Dmole opened this issue Jul 3, 2023 · 13 comments
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@Dmole
Copy link

Dmole commented Jul 3, 2023

brew doctor output

brew doctor
Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

brew config
HOMEBREW_VERSION: 4.0.26-35-g9e257fc
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9e257fc96046535dbc066fb557e6a84802feb0b6
Last commit: 4 hours ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 188c1842bc571a8f7717027a790ebb1c6e9d5c8d
Core tap last commit: 5 months ago
Core tap branch: master
Core tap JSON: 03 Jul 23:37 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit cometlake
Clang: 14.0.3 build 1403
Git: 2.39.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.88.1 => /usr/bin/curl
macOS: 13.4-x86_64
CLT: 14.3.1.0.1.1683849156
Xcode: 14.3

What were you trying to do (and why)?

update, because that's what brew is for

What happened (include all command output)?

brew update -q
remote: fatal: object cd664d0fe91b5db6b28bcd24ea601469031b8164 cannot be read
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!

What did you expect to happen?

I expected brew to work

Step-by-step reproduction instructions (by running brew commands)

brew update -q
@Dmole Dmole added the bug Reproducible Homebrew/brew bug label Jul 3, 2023
@Bo98
Copy link
Member

Bo98 commented Jul 3, 2023

This is an issue we're talking to GitHub about, but it looks like you don't actually need the local git clone. Try brew untap homebrew/core homebrew/cask - formula and cask installs should still work normally for you because of a change we introduced in Homebrew 4.0.0.

@storopoli
Copy link

This is an issue we're talking to GitHub about, but it looks like you don't actually need the local git clone. Try brew untap homebrew/core homebrew/cask - formula and cask installs should still work normally for you because of a change we introduced in Homebrew 4.0.0.

What about for brew update and brew upgrade will it still work with brew untap homebrew/core homebrew/cask?

@MikeMcQuaid
Copy link
Member

What about for brew update and brew upgrade will it still work with brew untap homebrew/core homebrew/cask?

Yes.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2023
@norrisjeremy
Copy link

@MikeMcQuaid Why has this been closed if the issue hasn't been fixed?

@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Jul 4, 2023

@norrisjeremy several reasons:

  • the issue has been fixed
  • there is a workaround provided
  • when this breaks again: only GitHub can fix it, not Homebrew
  • that's how we run this particular open source project

@norrisjeremy
Copy link

Doesn't seem like it's been fixed since it happened again a little while ago.
Also, seems like the workaround should be better documented, especially if it is something that only Github can fix, so that users in the future don't have to be wondering why Homebrew is broken.

Or better yet, if homebrew/core homebrew/cask don't need to tapped in the first place, then why not simply automagically untap them, so that users don't have to even bother with a workaround?

@MikeMcQuaid
Copy link
Member

Doesn't seem like it's been fixed since it happened again a little while ago.

It was consistently reproducible yesterday. It is not consistently reproducible now. We are also affected by this bug.

Also, seems like the workaround should be better documented, especially if it is something that only Github can fix, so that users in the future don't have to be wondering why Homebrew is broken.
Or better yet, if homebrew/core homebrew/cask don't need to tapped in the first place, then why not simply automagically untap them, so that users don't have to even bother with a workaround?

This is being worked on and is literally the top of my list of priorities: #14592

Relatedly, I don't really appreciate the 👎🏻s when I take the time to answer your question. It disincentivises me from doing so in future and I'll just lock this issue if my responses to your questions get any more 👎🏻.

@Dmole
Copy link
Author

Dmole commented Jul 4, 2023

Relatedly, I don't really appreciate the 👎🏻s when I take the time to answer your question. It disincentivises me from doing so in future and I'll just lock this issue if my responses to your questions get any more 👎🏻.

If this issue had been closed as "duplicate" of #14592 or something other than "not planned" It would let people know it's being worked on instead of ignored.

Thanks for working on and tolerating (sometimes negative) feedback on this FOSS.

@Bo98
Copy link
Member

Bo98 commented Jul 4, 2023

#15620, which will be part of the next release, will skip fetching these repos for people who don't need them which will solve this.

For GitHub Actions, they have HOMEBREW_NO_INSTALL_FROM_API set by default so you'll either need to unset that yourself in your own workflows or use Homebrew/actions/setup-homebrew@master which has built-in retries (which won't guarantee it will avoid the issue but will reduce the chances).

We're continuing to work with GitHub directly to solve the root issue with those repositories.

@MikeMcQuaid
Copy link
Member

Thanks for working on and tolerating (sometimes negative) feedback on this FOSS.

Thanks for the kind words 🙇🏻

@yrashk
Copy link

yrashk commented Jul 4, 2023

Just for the record, it seems to have helped me to do the following:

brew untap -f homebrew/cask

(omnigres/omnigres#216)

@yrashk
Copy link

yrashk commented Jul 4, 2023

Looks like the problem is back.

@Bo98
Copy link
Member

Bo98 commented Jul 4, 2023

We're still speaking to GitHub about it. I believe the "bad pack header" error has now been replaced a different error, so there is some progress there.

We're also speaking about how GitHub Actions is handled - we're aware that GitHub Actions is impacted more in ways that you typically aren't on your own machines.

My recommendation for GitHub Actions is to either (your choice which):

  • Use this action that has built in retries. I can't guarantee that will be 100% perfect as the nature of the problem could mean that it worsens until the root cause is found, but it's been quite stable today.
      - name: Set up Homebrew
        uses: Homebrew/actions/setup-homebrew@master
        with:
          cask: false # remove this if you need `brew install --cask`
          test-bot: false # remove this if you need `brew test-bot`
  • Unset HOMEBREW_NO_INSTALL_FROM_API and then run brew untap homebrew/core homebrew/cask && brew update.

@github-actions github-actions bot added the outdated PR was locked due to age label Aug 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

6 participants