All pages disappear

Product: PowerShell Universal
Version: 2.7.0

When a new page is created, all pages disappear from the GUI and the URLs stop working for the pages that where there. If I remove the XML for the new page from C:\ProgramData\UniversalAutomation\Repository\pages, the page will load again.


Mike

Thanks for the report. Checking it out.

I haven’t been able to reproduce this locally. Can you check in the log to see what the 500 error that is being reported is? Can you also share the options you set for that page?

image

Send you the last log in email.
Mike

1 Like

The error from the log appears to have to do with access controls and roles from the page (which none are assigned). I’m still investigating as I still haven’t reproduced myself. I have a 2.6.2 lab I’ve updated to 2.7 and my pages work when I add a new page.

Do you have roles assigned to your existing pages?

We do, so removing the xml the page works but i feel there is stuff in the database or somewhere else because the xml does not have much info in it.


Miike

Is there anyway you could share the XML files with me to see if I can reproduce that way? Feel free to email if you are ok with that.

There is really nothing in the file. Why i am thinking data has to be elsewhere.
Mike

<?xml version="1.0" encoding="UTF-8"?>

-<Page Url="test4" HideTitle="false" HideHeader="false" ShowNavigation="true" ShowInNavigation="true" Authenticated="false" Description="test4" Name="test4" Id="5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<AccessControls>None</AccessControls>

</Page>

I was more wondering about the other pages. That said, one thing you could try is to restart PSU and attempt to create the page. The page data is only stored in memory in the PSU service.

For sanities sake, could you also clear your browser cache? This hasn’t been a problem recently but I’m grasping a bit. If we’re still stuck, I think a Zoom call might help.

I am a Microsoft person, restart/ reboot is always the first thing you try right :slight_smile:

reset iis and still had same problem. Also rebooted the service with no effect.

I had someone else make a new page and they had the same outcome. The new page process goes though and does not error but when you refresh ( or click of pages and back on) you get the outcome of no pages listed.

Also these have been working for a bit. They are not new(created 12/21 and 12/29). And i have created and removed other pages since then.

I am more then happy to share whatever you need( will put place holders in for account names).
Please let me know if you need anything else.
Mike

Lockout-Location

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="2" Name="Lockout-Location" Description="Userd to see where someone got locked out" Authenticated="true" Icon="LockTwoTone" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="" Group="Service-Desk">
  <Roles>
    <string>Service-Desk</string>
    <string>Administrator</string>
  </Roles>
  <Components>
    <Form Id="6e4d718a-abca-4317-8c79-12050c1f7190" Title="lockout Information" Description="Checks where user was locked out" SaveButtonText="Submit" SaveButtonIcon="RightSquareTwoTone" ShowOutput="true" ShowProgress="true" ResultType="Table" CanReset="true">
      <Target Name="Functions\Get-AccountLockout-CA.ps1" Type="script" Environment="Windows PowerShell 5.1" RunAs="<ServiceAccountName">
        <Fields>
          <Field Name="LoginID" Tooltip="Enter users SamAccountName" Type="textbox" Required="true" />
        </Fields>
      </Target>
    </Form>
  </Components>
  <Layout>
    <Lg>
      <LayoutItem Id="6e4d718a-abca-4317-8c79-12050c1f7190" X="0" Y="0" W="50" H="26" />
    </Lg>
  </Layout>
  <AccessControls>All</AccessControls>
</Page>

MFA-Reset

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="4" Name="MFA-Reset" Description="Reset azure mfa for users" Authenticated="true" Icon="AlertTwoTone" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="" Group="Service-Desk">
  <Roles>
    <string>Administrator</string>
    <string>Service-Desk</string>
  </Roles>
  <Components>
    <Form Id="77e3be67-fd7b-48ba-a94c-242426d2fce1" Title="Reset MFA in Azure" Description="Used to reset MFA in azure" SaveButtonText="Reset MFA" SaveButtonIcon="CrownOutlined" ShowOutput="true" ShowProgress="true" ResultType="Text" CanReset="true">
      <Target Name="Functions\Reset-MFA.ps1" Type="script" Environment="Windows PowerShell 5.1">
        <Fields>
          <Field Name="UPN" Tooltip="Enter users email address" Help="UPN is the same as the users email address" Type="textbox" Required="true" />
        </Fields>
      </Target>
    </Form>
  </Components>
  <Layout>
    <Lg>
      <LayoutItem Id="77e3be67-fd7b-48ba-a94c-242426d2fce1" X="0" Y="0" W="20" H="9" />
    </Lg>
  </Layout>
  <AccessControls>All</AccessControls>
</Page>

Azure-sync

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="1" Name="Azure-Sync" Description="Used by the servicedesk" Authenticated="true" Icon="SyncOutlined" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="Azure-Sync" Group="Service-Desk">
  <Roles>
    <string>Service-Desk</string>
    <string>Administrator</string>
  </Roles>
  <Components>
    <Form Id="0fd47c21-a400-4efd-96ab-19c33b1e46d2" Title="Azure-sync from AD" Description="Forces data to sync from ad to azure" SaveButtonText="Start Sync" ShowOutput="true" ShowProgress="true" ResultType="Text" CanReset="true">
      <Target Name="Azure-Sync.ps1" Type="script" Environment="Windows PowerShell 5.1" RunAs="<ServiceAccountName>"
        <Fields />
      </Target>
    </Form>
  </Components>
  <Layout>
    <Lg>
      <LayoutItem Id="0fd47c21-a400-4efd-96ab-19c33b1e46d2" X="2" Y="0" W="32" H="22" />
    </Lg>
  </Layout>
  <AccessControls>All</AccessControls>
</Page>
1 Like

Thanks, Mike!

1 Like

More than happy to do a screen share. If available now i can send a team invite to you or whatever you want.
Mike

Ok found something interesting.
The xml for a new page is.

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="19" Name="test10" Description="test10" Authenticated="false" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="">
  <AccessControls>All</AccessControls>
</Page>

which makes the pages list show blank.
If I manually add data to the file like

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="19" Name="test10" Description="test10" Authenticated="false" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="">
<Roles>
    <string>Service-Desk</string>
    <string>Administrator</string>
  </Roles>
  <Components>
    <Form Id="0fd47c21-a400-4efd-96ab-19c33b1e46d2" Title="Azure-sync from AD" Description="Forces data to sync from ad to azure" SaveButtonText="Start Sync" ShowOutput="true" ShowProgress="true" ResultType="Text" CanReset="true">
      <Target Name="Azure-Sync.ps1" Type="script" Environment="Windows PowerShell 5.1" RunAs="account">
        <Fields />
      </Target>
    </Form>
  </Components>
  <Layout>
    <Lg>
      <LayoutItem Id="0fd47c21-a400-4efd-96ab-19c33b1e46d2" X="2" Y="0" W="32" H="22" />
    </Lg>
  </Layout>
  <AccessControls>All</AccessControls>
</Page>

Pages will now be listed.
Mike

Oh, that’s interesting. Being that the error is coming from the access control code, can you try to reduce it to this?

<?xml version="1.0" encoding="utf-8"?>
<Page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Id="19" Name="test10" Description="test10" Authenticated="false" ShowInNavigation="true" ShowNavigation="true" HideHeader="false" HideTitle="false" Url="">
<Roles>
    <string>Service-Desk</string>
    <string>Administrator</string>
  </Roles>
  <AccessControls>All</AccessControls>
</Page>

I’m made some tweaks around this code to make it a bit more resilient. I’m running a nightly build of 2.7.1 that should be posted shortly. I want to see if it changes your experience.

Reducing did not work. Pages does not load still.
Mike

Ok. Thanks.

Upgraded to 2.7.1 per our call and it seems to all work again. I can create pages and they all stay.
Thank you again for your time and support Adam!

Awesome! Thanks, Mike!