For seemingly no reason whatsoever, I will randomly receive an error message on the dashboard stating that ‘New-GUID’ is not recognized as the name of a valid cmdlet. I really wish I could provide more context for this issue, but unfortunately the log is no help here. All I get is a warning message that a certain element could not be found. I’m unsure if that relates to some other issue though. I also added the containing module for
New-GUID into the endpoint initialization on the dashboard.
Has anyone else ever ran into this issue?
A screenshot of what I’m seeing:
Which enviornment are you running your UD on?
I’m currently running 2.5.2 and it’s hosted via Azure App Service on a single B3 node
Asuming you’re not using the command yourself, rather UD is thowing this error.
What are you doing while this happens? Can you replicate the error in a dev environment?
What is currently on the page you’re getting the error? Any Grids or Tables etc?
Yeah, I’m definitely not using
New-GUID anywhere in my actual code, so it must be something internal to UD.
I unfortunately can’t consistently replicate the errors. It seems to happen more often when first login to the dashboard (we’re using Azure AD authentication), but sometimes it will just occur during normal use.
This seems to only affect the home page and one dynamic page. The dynamic page is made up of a ton of controls, but the home page is essentially just a collapsible, 3 Selects, 1 button, and a grid (with roughly 1200 rows). I apologize for being so vague, but I’m really at a bit of a loss.
Thanks for taking time to look at this!
Most of UD uses “new-guid” as ID for components unless spesifically specified other “-id”.
Are you using any custom modules that might interfere?
Did you make any custom changes to the UD components?
Try to delete the whole UD module, and redownload it and see if that helps.
Either that or…
A dirty, dirty, probably-not-even-working, workaround: add the actual function to the endpointinit.
Man, that’s really weird. We could change UD to use [Guid]::NewGuid() to get around this but that’s baffling that a built in function is reporting that it’s not defined. You could try to do what @BoSen29 suggested and maybe add the function to New-UDEndpointInitialization so you don’t have to add it to every endpoint. I’ll write an issue to get rid of New-Guid due to this issue. Should just be a find\replace in the UD source.
Hi @adam and @BoSen29,
I’m sorry for my late reply. It’s been a long week. This whole issue completely baffles me as well, specifically the fact that it’s behavior is so inconsistent. However, after manually including the
New-Guid function in the
New-UDEndpointInitialization param on the
New-UDDashboard cmdlet as @BoSen29 suggested, I’ve not seen the error again. I’m a bit unsure as to why exactly this works, yet Powershell can’t seem to find the cmdlet in it’s own built-in functions, but I digress.
Thus far everything seems just fine. Thank you both for your help!