V5.0.5: defining function in App Page results in endless save loop

Trying my first steps in Powershell Universal I wanted to define a function in an App Page. As it didn’t work out in my ‘production page’ at all I tried a simple test page with a simple function. Trying to save this page will result in showing the ‘saving’ animation endlessly. Is something wrong with my code or is this a known problem?

function lCase($str) {
    $str.ToLower()
}

lCase 'Hello, World'

Product: PowerShell Universal
Version: 5.0.5

1 Like

I noticed an “endless save” as well, but wasn’t able to reproduce it on purpose, so I did not mention it here yet…
But there seems to be an issue.

Right after writing up this issue I noticed that 5.0.6 was released so I upgraded to see if this would change things. It did in fact for my test page but on the original page the same problem still persists. And your statement about non-reproducibilty adds to my impression that this seems to happen without any clear indication of the root cause.

This problem persists after upgrading to 5.0.7: Sometimes editing and saving Page code works but other times even trivial ‘force to save’ edits like adding and removing a single blank to a code line result in the save process never to finish.

what environment are you running on? that could help us try to track down any configuration issues and point you in the right direction :grin:

Thanks for your suggestion, I’d love this to be simply a configuration/environment issue. My PSU environment is currently a vSphere VM under Windows 2019 Server (Datacenter) configured with 16 Cores and 16 GB RAM. Are there any other details needed or kind of a template I should fill out to provide more information?
As this might be a configuration issue, should I try a fresh installation on a clean, new VM for comparison? This VM is being used for other tasks/software as well)…

Good start - specifically, what installer did you use? Is this an MSI install or running on IIS (or another reverse proxy, if it applies)? It sounds to me, not the person who developed the software, like a potential permissions issue on the directory where the repository files are located, and the steps for confirming that are different per environment.

I was installing using Powershell Install-Module Universal … Install-PSUServer.
Tried the same this morning on a freshly deployed Windows 2019 VM and ran into the same problems after a minimal setup.
Is the MSI install considered to be more robust?

Are you able to confirm file system permissions for the Repository? It doesn’t necessarily seem like it would cause this issue, so I would also test spinning up a separate VM with an MSI install instead to see if the issue persists on that instance. In my own limited time perusing the forums here it seems the module install is less common than the other install methods, so this may be a bug that doesn’t come up with other methods. All speculation at this point, though.

1 Like