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

Error Message when logging in via Session Manager #3789

Closed
3 tasks done
s-mustafa-rashid opened this issue Aug 22, 2023 · 2 comments
Closed
3 tasks done

Error Message when logging in via Session Manager #3789

s-mustafa-rashid opened this issue Aug 22, 2023 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author Feedback

Comments

@s-mustafa-rashid
Copy link

s-mustafa-rashid commented Aug 22, 2023

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

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: 5.1.20348.1850
OS: Microsoft Windows 10.0.20348
Last 0 Keys

Exception

System.UnauthorizedAccessException: Access to the path 'PSReadLineHistoryFile_1679151030' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(Boolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTES secAttrs)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name, Boolean& createdNew, MutexSecurity mutexSecurity)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at Microsoft.PowerShell.PSConsoleReadLine.DelayedOneTimeInitialize()
   at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Screenshot

N/A

Environment data

Get-CimInstance : Access denied
At line:6 char:18
+ ...        $p = Get-CimInstance -ClassName Win32_Process -Filter "Process ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [Get-CimInstance], CimException
    + FullyQualifiedErrorId : HRESULT 0x80041003,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand


PS Version: 5.1.20348.1850
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0
PSReadLine EditMode: Windows
OS: 10.0.20348.1 (WinBuild.160101.0800)
BufferWidth: 210
BufferHeight: 3000

Steps to reproduce

Logged into AWS instance via Session Manager

Expected behavior

Prompt

Actual behavior

Error message

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Aug 22, 2023
@StevenBucher98
Copy link
Collaborator

StevenBucher98 commented Aug 26, 2023

Looks like some kind of permission issue with the location of the file. I suggest trying to upgrade to the latest version 2.3.3 however we believe no changes were made since 2.0.0 with the mutex of this file so its likely some kind of permission issue on the machine you are using.

@StevenBucher98 StevenBucher98 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author Feedback and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Sep 25, 2023
@microsoft-github-policy-service
Copy link
Contributor

This issue is closed because it has been marked as requiring author feedback but has not had any activity for 7 days. If you think the issue is still relevant, please reopen and provide your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author Feedback
Projects
None yet
Development

No branches or pull requests

2 participants