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

Uninstall failed with exit code: 2147747483 #202

Open
ghyujkilop opened this issue Feb 20, 2025 · 3 comments
Open

Uninstall failed with exit code: 2147747483 #202

ghyujkilop opened this issue Feb 20, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ghyujkilop
Copy link

ghyujkilop commented Feb 20, 2025

Describe the bug
OneDrive Removal Attempt that didn't proceed based on geographic region.

To Reproduce
Steps to reproduce the behavior:

  1. Open App Removal
  2. Select Microsoft.Onedrive
  3. This error log comes up:
    Attempting to remove Microsoft.OneDrive...
    The msstore source requires that you view the following agreements before using.
    Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
    The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
    Found Microsoft OneDrive [Microsoft.OneDrive]
    Starting package uninstall...
    Uninstall failed with exit code: 2147747483

Expected behavior
Uninstalls like all the rest.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
My assumption is that it was already removed (as I tried to uninstall it via apps). But also, my PC uses a non-US geographic code. Also, installed 99 other apps alongisde this, and there was no errors. I opened Microsoft Store, and there was no terms I could see that required me to agree to them.

@Raphire
Copy link
Owner

Raphire commented Feb 20, 2025

Heya,

The agreements should be automatically accepted when the script executes. The error code seems to suggest OneDrive is running and blocking removal, although I have personally also run into a situation where the uninstall seemed to error out, but it actually did succeed in the end.

Was OneDrive still installed after running the script?

@Raphire Raphire self-assigned this Feb 20, 2025
@Raphire Raphire added the bug Something isn't working label Feb 20, 2025
@ghyujkilop
Copy link
Author

Heya,

The agreements should be automatically accepted when the script executes. The error code seems to suggest OneDrive is running and blocking removal, although I have personally also run into a situation where the uninstall seemed to error out, but it actually did succeed in the end.

Was OneDrive still installed after running the script?

So I think it does have to do with the country code, because my country code uses UK/NZ. I believe I uninstalled OneDrive prior to running the script (this would have been manually from the installed apps settings). But I figured that, reporting this bug might be helpful for others who experience this code.

@Raphire
Copy link
Owner

Raphire commented Feb 28, 2025

Interesting, it's possible winget thought it was still installed, which would explain why the uninstall failed.

As for the country code. I don't think the country code matters in this error message. The 'US' in the output is only an example, I am from europe and have not had issues with it in the past.

Winget (which the script uses for OneDrive removal) will by default require user agreement to sending the 2 character country code. The output you see is part of that. Normally you'd get a prompt to accept this, but the script does this automatically. Additionally, if the execution failed on sending the country code it wouldn't proceed to the uninstall phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants