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

'brew bump-cask-pr' does not work on Casks in the -versions or -drivers repository #93010

Closed
core-code opened this issue Nov 18, 2020 · 25 comments
Labels

Comments

@core-code
Copy link
Contributor

the last stage fails in 'Error: Unable to fork: Not Found!'

brew bump-cask-pr --version '1.9.0.209' affinity-photo-beta
==> Downloading https://affinity-beta.s3.amazonaws.com/download/Affinity%20Photo%20Customer%20Beta.zip
######################################################################## 100.0%
Warning: Cannot verify integrity of 5f46b9a85f90a23b4bf2f5acca29f8b3ffc084dd3f4ec7a35b2bda6afa360600--Affinity Photo Customer Beta.zip
A checksum was not provided for this resource.
For your reference the SHA-256 is: dcb4de608a90e0e54ce74eaa6784e301329d531e0bb1f4eb23649676881bfbf8
==> replace "1.9.0.204" with "1.9.0.209"
==> replace "dcb4de608a90e0e54ce74eaa6784e301329d531e0bb1f4eb23649676881bfbf8" with "dcb4de608a90e0e54ce74eaa6784e301329d531e0bb1f4eb23649676881bfbf8"
audit for affinity-photo-beta: warning
 - Cask should have a description. Please add a `desc` stanza.

1 file inspected, no offenses detected
Error: Unable to fork: Not Found!
@core-code core-code changed the title brew bump-cask-pr does not work on Casks in the -versions or -drivers repository 'brew bump-cask-pr' does not work on Casks in the -versions or -drivers repository Nov 18, 2020
@miccal
Copy link
Member

miccal commented Nov 19, 2020

I cannot reproduce this, and I have been using brew bump-cask-pr from the beginning in all the Cask repositories.

Perhaps try brew untap homebrew/cask-versions and then tap it again with brew tap homebrew/cask-versions, and then try again.

@core-code
Copy link
Contributor Author

ok surprised to hear that, thought it was a known limitation. i have no problem using 'cask-repair' for those repositories.

thanks for the recommendation. did the un-tap, re-tap but still get the

Error: Unable to fork: Not Found!
error. what could i do to debug this?

@miccal
Copy link
Member

miccal commented Nov 20, 2020

Can you post your brew config?

@core-code
Copy link
Contributor Author

yes. otherwise it wouldn't work on the main repository, i guess...

@core-code
Copy link
Contributor Author

brew config
HOMEBREW_VERSION: 2.5.11-78-g6d850a9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6d850a97a190aec2381c952d802ad2cc1ea5d91c
Last commit: 15 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6244038f97e4b09d14263a8854067f41cc8ebc6d
Core tap last commit: 11 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_AUTO_UPDATE: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.24.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.271.09
macOS: 11.0.1-x86_64
CLT: N/A
Xcode: 12.2

@miccal
Copy link
Member

miccal commented Nov 20, 2020

Do you still have a separate GitHub token set up for hub from cask-repair? I am thinking that it is attempting to use the wrong token for the other repo's, as I had this issue.

Does running:

HOMEBREW_GITHUB_API_TOKEN={your token} brew bump-cask-pr --no-browse --version={version} {the non homebrew-cask Cask you want to upgrade}

make a difference?

@core-code
Copy link
Contributor Author

i tried doing it that way, but the 'Error: Unable to fork: Not Found!' error remained

just for paranoia to verify the token, i've also called it the same way directly passing the token but for the main repo. it still worked.

also, i just tried it on the drivers repository as it occurred to me i had really only tested the versions repo and just asumed the drivers repo isn't going to work either. but same error:


brew bump-cask-pr --force --version 4.20 jabra-direct
==> Downloading https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.dmg
######################################################################## 100.0%
Warning: Cannot verify integrity of 3977bd4f552534271ec9641a5229d1115e47ae7790abbba2dbc1fd84ceec2b67--JabraDirectSetup.dmg
A checksum was not provided for this resource.
For your reference the SHA-256 is: f592ec4f7a963d67f5641e0ef778f0a69132c209af3212dbdb518e85f55c4183
==> replace "4.14.15119" with "4.20"
==> replace "f592ec4f7a963d67f5641e0ef778f0a69132c209af3212dbdb518e85f55c4183" with "f592ec4f7a963d67f5641e0ef778f0a69132c209af3212dbdb518e85f55c4183"
audit for jabra-direct: passed

1 file inspected, no offenses detected
Error: Unable to fork: Not Found!

@miccal
Copy link
Member

miccal commented Nov 20, 2020

Ok, please post the output of:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask; git remote -v

and

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

@core-code
Copy link
Contributor Author

core-code commented Nov 20, 2020

Last login: Fri Nov 20 15:40:43 on ttys000
j@MacBook-Pro-16 ~ % cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask; git remote -v

core-code	git@github.com:core-code/homebrew-cask.git (fetch)
core-code	git@github.com:core-code/homebrew-cask.git (push)
origin	https://github.com/Homebrew/homebrew-cask (fetch)
origin	https://github.com/Homebrew/homebrew-cask (push)
j@MacBook-Pro-16 homebrew-cask % cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

origin	https://github.com/Homebrew/homebrew-cask-versions (fetch)
origin	https://github.com/Homebrew/homebrew-cask-versions (push)
j@MacBook-Pro-16 homebrew-cask-versions % 

@miccal
Copy link
Member

miccal commented Nov 20, 2020

There is the problem -- you have no remote branch set for homebrew-cask-versions.

Run:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote add core-code https://github.com/core-code/homebrew-cask-versions; git remote set-url core-code https://github.com/core-code/homebrew-cask-versions

then post the output of

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

again.

@core-code
Copy link
Contributor Author

thanks! this fixes the missing remote:


cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

core-code	https://github.com/core-code/homebrew-cask-versions (fetch)
core-code	https://github.com/core-code/homebrew-cask-versions (push)
origin	https://github.com/Homebrew/homebrew-cask-versions (fetch)
origin	https://github.com/Homebrew/homebrew-cask-versions (push)

interestingly the 'unable to fork' problem won't go away ... or is there anything else to do?

@miccal
Copy link
Member

miccal commented Nov 20, 2020

Please post the output of

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git config --list

WARNING: this may contain sensitive information -- review and replace if you like.

@core-code
Copy link
Contributor Author


credential.helper=osxkeychain
core.excludesfile=/Users/USERNAME/.gitignore_global
difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE"
difftool.sourcetree.path=
mergetool.sourcetree.cmd=/Applications/_Apps/Sourcetree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
mergetool.sourcetree.trustexitcode=true
user.name=NAME FAMILYNAME
user.email=EMAIL@corecode.io
commit.template=/Users/USERNAME/.stCommitMsg
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
core.autocrlf=false
remote.origin.url=https://github.com/Homebrew/homebrew-cask-versions
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
homebrew.private=false
remote.core-code.url=https://github.com/core-code/homebrew-cask-versions
remote.core-code.fetch=+refs/heads/*:refs/remotes/core-code/*

replacements done in UPPERCASE don't think they make a difference

@miccal
Copy link
Member

miccal commented Nov 20, 2020

Ok, there is only one more thing I can think of -- since it is working on homebrew-cask, lets change the remote branch for homebrew-cask-versions to follow the same style.

Run:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote add core-code git@github.com:core-code/homebrew-cask-versions.git; git remote set-url core-code git@github.com:core-code/homebrew-cask-versions.git

then post the output of

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

again.

@core-code
Copy link
Contributor Author

Run:

this failed:


cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote add core-code git@github.com:core-code/homebrew-cask-versions.git; git remote set-url core-code git@github.com:core-code/homebrew-cask-versions.git

fatal: remote core-code already exists.

@core-code
Copy link
Contributor Author

i wanted to try this on another Mac to see if this also occurs there but am unable even to send to the main repo currently:

=> replace #<Checksum:0x00007fead89852e0 @hash_type=:sha256, @hexdigest="dcb4de608a90e0e54ce74eaa6784e301329d531e0bb1f4eb23649676881bfbf8"> with "dcb4de608a90e
Error: wrong argument type Checksum (expected Regexp)
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:78:in `block in inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-cask-pr.rb:192:in `bump_cask_pr'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'

@miccal
Copy link
Member

miccal commented Nov 21, 2020

i wanted to try this on another Mac to see if this also occurs there but am unable even to send to the main repo currently:

=> replace #<Checksum:0x00007fead89852e0 @hash_type=:sha256, @hexdigest="dcb4de608a90e0e54ce74eaa6784e301329d531e0bb1f4eb23649676881bfbf8"> with "dcb4de608a90e
Error: wrong argument type Checksum (expected Regexp)
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/string_inreplace_extension.rb:36:in `gsub!'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:78:in `block in inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `each'
/usr/local/Homebrew/Library/Homebrew/utils/inreplace.rb:71:in `inreplace_pairs'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/bump-cask-pr.rb:192:in `bump_cask_pr'
/usr/local/Homebrew/Library/Homebrew/brew.rb:119:in `<main>'

Fixed in Homebrew/brew#9246.

@miccal
Copy link
Member

miccal commented Nov 21, 2020

Run:

this failed:


cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote add core-code git@github.com:core-code/homebrew-cask-versions.git; git remote set-url core-code git@github.com:core-code/homebrew-cask-versions.git

fatal: remote core-code already exists.

Please run:

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote remove core-code https://github.com/core-code/homebrew-cask-versions

then try #93010 (comment) again.

@core-code
Copy link
Contributor Author

Please run:

this didn't work because 'git remote remove' doesn't take the URL. i took the liberty of removing the URL to make it work. afterwards i ran the other two commands. the output is:


cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git remote -v

core-code	git@github.com:core-code/homebrew-cask-versions.git (fetch)
core-code	git@github.com:core-code/homebrew-cask-versions.git (push)
origin	https://github.com/Homebrew/homebrew-cask-versions (fetch)
origin	https://github.com/Homebrew/homebrew-cask-versions (push)

i can't tell you whether this has improved things so far because Homebrew/brew#9246 is not merged yet.

@miccal
Copy link
Member

miccal commented Nov 21, 2020

Homebrew/brew#9246 is merged now.

@core-code
Copy link
Contributor Author

unfortunately the same error remains. i've tried it on one other Mac and the issue doesn't occur there. since it seems to be just me i don't think we should spend too much time on this. in any case, many thanks for all your help though.

@miccal
Copy link
Member

miccal commented Nov 21, 2020

One last suggestion: check the output of

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask; git config --list

and

cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions; git config --list

and compare their differences -- that may indicate something worth investigating.

Sorry I was not able to solve this problem for you :(

@core-code
Copy link
Contributor Author

core-code commented Nov 21, 2020

there is one difference.
normal repo:
remote.origin.fetch=+refs/heads/master:refs/remotes/origin/master
versions repo:

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

Sorry I was not able to solve this problem for you :(

no problem, thanks for your help. the next reformat will cure it :)

@miccal
Copy link
Member

miccal commented Nov 21, 2020

there is one difference.
normal repo:
remote.origin.fetch=+refs/heads/master:refs/remotes/origin/master
versions repo:

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

Sorry I was not able to solve this problem for you :(

no problem, thanks for your help. the next reformat will cure it :)

For me they are both the same:

remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*

But unfortunately, the difference in your case is that it is in the repo that is working ...

@core-code
Copy link
Contributor Author

core-code commented Nov 23, 2020

ok, in case it might help others. i discovered the very same issue happened on my other Mac too (couldn't test this earlier because of some unrelated Ruby errors). so i figured it might be something with my forks.

i've deleted (and re-created!) my forks for the drivers and versions repositories (via GitHub web interface) and everything works now.

i have no idea why 'cask-repair' had no issue but 'brew bump-cask-pr' did.

in any case, sorry for the noise.

@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants