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

"The parameter is incorrect" on First Run #4095

Closed
Blizzardo1 opened this issue Jan 2, 2020 · 36 comments
Closed

"The parameter is incorrect" on First Run #4095

Blizzardo1 opened this issue Jan 2, 2020 · 36 comments
Assignees
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.

Comments

@Blizzardo1
Copy link

Blizzardo1 commented Jan 2, 2020

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.7.3451.0

Any other software? Not that I can think of to cause this application to crash.

Steps to reproduce

Install from Microsoft Store or download from Releases Tab.
Open Program

Expected behavior

First Run default profile loaded for configuring

Actual behavior

Upon opening program, the following error happens:

[C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.7.3451.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe]

C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.7.3451.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe

The parameter is incorrect.

This doesn't happen on my laptop which is weird. Other UWP(style) programs do run like the Camera App, Calculator, etc. It's just this particular program that doesn't like my copy of Windows.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jan 2, 2020
@zadjii-msft
Copy link
Member

@Blizzardo1 Any chance you're using the UTF-8 system code page?

image

The symptoms sound similar to #3039

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Jan 2, 2020
@Blizzardo1
Copy link
Author

image
It appears that I am not using that option.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 3, 2020
@zadjii-msft
Copy link
Member

Yikes, that's not what I was hoping for. @Blizzardo1 Could you try repro'ing this with the Feedback hub? That'll give us more detailed diagnostics (hopefully).

/feedback

@ghost
Copy link

ghost commented Jan 3, 2020

Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

image image

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 3, 2020
@zadjii-msft zadjii-msft removed the Needs-Attention The core contributors need to come back around and look at this ASAP. label Jan 3, 2020
@Blizzardo1
Copy link
Author

I had submitted a feedback request yesterday. Hopefully it landed safely :)

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 5, 2020
@DHowett-MSFT
Copy link
Contributor

Would you mind sharing a link to the feedback item you submitted using this button?

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jan 6, 2020
@Blizzardo1
Copy link
Author

https://aka.ms/AA6ysuq

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 9, 2020
@DHowett-MSFT DHowett-MSFT self-assigned this Jan 9, 2020
@sandreenko
Copy link

I have hit that today as well.

@horazius77
Copy link

same problem here

@DHowett-MSFT
Copy link
Contributor

And the both of you are also not using UTF-8 ACP?

@DHowett-MSFT DHowett-MSFT added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 31, 2020
@horazius77
Copy link

System: Windows 10 Enterprise 1903 (Build 18362.592)

Just upgraded Windows Terminal from 0.7.3382.0 to 0.8.10261.0 with chocolatey. Problem still exists.
And yes, I am not using UTF-8 (I have not checked: "Beta: Use Unicode...")

Removing and Reinstalling did not fix the problem. Thanks for looking into it.

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Feb 5, 2020
@ghost
Copy link

ghost commented Feb 5, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@sandreenko
Copy link

And the both of you are also not using UTF-8 ACP?

I do not.

@jr0dsgarage
Copy link

jr0dsgarage commented Apr 24, 2020

I also have run into this issue. The problem started after I enabled my Administrator account and switched over to use it. I wanted to use Terminal, so I installed it from the Store, thinking it would then entitle me to Launch. It seemed to re-install, and worked fine. When I switch back to the only User account on my PC, I run into the "The parameter is incorrect" error. Note: if I switch to my Administrator account, Terminal opens without any error. I have attempted a number of uninstall/re-install variations between the two accounts, but it seems no matter what I try, my Administrator account can open Terminal, and my User account cannot.

@0xrushi
Copy link

0xrushi commented Apr 26, 2020

I have only one account that too is Administrator, still it doesn't work.

@ryanprosser
Copy link

I too have been having this exact issue for months
Many release versions of WindowsTerminal, same error on launch
Tried app repair, reset, uninstall

Win AD joined machine
Domain user, who is member of Administrators group
Beta: Use unicode UTF-8 = NOT checked

Submitted feedback. Link is https://aka.ms/AA8a8hw

@DHowett DHowett assigned DHowett and unassigned DHowett-MSFT May 17, 2020
@DHowett
Copy link
Member

DHowett commented May 18, 2020

Unfortunately, we haven't really been able to reproduce this. Is it still happening for you folks?

@DHowett DHowett added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels May 18, 2020
@jr0dsgarage
Copy link

jr0dsgarage commented May 19, 2020

Still happening for me, but doesn't seem to be limited to only Windows Terminal. I installed Ubuntu 20.04 for WSL and get the same issue.

I found one 'solution' which is letting me use Terminal - that being to move the entire install folder out of the WindowsApps folder and into C:\Terminal (any other folder location works, and this fixes Ubuntu as well).

I was going to do a "Upgrade in Place" style repair, but couldn't select the choice to leave all of my programs and files in place, so I decided not to go any further. I saw reports from other forums that this solution worked.

I'm mostly just ignoring it for now, as I have the work-around, and I plan on re-formatting this PC once I purchase a new one later this summer.

@zhang919
Copy link

zhang919 commented May 19, 2020

Dear @DHowett
This seems to be a system-level problem. According to some information I have collected, its triggering cause is confusing. In some cases, some Intel drivers (such as Intel CAS) and even the DISM toolkit included with the system will activate this problem.
Best.

@DHowett
Copy link
Member

DHowett commented May 19, 2020

Thanks for the info. I unfortunately don't think there's anything we can do about it, but I'll leave you with two points.

  1. We're investigating other ways to deploy the terminal that may be less fragile - Investigate alternative deployment mechanisms for Windows Terminal #1386
  2. As @jkozeal found out, Terminal runs well outside the app package. We're not intending on breaking this, so if you unzip the msixbundle and the architecture-specific msix inside it you'll be able to get a durable (but not automatically upgrading) Terminal install.

@DHowett DHowett closed this as completed May 19, 2020
@DHowett DHowett added Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 19, 2020
@Joseph-See
Copy link

I had this same problem after going through updating WSL1 to WSL2. I had to redo that a couple times as I didn't reboot when I should have but eventually got it upgraded.

After that though this problem occurred and I can't open my newly downloaded Windows Terminal.

I ran "sfc /scannow" which found some corrupt files and fixed them. I could then open Windows Terminal.

However, after closing the terminal I get the same problem and "sfc /scannow" doesn't pick up anything.

I can run the Ubuntu and Kali apps just fine by clicking on the apps from the start menu. Windows Terminal would be really useful to use right now though.

@Blizzardo1
Copy link
Author

I reinstalled my workstation and to my amazement this issue no longer exists. I think my old instance had some anomaly with certain app packages, and Terminal was one of them. Funny, yet strange. Through these harsh times, I thank everyone that tried to help anyone who experienced this issue. May the 8-bit Gods carry the 1 to forever return SUCCESS.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Feb 28, 2021
@lino-man
Copy link

lino-man commented Feb 6, 2022

Fixed the problem moving terminal installation folder. Just change the directory like say %USERPROFILE%\Terminal folder and Voyla. It looks like a security issue in Program Files\WindowsApps directory. Another behavior is the icon that disappears from a shortcut created in desktop or toolbar. There is no need for running sfc /scannow. Sorry for my poor English. Cheers.

@LostOnTheLine
Copy link

I have this issue as well.

@lino-man
It looks like a security issue in Program Files\WindowsApps directory

I looked into this & discovered something strange. For some reason my C:\Program Files\WindowsApps folder has a strange Permission issue. I figure this may be the cause of the problem & maybe we could look into this & it might solve the problem...
Windows Terminal Permission Problem

For me the group Administrators had permissions set to only List folder contents & Users had no checkmarks on anything.
I went into the Advanced Security Settings & 1st issue was they differed from what was shown in the initial settings. Specifically Users had the permission settings Read & execute.

Windows Terminal Permission Problem Advanced
I also noted that it said the owner of the folder was my Admin & currently logged in user account, which seems to be not what I would expect it to be. & on another system that isn't having this problem the Owner was listed as TrustedInstaller. Also there as no specific permission for a specific user.
When I tried changing the Owner to TrustedInstaller it couldn't find that name. In Advanced I couldn't find it in the list either. This was the same on the other system where Terminal works without issue, so I think it's just that we cannot assign ownership to TrustedInstaller manually.

I'm going to try completely removing the folder, & let the OS recreate it, hopefully with the proper ownership & permissions. I'll post the results here when I finish

@zadjii-msft
Copy link
Member

I'm going to try completely removing the folder, & let the OS recreate it, hopefully with the proper ownership & permissions. I'll post the results here when I finish

WATCH OUT! I don't think the OS will recreate that! touching that could be VERY BAD

@LostOnTheLine
Copy link

WATCH OUT! I don't think the OS will recreate that! touching that could be VERY BAD

I'm already listsed as the owner of it, so the worse that could happen is that the OS does nothing, unlikely, & I copy it back, maybe that alone will fix the permission issues.

@LostOnTheLine
Copy link

LostOnTheLine commented Sep 14, 2022

Intereswting thing to note. Deleting the directory was not possible but the reason seems very odd. There were 4 font TTF files in the Windows Terminal folder that were said to be in use by the system. Restarting into safe made was still unable to because the same files were still In use.
I was able to delete them by using the Shift - Restart menu Troubleshooting > Command Prompt option. then using the rmdir /s to remove it.
After removing it I had the issue of the Windows Store, of course, no longer being able to open.
I'm attempting a Windows Update to see if it fixes this. I had done a manual Check for updates after it updated yesterday & it had none. But now it is installing the update 2022-09 Cumulative Update for Windows 10 Version 21H2 for x64-based Systems (KB5017308) which I just checked was installed previously. Here's hoping it will restore the store

@DHowett
Copy link
Member

DHowett commented Sep 14, 2022

I'm going to try completely removing the folder

These folders have special ACLs on them that aren't properly displayed by the UI or backed up by icacls. Deleting this folder or otherwise changing its permissions is unfortunately a one-way ticket to a broken install--even if you put it back where it was.

I lost an entire day trying to "fix" a broken WindowsApps directory, and that was with the help of the team who made it the way that it is. It's unfortunate.

@LostOnTheLine
Copy link

Deleting this folder or otherwise changing its permissions is unfortunately a one-way ticket to a broken install--even if you put it back where it was

Mine was already permission abnormal. I did notice that on my other system I cannot even open the folder with admin permissions. Putting it back everything except the Store is back, I will do a reset sometime later today or tomorrow & hopefully the Microsoft Store will come back, but as it is it's essentially back to the way it was before so not much has changed. The error it gives me when I try to run the store is about some DLL files not being found, so I'm hopeful that it will load them with a restart since one is in the Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__#####, Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x86__#####, Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__#####, & Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x86__##### folders so I have 4 copies of it (I don't like that it keeps 2 or more of a bunch of folders with different versions but whatever) & the other is in the Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__#####, Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x86__######, Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__#####, & Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x86__##### folders. So if it doesn't work I think reinstalling the .NET stuff should fix that. I just cannot do a reset yet to test it.

@LostOnTheLine
Copy link

I lost an entire day trying to "fix" a broken WindowsApps directory, and that was with the help of the team who made it the way that it is. It's unfortunate.

How did you get it fixed?

@zadjii-msft
Copy link
Member

I vaguely recall this thread: #13509 (comment)

@LostOnTheLine
Copy link

I've had many bad experiences with "In-Place Upgrades" so that's a last-ditch for me, but it's at least something if nothing else works. It sounds like, from that thread, that it's saying that having any sort of altered permissions will cause big problems, but mine were already like that... & I could even install other apps fine, but the terminal & other terminal apps like terminus & one other I tried but I can't remember would install but not start.

@LostOnTheLine
Copy link

So I was able to get everything back to the way it was before I moved the WindowsApps folder by using the PowerShell install method for the Windows Store App. Unfortunately it didn't work with the folder removed though so I had to manually put it back 1st & the folder still has weird permissions.
Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

Looking into things it seems like creating a new account may do the same to fix it as an in-place upgrade less destructively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-No-Repro We couldn't get this to happen, or it stopped happening entirely.
Projects
None yet
Development

No branches or pull requests