MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    iFrame blank when displaing http://<ipaddress LMS server>:9000/material

    Scheduled Pinned Locked Moved Solved Troubleshooting
    27 Posts 3 Posters 2.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      stephanvdplas @stephanvdplas
      last edited by stephanvdplas

      @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

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @stephanvdplas
        last edited by

        @stephanvdplas now I am out of my knowledge range.

        @karsten13 maybe has more skill here…

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        karsten13K 1 Reply Last reply Reply Quote 0
        • karsten13K Offline
          karsten13 @sdetweil
          last edited by

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

          @karsten13 maybe has more skill here…

          sorry, no. Maybe google has some findings.

          karsten13K S 2 Replies Last reply Reply Quote 0
          • karsten13K Offline
            karsten13 @karsten13
            last edited by

            you could try adding

                    electronOptions: {
                            webPreferences: { webSecurity: false },
                    },
            

            in config.js

            1 Reply Last reply Reply Quote 0
            • S Offline
              stephanvdplas @karsten13
              last edited by

              @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.

              karsten13K 1 Reply Last reply Reply Quote 0
              • karsten13K Offline
                karsten13 @stephanvdplas
                last edited by

                @stephanvdplas

                I can only guess without having the debug case …

                You can google and try changing electronOptionsDefaults and/or electronSwitchesDefaults in js/electron.js if you find something …

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  stephanvdplas @karsten13
                  last edited by

                  @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.

                  karsten13K S 2 Replies Last reply Reply Quote 0
                  • karsten13K Offline
                    karsten13 @stephanvdplas
                    last edited by

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

                    I am quite sure about having the config right

                    sorry, my point is you have to google the error with the keyword “electron” and check if you find something which you can test

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      stephanvdplas @karsten13
                      last edited by

                      @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

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @stephanvdplas
                        last edited by

                        @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.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy