Open HJLebbink opened 1 year ago
I have Windows 11 and it doesn't work.
AsmDude2 Language Server Protocol (LSP) failed to activate. System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)
at System.Security.Principal.NTAccount.Translate(Type targetType)
at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)
at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule)
at AsmDude2.AsmLanguageClient.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Exactly the same for me.
Still no help from Microsoft on this, and I'm at a loss what can cause it. I can easily reproduce the issue on one of my development machines, wasted more than 30 hours on trying to fix it. I'm sorry, I'm only an assembly programmer... not an Windows 10 internals hacker...
Maybe this info helps you The user group "Everyone" doesn't exist on my German Windows 11. So if I create the new group "Everyone" and add the "Jeder" group into it the above exception will be no more thrown. Unfortunately the syntax highlighting still doesn't work ..
The thing is, these security and authentication details have changed between 10 and windows 11 (it seems), and nobody seems to care to figure this out for old windows versions.
Hi @HJLebbink,
today I had a little bit time to try out the solution using SecurityIdentifier instead of named groups for creating PipeAccessRule(s). It seems it works well (I also see the communication between VS 2022 and AsmDude2.LSP.exe) so I would just share my changes here. In the files
\repos\asm-dude\VS\CSHARP\asm-dude2-vsix\AsmLanguageClient.cs and \repos\asm-dude\VS\CSHARP\asm-dude2-ls\Worker.cs
create PipeAccessRule as follows:
SecurityIdentifier everyone = new SecurityIdentifier(WellKnownSidType.WorldSid, null); PipeAccessRule pipeAccessRule = new(everyone, PipeAccessRights.ReadWrite, System.Security.AccessControl.AccessControlType.Allow);
I had trouble with the preview version of the MS LanguageServer packages so I made my changes based on
https://github.com/HJLebbink/asm-dude/commit/2b897a0fac8afda4f27f5612bc228e5a3e43d41
Regards from Stuttgart
Thank you for your time; I'll look at it tonight straight away.
@MickeyNT, thanx this seems to have fixed the issue for my windows 10 setup, i hope this will also fix it for those other users out there. Great thanx! See https://github.com/HJLebbink/asm-dude/releases/tag/v2.0.1.0
It works!
It works!
That is good news! TY for the update.
Unfortunately still having this issue on 21H2 (19044). This error always comes up after a couple of minutes. I'll install a 22H2 VM tomorrow and see if it works there.
@lstrsrt Please let me know if you keep having issues, or when you have solved this. I would like to understand what causes these issues.
It's also not working for me on Windows 10 Pro 22H2 OS build: 19045.3996. I'm not sure how to provide anything that could help narrow it down or fix it myself. I get the same message as lstrsrt along with this pop up in the bottom left.
@HJLebbink I noticed that the highlighting settings work for everything except the registers. If I edit the colors or enable the italicization for the regiters, I'll get an LSP failed to activate error, but mine is because the path to AsmDude's LSP.exe was denied.
I've ran VS Studio as an admin and even installed via the Github installer but the errors are the same. It seems to be inconsistent for me because it'll work randomly on different W10 machines while others give the error.
@Kule02
It's also not working for me on Windows 10 Pro 22H2 OS build: 19045.3996. I'm not sure how to provide anything that could help narrow it down or fix it myself. I get the same message as lstrsrt along with this pop up in the bottom left.
I didn't keep track of the windows versions that did not work for me (which would have been useful to understand the cause), but my working setup currently has 19045.4046. It must be some optional component that fixes or breaks this. Thus, you have the LSP running but connection to it times out?
@bastiel I think the error "LSP failed to activate" is because the LSP could not start. You say that it works on some W10 boxes but not on others, On the machines that it does not work, is the LSP running, if not, is it even installed?
Everybody thanx for helping out. This is a nice example of "Hidden Windows Costs..."
@HJLebbink I updated to 19045.4046 but still no luck. The syntax highlighting (mostly) works, like bastiel mentioned. I tried disabling the syntax highlighting to see if anything would happen and I got this error:
If I leave the extension to timeout, it displays these errors:
Hi, On my old PC I have the German Windows 10 Home / 22H2 19045.4046. I have just installed VS 2022 and the current version of AsmDude2. The syntax highlighting works but after some time the above error message will be displayed. I can help to solve the issue however I could not find the LSP version 17.8.9-preview. How can I download it? I would create a debug version and check the errors with it....
Chiming in. On version 2.0.1.0, I get syntax highlighting, but no help-on-hover or suggestions. After a few minutes I get the same "AsmDude2 Language Server Protocol (LSP) failed to activate. ..." error as reported above. Windows 11 Home 23H2 22631.3155. Happy to pull out any logs or perform troubleshooting requested.
edit: Partially resolved - this is a new installation and the LSP required the .NET 7 Desktop Runtime, which wasn't installed. @Kule02 's output log was the clue - I didn't get that message, but running that executable in a terminal window spat out the standard missing runtime error. Help-on-hover now works but still no code suggestions.
Still having this problem. Windows 10 22H2 19045.4123, VS Community 2022 (64-bit) 17.9.1, Asmdude2.v2-0-1-0 (By the way, why still 2.0.0.4 is the "latest" here while you can download 2.0.1.0 from the VS Marketplace?)
The same error as for @Kule02.
@bastiel I think the error "LSP failed to activate" is because the LSP could not start. You say that it works on some W10 boxes but not on others, On the machines that it does not work, is the LSP running, if not, is it even installed?
Sorry for the late reply @HJLebbink. I wasn't able to check this, but I installed .NET 7 Desktop Runtime like @Sudsey. The error no longer pops up, and some features like code folding and register highlighting even work now - but like @Sudsey, code completion doesn't work.
Initially, after install .NET 7, everything but the code completion and register highlighting didn't work. I changed Assembly Flavour to "Auto Detect" from Intel MASM, and the register highlighting works now. But as previously mentioned, code completion does not.
I installed .NET 9 Desktop and still getting the LSP failure. The MASM highlighting is working if I select both choices to MASM since I am writing that code x86-64.
Is there a way to turn off the LSP so I just get the syntax highlight (for MASM)??
If you know how to turn off the constant LSP failure pop ups I would like to know that, thanks!
I am having a similar issue. The text is a bit different but it is also about LSP.
Windows 10 22H2 19045.4412. Visual Studio Community 2022 17.9.7. AsmDude2 2.0.1.0.
Is anyone still having this issue with W11? Just downloaded VS for a class and was trying to make ASMDude work per the class instructions, and it did for a minute, then gave me the long LSP failed to activate error everyone else has posted before. Thanks!
I haven't tried the latest updates from ms in the last half year. Maybe things got better. I'll give this horror story another try.
On Sun, 29 Sept 2024, 11:01 Drew Cochran, @.***> wrote:
Is anyone still having this issue with W11? Just downloaded VS for a class and was trying to make ASMDude work per the class instructions, and it did for a minute, then gave me the long LSP failed to activate error everyone else has posted before. Thanks!
— Reply to this email directly, view it on GitHub https://github.com/HJLebbink/asm-dude/issues/146#issuecomment-2381271637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT2ERLHKUYYOSLHOXVWJHJTZY66XHAVCNFSM6AAAAAA5NWBM4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGI3TCNRTG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Known issue: AsmDude2 communicates with the LSP with pipes (https://learn.microsoft.com/en-us/windows/win32/ipc/pipes), this works nicely on all windows 11 machines I could my hands on. On the one Windows 10 machine I still have, whatever I try, I keep hitting the following issue.
If anyone knows a solution, do let me know!