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

upgrade: Error: Download failed: An unexpected error occurred while moving files to the final destination. #483

Open
1 task done
brokosz opened this issue Nov 15, 2022 · 9 comments

Comments

@brokosz
Copy link

brokosz commented Nov 15, 2022

Your Environment

  • mas version: 1.8.6
  • macOS version (system_profiler SPSoftwareDataType -detailLevel mini): 13.0.1 (22A400)

mas Install Method

  • brew install mas (homebrew-core)
  • [] mas-cli/tap
  • [] .pkg installer from releases
  • [] Built from source
    • Fork/branch: ? (e.g. mas-cli/main)
    • Xcode version: 10.?

Describe the Bug

Error: Download failed: An unexpected error occurred while moving files to the final destination.

Consistently getting the above error when running mas upgrade. Started post-Ventura upgrade on my m1 mbp.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Terminal
  2. Run mas upgrade
  3. See error

Screenshots, Terminal Output

If applicable, add screenshots to help explain your problem.

$ mas upgrade
Upgrading 3 outdated applications:
TestFlight (3.2.2), Flighty (2.5.1), Prime Video (9.22)
==> Downloading TestFlight
==> Downloading Flighty – Fast Flight Tracker
==> Installed Flighty – Fast Flight Tracker
==> Downloading Amazon Prime Video
==> Installed Amazon Prime Video
Error: Download failed: An unexpected error occurred while moving files to the final destination.

Additional Context

It's strange that several apps will (re)install properly, but the final app on the list will get this. Doesn't matter if it's one app or four, whichever app is last will throw the above error.

Azd325 added a commit to Azd325/dotfiles that referenced this issue Apr 15, 2023
@isadon
Copy link

isadon commented Apr 18, 2023

Any update on how to fix this issue? Getting the same thing.

Azd325 added a commit to Azd325/dotfiles that referenced this issue Apr 19, 2023
Azd325 added a commit to Azd325/dotfiles that referenced this issue May 6, 2023
@YDA93
Copy link

YDA93 commented Jul 3, 2023

I have the bug with Testflight as well

1 similar comment
@scottpeterson
Copy link

I have the bug with Testflight as well

@mr-pinzhang
Copy link

mr-pinzhang commented Oct 12, 2023

got same issue for Testflight app.

❯ system_profiler SPSoftwareDataType -detailLevel mini
Software:

    System Software Overview:

      System Version: macOS 13.6 (22G120)
      Kernel Version: Darwin 22.6.0
      Time since boot: 1 day, 14 hours, 32 minutes


~
❯ mas version
1.8.6

@rgoldberg rgoldberg changed the title 🐛 [BUG] Error: Download failed: An unexpected error occurred while moving files to the final destination. Error: Download failed: An unexpected error occurred while moving files to the final destination. Sep 14, 2024
@rgoldberg rgoldberg changed the title Error: Download failed: An unexpected error occurred while moving files to the final destination. upgrade: Error: Download failed: An unexpected error occurred while moving files to the final destination. Sep 14, 2024
@rgoldberg
Copy link
Contributor

@brokosz @isadon @YDA93 @scottpeterson @mr-pinzhang Is anyone still experiencing this issue?

@brokosz
Copy link
Author

brokosz commented Sep 14, 2024 via email

@rgoldberg
Copy link
Contributor

@brokosz Thanks for helping.

You said that you had the problem for the last app in the list, but others mentioned that they had the problem specifically for TestFlight.

TestFlight was the first app in your list, not the last. The error was output after the other apps had successfully been installed.

Do you remember what led you to think it was the last app, not specifically TestFlight?

To investigate:

Start up the Mac or restart it if it is already on (trying to avoid transient fixes/issues for mas from possible prior mas usage in the same login session).

Don't run any mas commands other than those specified below before you've finished running the listed commands.

What is the output of the following commands? If everything upgrades fine for any mas upgrade, then you can skip subsequent mas upgrade commands.

Before you do this, if there are any additional steps you think should be done before, or interspersed with, these commands, please let me know. After you've run all the commands below, if you think that running any other mas commands might provide useful info, then you can go ahead and run them (some commands seem to resolve issues that other commands experience, so I'm trying to avoid the (unlikely) situation where a command fixes the problem before the outlined investigation is complete).

# verify mas version
mas version

# verify macOS version
system_profiler SPSoftwareDataType -detailLevel mini

# check permissions
ls -dlh /Applications/*.app

# list installed apps
mas list

# attempt to upgrade all apps
mas upgrade

# attempt to upgrade whatever apps failed in previous upgrade of all apps
mas upgrade

# list outdated apps
mas outdated

# attempt to upgrade apps after running mas outdated (that at times makes a difference)
mas upgrade

# list outdated apps again
mas outdated

# for each <app ID> from the prior outdated list, attempt to install it by itself (e.g., <app ID> = 899247664 for TestFlight)
mas upgrade <app ID>

# check permissions
ls -dlh /Applications/*.app

@brokosz
Copy link
Author

brokosz commented Sep 14, 2024 via email

@rgoldberg
Copy link
Contributor

@brokosz Thanks for the info.

Do you remember why you thought it was the last listed app, instead of TestFlight itself?

Knowing about that will help us solve this longterm.

If you ever experience this issue again, please let us know.

Hopefully, other reporters will reply, too.

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

No branches or pull requests

6 participants