Dashboard display in IFRAME = One or more errors occurred Value cannot be null. (Parameter 'source')

Hi,

When displaying any dashboard from iframe from PowerShell Universal 3.8.8 i have a Javascript error :slight_smile:

One or more errors occurred
Value cannot be null. (Parameter ‘source’)

Note : It was working on PowershellUniversal 3.7.11. For the use → several dashboards from different sources including a PowerShellUniversal dashboard are displayed on a giant screen. To operate a rotation of the differents dashboards we use a raspberrypi with reveal.js which encapsulates all the dashboards in IFRAME

SomeBody have a way around this problem?

Product: PowerShell Universal
Version: 3.8.8

Just updated to 3.8.11 from 3.5 and am now experiencing the same thing. Would like to know how to resolve this as well

Upgraded from 3.7 to 3.8.12 and now 3.9.2 with same issue - using a dashboard as a tile in SquaredUp. Works fine when opening the pages directly in a browser.

One or more errors occurred

Value cannot be null. Parameter name: source

I have resorted to downgrading PSU to 3.7.14, this has solved the issue for now.

issue have been opened → Dashboard - IFRAME bug · Issue #2451 · ironmansoftware/issues (github.com)

I am currently on 3.8.12 and have no issue with an iframe being used as a page

$Pages += New-UDPage -Name 'Page' -Content {
    New-UDHtml -markup '<iframe src="https://URL.DOMAIN.COM" width="100%" height="1000" style="border:none;" title="Page"></iframe>'
} -NavigationLayout Permanent

you mistaken : iframe is for displaying the Dashboard, no bug for iframe in a Dashboard.

I may have misdefined the problem. You will understand the problem more easily by creating a simple index.html file containing the code below → then open index.html with any browser

<html>
  <header>
  </header>
  <body>
    <iframe src="https://demo.powershelluniversal.com/" style="width: 100%; height:100%;"></iframe>
  </body>
</html>

This will be resolved in 3.9.6. The problem was the cookie settings were not allowing sessions in iframes.

1 Like

Thanks a lot :smiley: solved !

I’m still seeing this issue on 3.9.6, no issues on 3.7.14, we are running Xibo Digital Signage to display our dashboards on TVs which are running Android TV, the Xibo app on the TVs uses native Android WebView.

This is still broken for us with 3.9.7, also confirmed it is broken in the Android TV emulator provided by the Android SDK, 3.7.14 works in both.

The problem seems to occur again in versions 3.9.8 and 4.0.2, it was working in version 3.9.6.

We had to make this optional because it was negatively affecting a lot of users. You can update appsettings.json with this value.

"Kestrel": {
  "CookiePolicy": "SameSiteNone"
},
1 Like

I just got back from holiday, and thought - “lets try out 4.0.9!” But alas, I suffer from the same issue - even when adding CookiePolicy to the appsettings.json in %ProgramFiles(x86)%\Universal

Edit: note that main site is not using SSL, I just added it to Universal as a test - ignore HTTPS section - it fails regardless.

{
  "Kestrel": {
    "Endpoints": {
      "HTTP": {
        "Url": "http://*:5000"
      },
      "HTTPS": {
        "Url": "https://*:5443",
        "Certificate": {
          "Thumbprint": "abcabc",
          "Store": "My",
          "Location": "LocalMachine",
          "AllowInvalid": "true"
        }
      }
    },
    "CookiePolicy": "SameSiteNone",
    "RedirectToHttps": "false",
    "UseHttpSys": "false",
    "BasePath": "",
    "Hsts": {
      "MaxAgeDays": 365
    }
  },

 ...

I am also experiencing this issue with our LG webOS-based displays. The dashboards load fine on a standard PC browser, but when we push a page via our IPTV system we get the ‘Value cannot be null. Parameter name: source’ error. It used to work fine, but we had upgraded PSU to resolve some other issues.

We are running 3.9.12. I have tried adding the CookiePolicy value to appsettings.json but it made no difference.

After attending CPHDevFest and attending a hacker workshop, I got some insight, but I am not an expert!

But digging through the logs and checking the headers, I can see that it fails to set the cookie, cause the ‘secure’ property is set, and I am not using https.

Doing some further “hacking”, changing the iframe property in SquaredUp from http to https and adding a proper certificate on my PSU dashboard - things are now up and working as expected.

In short - to use https on the page loading the iframe, and ensure that the iframe source is https also.

“Cookies that assert SameSite=None must also be marked as Secure.”