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

Black screen #20

Open
Nieox opened this issue Feb 3, 2022 · 2 comments
Open

Black screen #20

Nieox opened this issue Feb 3, 2022 · 2 comments

Comments

@Nieox
Copy link

Nieox commented Feb 3, 2022

Hello!

As soon as I pasted the code in the modules array and saved the MM refreshed (as aspected) but after that I only get a black screen with the cursor in front of it.
No error, no other modules. Just a black screen with the cursor.

For the setup I have not deviated from the guide.

Has anyone an idea what went wrong?

EDIT: If I put all the modules lines in comment ( // ) MM is displaying just fine.

@flo269
Copy link

flo269 commented Jul 15, 2023

Hi! I have the same symptoms. After adding this module to my config and restarting MagicMirror, it crashes.

The pm2 error logs show the following:

[15.07.2023 12:32.39.952] [ERROR] (node:5252) UnhandledPromiseRejectionWarning: Error: Cannot find module 'request'
Require stack:
- /home/mirror/MagicMirror/modules/MMM-iFrame-Ping/node_helper.js
- /home/mirror/MagicMirror/js/app.js
- /home/mirror/MagicMirror/js/electron.js
- /home/mirror/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
- 
    at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)
    at n._resolveFilename (node:electron/js2c/browser_init:2:117457)
    at Module._resolveFilename (/home/mirror/MagicMirror/node_modules/module-alias/index.js:49:29)
    at Module._load (node:internal/modules/cjs/loader:927:27)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1148:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/home/mirror/MagicMirror/modules/MMM-iFrame-Ping/node_helper.js:11:15)
    at Module._compile (node:internal/modules/cjs/loader:1269:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1324:10)
    at Module.load (node:internal/modules/cjs/loader:1124:32)
    at Module._load (node:internal/modules/cjs/loader:965:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1148:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at loadModule (/home/mirror/MagicMirror/js/app.js:180:19)
(Use `electron --trace-warnings ...` to show where the warning was created)
[15.07.2023 12:32.39.953] [ERROR] (node:5252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[5283:0715/123241.717965:ERROR:viz_main_impl.cc(186)] Exiting GPU process due to errors during initialization

MagicMirror: v2.24.0

Any idea what I could be doing wrong?

If you need any other info, please let me know. Thank You!!
:-)

PS:
This is what I added to my config:

	{
			module: 'MMM-iFrame-Ping',
			position: 'bottom_right',	// This can be any of the regions.
			config: {
				// See 'Configuration options' for more information.
				url: "http://192.168.0.100:8080", //url to display
				height:"100%", 
				width:"100%",
				autoRefresh: true, //set to false for video
				updateInterval: 1, //in min. Only if autoRefresh: true
				displayLastUpdate: true,
				width: "100%", // Optional. Default: 100%
				height: "400px", //Optional. Default: 100px
				scrolling: "no" 
				}
		}, 

@giddyhup
Copy link

Hi @flo269, @Nieox, and anybody else who comes across this in the future (you may have web-searched for "cannot find module 'request'" and "mmm-iframe-ping")!

The documentation is lacking one essential step, the installation of required modules. After cloning the mirror module you need to run npm install in the module's directory. The whole installation instruction should read:

cd ~/MagicMirror/modules
git clone https://github.com/AgP42/MMM-iFrame-Ping.git
cd MMM-iFrame-Ping
npm install

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

3 participants