Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to display website: #6

Closed
stubbsjuk opened this issue Nov 16, 2022 · 5 comments
Closed

Unable to display website: #6

stubbsjuk opened this issue Nov 16, 2022 · 5 comments

Comments

@stubbsjuk
Copy link

I am trying to display the following website. [](https://consultas.avanzagrupo.com/qr/malaga-13801
Here isart of my MM config: ipWhitelist shows the IP of my PI running MM 192.168.2.105
`let config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out or empty, is "localhost"
port: 8080,
basePath: "/", // The URL path where MagicMirror² is hosted. If you are using a Reverse proxy
// you must set the sub path here. basePath must end with a /
ipWhitelist: ["192.168.2.105","127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true

language: "en",
locale: "en-US",
logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
timeFormat: 24,
units: "metric",
zoom: 1.0,
// serverOnly:  true/false/"local" ,
// local for armv6l processors, default
//   starts serveronly and then starts chrome browser
// false, default for all NON-armv6l devices
// true, force serveronly mode, because you want to.. no UI on this device

ignoreXOriginHeader: true,
ignoreContentSecurityPolicy: true,

electronOptions: {
webPreferences: {
webviewTag: true,
}

},

modules: [

{

module: "MMM-EmbedURL",
position: "top_center",
header: "Embed-URL",
config: {
updateInterval: 120,
attributes: [
"frameborder=0",
],
embed: [
"https://consultas.avanzagrupo.com/qr/malaga-13801",
"https://magicmirror.builders/",
//~ "https://www.youtube.com/embed/dIHr96KqfDI"
]
},
},

No errors when running -> npm run config:check in MM folder
I do get the following errors
Screenshot 2022-11-16 at 16 16 06
<img width="365" alt="Screenshot 2022-11-16 at 16 15 43" src="https://use
Screenshot 2022-11-16 at 16 15 13
r-images.githubusercontent.com/1330110/202235991-76104a9a-7bd4-4534-8d6b-e330bb8e2dc7.png">

Can you help resolve?

Thank you & Best wishes.

@stubbsjuk
Copy link
Author

Screenshot 2022-11-16 at 16 15 43

@stubbsjuk
Copy link
Author

The "https://magicmirror.builders/", Website does show up. Just a blank for

@Tom-Hirschberger
Copy link
Owner

Tom-Hirschberger commented Nov 16, 2022

Hi and welcome...
I tried embedding the site in my test installation which results in a webpage that tells me that the site does not allow embedding.

There are some hints in the Readme about how to solve it.
If you use the build-in electron browser to display the mirror and do not access it with other browser you can simply change your config to use "webview" instead of "iframe".
I saw you already added the section in your config to enable webview in general.
So the only thing to do is to add embedElementType: "webview" to your module config.

		{
			module: "MMM-EmbedURL",
			position: "top_center",
			header: "Embed-URL",
			config: {
				updateInterval: 120,
                                embedElementType: "webview",
				attributes: [
					"frameborder=0",
				],
				embed: [
					"https://consultas.avanzagrupo.com/qr/malaga-13801",
					"https://magicmirror.builders/",
					//~ "https://www.youtube.com/embed/dIHr96KqfDI"
				]
			},
		},

@stubbsjuk
Copy link
Author

Thank you for your quick response.
"So the only thing to do is to add embedElementType: "webview" to your module config."

That did it.

Best wishes.

@Tom-Hirschberger
Copy link
Owner

Your welcome.
Perfect if it works.
I will close the ticket then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants