buo/homebrew-cask-upgrade

Error: undefined method `downcase' for nil:NilClass

Closed this issue · 3 comments

Hello,

Thanks for the great tool — been using it for years!

I'm using cask-upgrade on all of the machines in my household. I manage two of my family member's machines by ssh-ing into them and running brew cu -a -y --no-quarantine --include-mas to install updates. Everything works fine on the M1 MacBook Air but I get the following output on the M1 Mac mini:

==> Options
Include auto-update (-a): true
Include latest (-f): false
Include mac app store (--include-mas): true
==> Updating Homebrew
Already up-to-date.

Error: undefined method `downcase' for nil:NilClass
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:88:in `block in include_mas_applications'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:86:in `each'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:86:in `include_mas_applications'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:32:in `run_process'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:8:in `process'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:25:in `process'
/opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:75:in `<top (required)>'
/opt/homebrew/Library/Homebrew/extend/kernel.rb:10:in `require'
/opt/homebrew/Library/Homebrew/extend/kernel.rb:10:in `require?'
/opt/homebrew/Library/Homebrew/brew.rb:88:in `<main>'

If I run the same command in Mac Mini's terminal directly (rather than remotely) the command executes correctly without any errors.

What could be the issue? Would appreciate your help!

P. S. all machines have the latest Sonoma installed (14.2.1). Homebrew and cask-upgrade are up-to-date.

The issue seems to be with Mac App Store applications. Can you share the output of mas list output? Is there a difference between running it locally and remotely?

Since --include-mas is a bit "experimental", not sure how easily fixable that is.

Hi, you are right. When I exclude the --include-mas parameter from the command the update process succeeds.

It's interesting that when logged in via ssh, the output of the mas list is:
No installed apps found

Locally, however, mas list outputs:

1510445899  Meeter                (1.9.9)
896411742   Animal Typing - Lite  (3.22)
1446785996  Scratch 3             (3.29.1)
823766827   OneDrive              (23.221.1024)
1452453066  Hidden Bar            (1.8)
1543920362  Displaperture         (2.3)
462058435   Microsoft Excel       (16.80)
462054704   Microsoft Word        (16.80)
565963412   iSnow                 (3.0.7)
682658836   GarageBand            (10.4.10)
937984704   Amphetamine           (5.3.2)
462062816   Microsoft PowerPoint  (16.80)
1333542190  1Password 7           (7.9.11)

So, a mas problem indeed. Their repo has a few issues that seems similar...

I'll add a check so that it doesn't break so badly, but that's all we can do right now.