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

Another exception (Sequence contains no matching element) #12

Closed
RAB70 opened this issue Jul 25, 2023 · 4 comments
Closed

Another exception (Sequence contains no matching element) #12

RAB70 opened this issue Jul 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@RAB70
Copy link

RAB70 commented Jul 25, 2023

Hi Seji,
thanks for the new build. but I got another error.
Depending on the settings:
"LAPS": {
"ForceVersion": "v2",
"EncryptionDisabled": true
},
I get different errors. When I set ForceVersion to null or "v2" I get the exception below. If I take v1 and set EncryptionDisabled to false, I get the message that I have no rights. The LAPS password is stored in the msLAPS-Password attribute. Do you have another idea?
Thanks
RAB
17:36:18 WRN] Unhandled exception rendering component: Sequence contains no matching element
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at LAPS_WebUI.Pages.LAPS.<>c__DisplayClass25_2.b__22(RenderTreeBuilder __builder8)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at MudBlazor.MudTabPanel.BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[17:36:18 ERR] Unhandled exception in circuit 'qe_JNt3Nq8dkrM0IsX8sFazZcvDfxIPBqIL8CKNks10'.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
at LAPS_WebUI.Pages.LAPS.<>c__DisplayClass25_2.b__22(RenderTreeBuilder __builder8)
at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
at MudBlazor.MudTabPanel.BuildRenderTree(RenderTreeBuilder __builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[17:36:18 WRN] Unhandled exception rendering component: Cannot access a disposed object.
System.ObjectDisposedException: Cannot access a disposed object.
at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder1.GrowBuffer(Int32 desiredCapacity) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() [17:36:18 ERR] Unhandled exception in circuit 'qe_JNt3Nq8dkrM0IsX8sFazZcvDfxIPBqIL8CKNks10'. System.ObjectDisposedException: Cannot access a disposed object. at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder1.GrowBuffer(Int32 desiredCapacity)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
[17:36:18 INF] Executed endpoint '/_blazor'

@Seji64 Seji64 added the bug Something isn't working label Jul 26, 2023
@Seji64 Seji64 closed this as completed in bea9cad Jul 26, 2023
@Seji64
Copy link
Owner

Seji64 commented Jul 26, 2023

Please note that the LAPS ForceVersion enum changed and therefore null is not longer allowed.
Check the appsettings.json for the current values

@RAB70
Copy link
Author

RAB70 commented Jul 26, 2023

Hi Seji,
I re-read and looked at your sources. In my case, the LAPS password is in plain text in the msLAPS-password attribute in the format
{"n":"LAPS admin","t":"1d9b97cb2bd3135","p":"LAPS password"}
All other laps attributes are empty. So I try the settings like this:
"LAPS": {
"ForceVersion": "v2", // Allowed Values: All, v1, v2 | Default: All (v1 & v2)
"EncryptionDisabled": true // Allowed Values: true, false | Default: false
},
In the source code I read that the attribute is also read in the TRY block for v2 (variable ldapValue ).
Unfortunately, I then get the error above.
In all other combinations of the LAPS settings, I get the message that I have no rights or that LAPS is not used, which is also logical, all other LAPS attributes are empty.
Do you have another tip?
Thanks
RAB

@Seji64
Copy link
Owner

Seji64 commented Jul 27, 2023

Tried your configuration with encryption disabled => works
image

sees to be something with your enviroment - sorry.

@RAB70
Copy link
Author

RAB70 commented Jul 27, 2023

Seji, you are the GOAT! Thank you.
With your new release it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants