Read the statement by Michael Teeuw here.
Black screen on HMDI output, content on remote browser
-
@chris_d try npm start dev to open dev window on startup
also can u try the npm start on the pi desktop, not over ssh?
-
Bullseye, looks like. Whatever’s in the newest RPi OS release, anyway.
For the moment, I’ve swapped back to the other SD card that’s working. System’s been a little flaky the last few days, figured I’d try a fresh install on a new card in case that’s starting to go; hit this issue on the new one. When I have a few minutes to pull the Pi from the mirror and bring it back to my desk, I’ll give
npm start dev
a try on the newer one. -
@MikeBishop can u reflash bullseye and use my install script?
https://github.com/sdetweil/MagicMirror_scripts -
That’s actually how I installed this instance to begin with. However, I’ve narrowed my instance of the problem down.
The node_helper for the module I wrote, MMM-Powerwall, has an async
start()
function. In previous MM versions, the startup code didn’t wait on async start functions to finish, and my init finished not long after MM started. This version includes the fix to wait for async modules to finish starting. I’ve confirmed that mystart()
function is running to the end, and MM does write[21.01.2023 14:30.25.915] [LOG] Sockets connected & modules started ...
…to the log, but apparently something about waiting on the module breaks the electron browser. If I hack the module to look synchronous, like so:
start: /*async*/ function () { this.asyncStart() }, asyncStart: async function () {
…everything starts right up. Something about the timing or threading of waiting for modules to complete is making the electron launch fail, I think.
My next step will be to make a module that does nothing but has an async node_helper and see if I can repro the issue with that.
@chris_d, any chance that you’re also using a module with an async start function?
-
Okay, I think I have a clean repro of the issue in https://github.com/MikeBishop/MMM-asyncdeath – the synchronous start function produces this in the logs and loads normally:
[21.01.2023 14:55.02.692] [LOG] Synchronous start-up -- all is well [21.01.2023 14:55.02.693] [LOG] Sockets connected & modules started ... [21.01.2023 14:55.03.235] [LOG] Launching application.
The async start function produces this in the logs and fails:
[21.01.2023 14:52.54.143] [LOG] About to break by using await [21.01.2023 14:52.54.884] [LOG] Launching application. [21.01.2023 14:52.56.512] [LOG] Sockets connected & modules started ...
Note the reversed order of “Launching application” and “modules started”. Seems feasible this could also happen with a synchronous module startup that takes a long time, but I haven’t tested that.
-
@MikeBishop great work
can you post your findings to issue
https://github.com/MichMich/MagicMirror/issues/2487
I reopened it
-
@MikeBishop I’m running MMM-Calendar3 and the default modules only.