Read the statement by Michael Teeuw here.
Cannot get MMM-EmbedURL to show any sites
-
Rapsberry Pi 4, MagicMirror v2.29.0
I have a week-old install working for all modules except MMM-EmbedURL. I am trying to get two, local ip cams to display a feed over http. These feeds work fine in the Chromium desktop browser. Here’s an example of a URL:
http://10.0.0.51:50081/ui3.htm?t=live&cam=Doorbell&maximize=1
I have tried other URLs, including the examples, but nothing shows up, not even an error. This is the last module to load for me, and no errors are present for any module. There are not any other broadcasts or messages related to this module afterwards. The header used does appear, confirming the module is loaded.
[LOG] Connecting socket for: MMM-EmbedURL Sockets connected & modules started ...
In case there are any known issues with other modules, here’s a list of what’s installed and working, across 4 different pages with MMM-pages:
WallberryTheme WB-clock WB-weather MMM-CalendarExt3Journal alert updatenotification clock MMM-homeassistant-sensors MMM-CalDAV Pinfo calendar MMM-Pir MMM-MoonPhase MMM-NHL MMM-MyStandings MMM-EasyPix. MMM-BGSS_1 (copy/tweak of MMM-BackgroundSlideshow) MMM-GroveGestures MMM-NotificationTrigger MMM-EmbedURL
Here’s the top of my config.js, as well as the relevant module configuration:
let config = { electronOptions: { webPreferences: { webSecurity: false, webviewTag: true, }, fullscreen: true, alwaysOnTop: true, },
and
{ module: "MMM-EmbedURL", position: "upper_third", header: "Embed-URL", config: { updateInterval: 120, embedElementType: "webview", attributes: [ "frameborder=0", ], embed: [ "http://10.0.0.51:50081/ui3.htm?t=live&cam=Doorbell&maximize=1", "https://www.youtube.com/embed/dIHr96KqfDI", ] }, },
I’d appreciate any help on this, and let me know if there’s something else I can add or provide to resolve.
-
Just went back in and realized these were commented out in my config.
ignoreXOriginHeader: true, ignoreContentSecurityPolicy: true,
I added them back in, and success! Now to find a way to config the page to not need a login, but its huge progress. Thanks!
-
@unaccomplished can you look at the messages where you start MagicMirror
if you are using pm2, then
pm2 logs --lines=50may show them
typically I recommend NOT using pm2 when adding and changing modules as it makes access to the logs harder…
I see
[2024-12-03 16:48:09.041] [ERROR] (node:2137989) electron: Failed to load URL: https://www.cnn.com/?timestamp=1733266088 with error: ERR_BLOCKED_BY_RESPONSE (Use `electron --trace-warnings ...` to show where the warning was created) [2024-12-03 16:48:09.482] [ERROR] (node:2137989) electron: Failed to load URL: https://magicmirror.builders/?timestamp=1733266088 with error: ERR_BLOCKED_BY_RESPONSE
-
I put one of my MM web pages in the embed list and it also doesn’t show… altho the embed content is in the MM elements page view
and the page works correctly when viewed in a browser (the page is hosted by MM)never tried the module before
-
@unaccomplished
Hi,just tried your config in my setup and everything worked as expected.
The question is…where are the differences in your and mine setup.
As a first try you can replace
embedElementType: "webview,"
withembedElementType: "iframe,"
.If the embeded pages does not block embedding
iframe
should work and you do not weaken any security settings of the electron browser.Additionally you can replace
"frameborder=0",
with"frameborder=1",
. You should see two boxes at least then. Even if the sites could not be embedded.@sdetweil Are you sure you set the security settings of electron? Without them electron will not support
webview
and will not display anything. -
@wishmaster270 said in Cannot get MMM-EmbedURL to show any sites:
Are you sure you set the security settings of electron?
no… I viewed that as optional if doing webview…(electron javascript content) but I am viewing an html page. (altho hosted by MM)
If do use the build in electron browser to view the mirror you can use Webview instead
my config
{ module: "MMM-EmbedURL", position: "top_left", header: "Embed-URL", config: { updateInterval: 120, attributes: [ "frameborder=0", ], embed: [ "http://localhost:8090/modules/MMM-Config/review/", "https://cnn.com" ] }, },
-
@sdetweil said in Cannot get MMM-EmbedURL to show any sites:
@unaccomplished can you look at the messages where you start MagicMirror
pm2 logs --lines=50It seems this is the most relevant error in the log:
/home/MagicMirrorPi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT
Here are my error logs:
/home/MagicMirrorPi/.pm2/logs/MagicMirror-error.log last 50 lines: 0|MagicMir | [2100:1204/174503.791282:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.791659:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.791914:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.792304:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.792571:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.794953:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.795270:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.797663:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.799569:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.801781:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.805922:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.809880:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.810094:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.810464:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.810645:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.810893:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.811059:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2100:1204/174503.811276:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2100:1204/174503.811427:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | /home/MagicMirrorPi/MagicMirror/node_modules/electron/dist/electron exited with signal SIGINT 0|MagicMir | [2024-12-04 17:52:52.959] [WARN] No /home/MagicMirrorPi/MagicMirror/js/../modules/WallberryTheme/WB-clock/WallberryTheme/WB-clock.js found for module: WB-clock. 0|MagicMir | [2024-12-04 17:52:52.966] [WARN] No /home/MagicMirrorPi/MagicMirror/js/../modules/WallberryTheme/WB-weather/WallberryTheme/WB-weather.js found for module: WB-weather. 0|MagicMir | [2061:1204/175303.171404:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.171830:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.172059:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.173512:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.173776:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.173859:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174003:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174110:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174246:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174329:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174452:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174522:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174643:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.174716:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.175789:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.177938:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.178289:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.178399:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.178547:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.178626:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.182442:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.183828:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184097:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184177:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184326:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184401:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184533:ERROR:gbm_wrapper.cc(74)] Failed to get fd for plane.: No such file or directory (2) 0|MagicMir | [2061:1204/175303.184607:ERROR:gbm_wrapper.cc(257)] Failed to export buffer to dma_buf: No such file or directory (2)
The two wrapper errors and the two Wallberry warnings have been perpetual, but don’t seem to affect anything. If you have any insight on these, I’d appreciate it.
I also noted this from the out-put log:
0|MagicMir | ### OTHER: timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined 0|MagicMir | [2024-12-04 17:53:26.965] [LOG] Electron's cache successfully cleared.
and later in the same log:
0|MagicMir | [2024-12-04 17:53:34.199] [INFO] Checking git for module: MMM-EmbedURL 0|MagicMir | [2024-12-04 17:53:34.289] [LOG] resizing done!
I don’t think these are errors, at least not in the context provided.
-
@wishmaster270 said in Cannot get MMM-EmbedURL to show any sites:
@unaccomplished
Hi,just tried your config in my setup and everything worked as expected.
The question is…where are the differences in your and mine setup.
As a first try you can replace
embedElementType: "webview,"
withembedElementType: "iframe,"
.If the embeded pages does not block embedding
iframe
should work and you do not weaken any security settings of the electron browser.Additionally you can replace
"frameborder=0",
with"frameborder=1",
. You should see two boxes at least then. Even if the sites could not be embedded.@sdetweil Are you sure you set the security settings of electron? Without them electron will not support
webview
and will not display anything.I updated the config as requested, once without, and then with “iframe”.
{ module: "MMM-EmbedURL", position: "upper_third", header: "Embed-URL", config: { updateInterval: 120, embedElementType: "iframe", attributes: [ "frameborder=1", ], embed: [ "http://10.0.0.51:50081/ui3.htm?t=live&cam=Doorbell&maximize=1", "https://www.youtube.com/embed/dIHr96KqfDI", ] }, },
Without switching to iframe, the frameborder made no difference. Now with iframe, I have two blank boxes appearing.
-
@unaccomplished I agree, not the errors I was seeing…
so @wishmaster270 will have to help more
-
@unaccomplished your code markers MUST start in column 1.
-
Sorry, is it a formatting error in my comments, or in my config file?