MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. stephanvdplas
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    S
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 4
    • Posts 36
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @sdetweil said in iFrame blank when displaing http://<ipaddress LMS server>:9000/material:

      finding a test environment will be the tough thing

      Off course I’m willing to help with that. Just PM if you need to test something or if I can help set up a test environment.

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @sdetweil said in iFrame blank when displaing http://<ipaddress LMS server>:9000/material:

      @stephanvdplas unrelated to your problem is your solution technique.

      we provide access to these settings in config.js so you DON’T edit our code, as this causes update problems.

      ok understood. But but both ways don’t work. Only thing that helps is reverting the installation of electron to 30.0.0.

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @karsten13 sorry to report that there is no other possibility than to revert back to electron 30.0.0
      After this, the iFrame works again. After re-installing 31.0.0, it is broken again.
      So no I have implemented this workaround.

      sudo npm install electron@30.0.0
      

      this command saved my life mirror

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @karsten13 I am quite sure about having the config right:

      	let electronSwitchesDefaults = ["autoplay-policy", "no-user-gesture-required"];
      	app.commandLine.appendSwitch(...new Set(electronSwitchesDefaults, config.electronSwitches));
      	let electronOptionsDefaults = {
      		width: electronSize.width,
      		height: electronSize.height,
      		icon: "mm2.png",
      		x: 0,
      		y: 0,
      		darkTheme: true,
      		webPreferences: {
      			contextIsolation: true,
      			nodeIntegration: false,
      			zoomFactor: config.zoom,
      			webSecurity: false
      		},
      		backgroundColor: "#000000"
      	};
      
      	// DEPRECATED: "kioskmode" backwards compatibility, to be removed
      	// settings these options directly instead provides cleaner interface
      	if (config.kioskmode) {
      		electronOptionsDefaults.kiosk = true;
      	} else {
      		electronOptionsDefaults.show = false;
      		electronOptionsDefaults.frame = false;
      		electronOptionsDefaults.transparent = true;
      		electronOptionsDefaults.hasShadow = false;
      		electronOptionsDefaults.fullscreen = true;
      	}
      
      	const electronOptions = Object.assign({}, electronOptionsDefaults, config.electronOptions);
      
      	// Create the browser window.
      	mainWindow = new BrowserWindow(electronOptions);
      
      

      So the webSecurity line is the only thing I added/changed.

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @karsten13 good option. I tried it (actually I placed the option directly in the electron.js script) but it doesn’t change the situation at all.

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @stephanvdplas There is another thing:

      In the preview tab of the content it shows: Failed to load response data: Connection is closed, can’t dispatch pending call to Network.getResponseBody

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @sdetweil said in iFrame blank when displaing http://<ipaddress LMS server>:9000/material:

      @stephanvdplas said in iFrame blank when displaing http://<ipaddress LMS server>:9000/material:

      Set-Cookie header didn’t specify a “SameSite” attribute and was defaulted to “SameSite=Lax”

      Ok, I don’t KNOW for certain, but our cors proxy might work there

      change the url in the iframe config to

      http://localhost:MM_PORT/cors?

      the rest like this

      // the url 
      url=http://www.test.com/path?param1=value1 // example
      // if there are headers, skip if not 
      &sendheaders=header1:value1,header2:value2&expectedheaders=header1,header2
      

      make sure quotes around the url string’’

      It doesn’t work. Now there are no errors, but it only shows an empty frame.
      a71fc225-e33a-4d2a-87c8-18801131aa13-image.png

      In the Preview tab, it shows {{snackbar.msg}}
      [24-09-18 22:33:38.8839] Slim::Utils::Misc::msg (1319) Warniing : [22:33:38.8838] “my” variable $mobile masks earlier declaration in same scope at (eval 5777) line 46.

      This warning is also seen in the debug log of LMS server, also when I open the 192.168.3.8/material on a browser on a windows machine (where the site is loading correctly).

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @stephanvdplas in the network tab I see errors:

      688928ea-1d2d-44ee-be59-069f0ae873ee-image.png
      This Set-Cookie header didn’t specify a “SameSite” attribute and was defaulted to “SameSite=Lax”, and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with “SameSite=None to enable cross-site usage.”

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @stephanvdplas no errors at all! Only a deprecation warning but it is about a different module .

      Please help me to further troubleshoot. All other web content I tried is working fine and the content I want to show is working fine when browsing the mirror in a different browser via http://<ip address mirror>:8080.

      So it must be some strange thing in electron or jsnode.

      posted in Troubleshooting
      S
      stephanvdplas
    • RE: iFrame blank when displaing http://<ipaddress LMS server>:9000/material

      @sdetweil ok I’ll have to attach a kb and mouse to the pi then. Will try this tonight.

      posted in Troubleshooting
      S
      stephanvdplas
    • 1 / 1