-
Notifications
You must be signed in to change notification settings - Fork 298
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
Mutex constructor fails with "system cannot open the device or file specified" #1464
Comments
Context: I was testing Pester v5, and this error threw: PS /Users/stephanevg/Code/PSHTML> $e = invoke-pester -Path ./link.tests.ps1 -CI
Get-Item: /Users/stephanevg/.local/share/powershell/Modules/Pester/5.0.0/Pester.psm1:793
Line |
793 | $i = Get-Item $p
| ~~~~~~~~~~~
| Cannot find path '/Users/stephanevg/Code/PSHTML/link.tests.ps1' because it does not exist.
System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at Invoke-Pester<End>, /Users/stephanevg/.local/share/powershell/Modules/Pester/5.0.0/Pester.psm1: line 798
at <ScriptBlock>, <No file>: line 1
bash-3.2$ pwsh
PowerShell 7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
PS /Users/stephanevg/Code/ansible-lab/Roles>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new |
It makes me sad to see this happen on PSReadLine 2.0.0 |
Hi @daxian-dbw This was also while testing a early release of Pester v5 (RC1 to be precise). |
Did Pester crash before you get the PSRL exception? |
Got a report on the same issue by @FiggyRoll:
|
Just for some extra info: Tried the latest beta version of PSReadline today but the issue still persists |
@FiggyRoll It sounds this issue happens consistently in your environment (is it?). Could you please do the following to collect some diagnosis information?
|
Hi @daxian-dbw Thanks for the reply, I really appreciate you taking the time to look into this. Going through the steps and found an issue on step 1, which might be the cause of the problems? There is no /tmp/.dotnet directory on my mac. (/tmp is mapped to private/tmp) Ive tried step 3 as well just to see what errors I am given and can confirm that PS does load correctly using MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "The system cannot open the device or file specified. : 'MyM'" Just for completeness I also attempted the command that PSReadLine does and get the following:
MethodInvocationException: Exception calling ".ctor" with "2" argument(s): "The system cannot open the device or file specified. : 'PSReadLineHistoryFile_3946503603'" |
Maybe reference on a commit in dotnet/roslyn#28529 helps. |
@FiggyRoll Thanks for providing the additional info! |
@daxian-dbw I think you have found the issue! I checked the permissions on Did some quick googling just to make sure that the normal permissions should be 1777, couldn't find anything definitive but the general consensus seems to be that is correct. So not sure why the permissions on mine would have changed (had issues with brew a while ago so possibly when fixing that) Anyway, Thanks for your help with this, much appreciated. |
More user friendly error message will be great to have. |
@FiggyRoll Thanks for the confirmation. That's great.
Agreed. Opened dotnet/runtime#36823. Hopefully dotnet team can improve the error message. |
Please keep closed, this is for others landing here. This error message is also thrown when
If How you then go about cleaning it depends on your use case. To remove any file that's older than 10 days:
Apologies for pinging this thread, it's the top result in Google for the error as a search term. |
Hi, Just beeing a good citizen, and doing as the console is asking me to do:
bash-3.2$ pwsh
PowerShell 7.0.0
Copyright (c) Microsoft Corporation. All rights reserved.
https://aka.ms/powershell
Type 'help' to get help.
PS /Users/stephanevg/Code/ansible-lab/Roles>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
Environment
PSReadLine: 2.0.0
PowerShell: 7.0.0
OS: Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Exception
The text was updated successfully, but these errors were encountered: