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

Issue: "Error: Unable to connect to the elevated service." when using Admin By Request Tool from Windows Terminal #141

Closed
JensGJ opened this issue Jun 23, 2022 · 9 comments

Comments

@JensGJ
Copy link

JensGJ commented Jun 23, 2022

Issue Description

Gsudo works perfect both with Windows PowerShell (5.1.19041.1682) and PowerShell Core (7.2.5) - as long as they are running in their own windows. When running either of them through Windows Terminal, I get the error Unable to connect to the elevated service

Steps to Reproduce

  1. Open Windows Terminal with either PowerShell 7 or PowerShell 5
  2. Run gsudo
  3. Error occurs

Screenshots

image
image
image

Context:

  • Windows version: 10 (21H2, 19044.1766)
  • gsudo version: gsudo v1.3.0 (Branch.master.Sha.24fb735f547e1e5dd7aa22fdd77777fa8c923a1c)
  • We are using the Admin By Request Tool from FastTrack Software (https://www.adminbyrequest.com/).
    Opening for admin access in that tool before running gsudo does not make a difference (and outside Windows Terminal gsudo also works fine without the need for requesting admin access from Admin By Request).
@gerardog gerardog changed the title Issue: "Error: Unable to connect to the elevated service." when running gsudo from Windows Terminal Issue: "Error: Unable to connect to the elevated service." when using Admin By Request Tool from Windows Terminal Jun 23, 2022
@gerardog
Copy link
Owner

Hi,
I was able to reproduce this issue after installing Admin By Request Tool.
What I see is that when gsudo is run from WT, the Api call to System.Diagnostics.Process.Start does not returns after the elevated process is created. Instead, it waits until that process has ended. I believe this is a bug in Admin By Request Tool, not gsudo.
Let´s see how we can report this problem to them so we can work it out together.

@gerardog
Copy link
Owner

Tried to create a ticket to FastTrack Software, but unfortunately The free plan does not include support.
Do you have a paid plan?

@gerardog
Copy link
Owner

I was able to reproduce the problem taking gsudo out of the equation. So, this is caused by AdminByRequest, and not gsudo.

Please take a look at the screenshot. You will see that if you do Start-Process cmd.exe -Verb RunAs from PowerShell in a regular console, the new CMD stays open, while your original PowerShell console returns your control to you. If you do the same from a Windows Terminal, that PowerShell will hang until the new CMD is closed (it shouldn't).

Screenshot 2022-06-23 202718

I tweeted to @AdminByRequest. Let's hope they get the bug report.

@JensGJ
Copy link
Author

JensGJ commented Jun 24, 2022

Thanks a lot. I've forwarded the case to our support department - they should be able to make a ticket at AdminByRequest.
I've replicated your test and get the same result here - e.g. the issue is not related to gsudo.

@gerardog
Copy link
Owner

Just came here to rant about what a terrible uninstall experience that tool provides. It refuses to uninstall and provides no instructions. Also f*** up my user and removed admin rights from it, without even warning me. I just had a secondary admin account by chance, otherwise would have to hack myself to recover my machine.

I'm closing this issue since it is an external problem.

@JensGJ
Copy link
Author

JensGJ commented Oct 11, 2022 via email

@gerardog
Copy link
Owner

gerardog commented Mar 5, 2024

Hi @JensGJ, did you had any luck reporting this to ABR? what was their response?

@JensGJ
Copy link
Author

JensGJ commented Mar 6, 2024 via email

@gerardog
Copy link
Owner

gerardog commented Mar 6, 2024

Thank you so much for your response Jens.

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

No branches or pull requests

2 participants