Unable to view created pages

So, I’m just starting to look at the new Pages feature and I think I might have a configuration issue. I hope :slight_smile:

When I create a page, I get no errors, but after creating it there are no pages, just a icon with ‘No Data’ under it.

Looking at the pages folder in my repository, all the test names I created pages with have actually been created.

An excerpt from the log is here:

2021-10-01T08:26:46.5177160-03:00 0HMBVI1PTQ9PU:00000007 [INF] Request origin "http://localhost:5000" does not have permission to access the resource. (a03d560b)
2021-10-01T08:26:46.5193459-03:00 0HMBVI1PTQ9PU:00000007 [INF] Authorization was successful. (0d575a54)
2021-10-01T08:26:46.5193792-03:00 0HMBVI1PTQ9PU:00000007 [INF] Executing endpoint '"UniversalAutomation.PageController.Post (Universal.Server)"' (500cc934)
2021-10-01T08:26:46.5194640-03:00 0HMBVI1PTQ9PU:00000007 [INF] Route matched with "{action = \"Post\", controller = \"Page\"}". Executing controller action with signature "System.Threading.Tasks.Task`1[PowerShellUniversal.Page] Post()" on controller "UniversalAutomation.PageController" ("Universal.Server"). (122b2fdf)
2021-10-01T08:26:46.7562179-03:00 0HMBVI1PTQ9PU:00000007 [INF] Executing "ObjectResult", writing value of type '"PowerShellUniversal.Page"'. (605b4265)
2021-10-01T08:26:46.7566022-03:00 0HMBVI1PTQ9PU:00000007 [INF] Executed action "UniversalAutomation.PageController.Post (Universal.Server)" in 237.0576ms (afa2e885)
2021-10-01T08:26:46.7566429-03:00 0HMBVI1PTQ9PU:00000007 [INF] Executed endpoint '"UniversalAutomation.PageController.Post (Universal.Server)"' (99874f2b)
2021-10-01T08:26:46.7570027-03:00 0HMBVI1PTQ9PU:00000007 [INF] Request finished HTTP/1.1 POST http://localhost:5000/api/v1/page application/json;charset=UTF-8 70 - 200 - application/json;+charset=utf-8 250.2388ms (791a596a)
2021-10-01T08:26:46.7667586-03:00 0HMBVI1PTQ9PU:00000008 [INF] Request starting HTTP/1.1 GET http://localhost:5000/api/v1/page - - (ca22a1cb)
2021-10-01T08:26:46.7684385-03:00 0HMBVI1PTQ9PU:00000008 [INF] Executing endpoint '"UniversalAutomation.PageController.Get (Universal.Server)"' (500cc934)
2021-10-01T08:26:46.7685536-03:00 0HMBVI1PTQ9PU:00000008 [INF] Route matched with "{action = \"Get\", controller = \"Page\"}". Executing controller action with signature "Microsoft.AspNetCore.Mvc.IActionResult Get()" on controller "UniversalAutomation.PageController" ("Universal.Server"). (122b2fdf)
2021-10-01T08:26:46.7771665-03:00 0HMBVI1PTQ9PU:00000008 [INF] Executing ContentResult with HTTP Response ContentType of "application/json" (7ec2a4e9)
2021-10-01T08:26:46.7774474-03:00 0HMBVI1PTQ9PU:00000008 [INF] Executed action "UniversalAutomation.PageController.Get (Universal.Server)" in 8.7861ms (afa2e885)
2021-10-01T08:26:46.7775013-03:00 0HMBVI1PTQ9PU:00000008 [INF] Executed endpoint '"UniversalAutomation.PageController.Get (Universal.Server)"' (99874f2b)
2021-10-01T08:26:46.7776216-03:00 0HMBVI1PTQ9PU:00000008 [INF] Request finished HTTP/1.1 GET http://localhost:5000/api/v1/page - - - 200 - application/json 10.9116ms (791a596a)
2021-10-01T08:26:46.7990661-03:00 0HMBVI1PTQ9PU:00000009 [INF] Request starting HTTP/1.1 GET http://localhost:5000/api/v1/role - - (ca22a1cb)
2021-10-01T08:26:46.8010570-03:00 0HMBVI1PTQ9PU:00000009 [INF] Authorization failed. "These requirements were not met:

Product: PowerShell Universal
Version: 2.3.1

Very weird. Can you try turning on debug logging to see if you get any more info? It seems like the page configuration service isn’t loading up the pages for some reason and it’s weird that there are no errors.

Sure - I’ve sanitized and uploaded to pastebin.

Hope it helps.
debuglog - Pastebin.com

Have you had a chance to look at this? I’ve actually been able to use Pages in my dev environment without issue, running 2.4.2 but once they’ve been pulled into the master repo our production environment still can’t seem to display them, either in the list of pages or by navigating to the URL directly

I upgraded my dev and production environment and did a bit more testing with this today, and noticed something interesting.

If I disable authentication on the page in my dev environment, then pull that change into production the page is viewable by both the URL and the list of Pages is populated. If I toggle authentication back on, the page disappears immediately.

I still haven’t reproduced this but that is really interesting. Can you remind me of how you have this configured? Auth, hosting, git sync etc

Both our dev and production environments are configured in the same way.
-Windows Auth is enabled
-Universal runs as a service, with a service account
-2 way git sync configured on both environments, production on main branch, dev on dev branch with a gitignore file containing: licenses.ps1 and schedules.ps1

Multiple roles are defined in roles.ps1, all similar to this, some with multiple claims being checked, others just one.

New-PSURole -Name "All Managers and Director" -Policy {

    $AuthMethod = "WindowsAuth"

   if ($AuthMethod -eq "WindowsAuth")
       $SidsToCheck = @("S-1-5-21-3333333-33333381-333333-2343423457")
       foreach ($SID in $SidsToCheck)
           if ($User.HasClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid", $SID))
                "<TIME>" + (Get-Date) + ": Role check for $($User.Identity.Name) : 'All Managers and Director'. " | Out-File "C:\UniversalAuthLogs\Role-Evaluation.txt" -Append  

Thanks. I’m opening an issue to track this since I don’t want to lose it.

I’m not sure why this makes a difference, but I found if I connect to our production server and access the pages with the localhost address rather than the host name the pages load. This doesn’t help the people who would end up using the pages we create but it might help narrow down why it happens