-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Electron shows white screen during the MM start #1919
Comments
Just rolled back to 2.10.1 - and everything works fine, without white screen at electron during the start. So the same machine, the same environment but different behavior in different versions e.g. in 2.11.0 and in 2.10.1 Environment:
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3
pi@raspberrypi:~ $ node -v v10.18.1
pi@raspberrypi:~ $ npm -v 6.13.4
pi@raspberrypi:~/MagicMirror $ node_modules/.bin/electron -v
v3.1.13 |
the problem seems to affect all electron versions >=4. So if you use the master branch (v2.10.x, electron v3.x) everything works fine. On the develop branch electron was upgraded to 6.x so we have to live with the white screen until this is fixed by electron (or another workaround). |
so may be it would better to use electron v3.x fi the electron white-screen issue will not be resolved till the MM 2.11.0 release date? |
Buster isn’t supported by the old electron. And if I understand correctly. This is only a issue during startup? Just curious: why would you restart your mirror that often that it is a problem? |
Yes, issue appears only at startup.
But 2.10.1 works perfect with older Electron version (or am I missing something?). My MM restarts few times per day (just to fresh up everything) and I have completely black screen during restart (no 4 raspberries at start, no rainbow screen at start, no splash screen, no colored desktop; so such white blink looks not so good for me. |
Just curious: Why do you need to restart/refresh your mirror? My mirror restarts once every 3 months: when I run the update. Never have any issues. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I would like to see if there's a potential fix for this issue as well. If someone figures out how to change that to a black color instead of white that would be awesome ;) UPDATE: I've discovered that the white screen is due to this error:
After some tinkering I found that the libraries in question are located in UPDATE: After some more debugging the above is not causing this issue but the electron option |
Are you running on the latest MM version with all packages updated? |
yes, I just updated to 2.22 right before looking into this issue... which was present before the update as well |
i've been trying to get rid of the white flash for years.. without success.. depends on system speed really.. |
I'm determined to get rid of this TODAY! UPDATE: @sdetweil check your logs and see if you're seeing the same error as posted above please. This might give me a hint that I'm on the right or wrong track. |
i do not see that error.. I have tried adding code to force the initial background, minimize and then restore after ready, ... see this, https://www.christianengvall.se/electron-white-screen-app-startup/ |
I have messed with the config options and nothing worked for me. The background color is not affecting this initial boot glitch. I was thinking the error above is the one causing this as it's right when the |
The final solution to make this works on Raspberry Pi4, where I've been testing and have installed MagicMirror. The issue is caused by the electron option First step would be to comment out the fullscreen option being set. Look for the line below in the
Second step would be to add the following extra options, potentially replacing the fullscreen one from step one.
Adding the following at the end of the
This essentially removes the fullscreen option, waits for the app to be ready to render and then displays the content while maximizing the window. As long as I will be looking into creating a PR to fix this issue in this way but I need to test more to make sure this approach doesn't break other implementations. UPDATE: I think in some cases you might see a flashing white square, depending on the size of the original window, which you can get rid of by adding |
cool.. that never worked before!! |
I told you I'm determined to find a workaround for this issue TODAY! I hope it works for you as well... and maybe other platforms. |
Might this be something worth adding to the documentation : |
it happens on other platforms too.. maybe his fix works |
see #1919 thanks @dfanica for providing the solution in [this comment](#1919 (comment)) tested this on a pi4 with bullseye 32-bit and 64-bit
## [2.23.0] - 2023-04-04 Thanks to: @angeldeejay, @buxxi, @CarJem, @dariom, @DaveChild, @dWoolridge, @grenagit, @Hirschberger, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @nfogal, @psieg, @rajniszp, @retroflex, @SkySails and @tomzt. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you guys! You are awesome! ### Added - Added increments for hourly forecasts in weather module (#2996) - Added tests for hourly weather forecast - Added possibility to ignore MagicMirror repo in updatenotification module - Added Pirate Weather as new weather provider (#3005) - Added possibility to use your own templates in Alert module - Added error message if `<modulename>.js` file is missing in module folder to get a hint in the logs (#2403) - Added possibility to use environment variables in `config.js` (#1756) - Added option `pastDaysCount` to default calendar module to control of how many days past events should be displayed - Added thai language to alert module - Added option `sendNotifications` in clock module (#3056) ### Removed - Removed darksky weather provider - Removed unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle (#2896) ### Updated - Use develop as target branch for dependabot - Update issue template, contributing doc and sample config - The weather modules clearly separates precipitation amount and probability (risk of rain/snow) - This requires all providers that only supports probability to change the config from `showPrecipitationAmount` to `showPrecipitationProbability`. - Update tests for weather and calendar module - Changed updatenotification module for MagicMirror repo only: Send only notifications for `master` if there is a tag on a newer commit - Update dates in Calendar widgets every minute - Cleanup jest coverage for patches - Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues, update `main.css` matching new rules - Update Eslint config, add new rule and handle issue - Convert lots of callbacks to async/await - Revise require imports (#3071 and #3072) ### Fixed - Fix wrong day labels in envcanada forecast (#2987) - Fix for missing default class name prefix for customEvents in calendar - Fix electron flashing white screen on startup (#1919) - Fix weathergov provider hourly forecast (#3008) - Fix message display with HTML code into alert module (#2828) - Fix typo in french translation - Yr wind direction is no longer inverted - Fix async node_helper stopping electron start (#2487) - The wind direction arrow now points in the direction the wind is flowing, not into the wind (#3019) - Fix precipitation css styles and rounding value - Fix wrong vertical alignment of calendar title column when wrapEvents is true (#3053) - Fix empty news feed stopping the reload forever - Fix e2e tests (failed after async changes) by running calendar and newsfeed tests last - Lint: Use template literals instead of string concatenation - Fix default alert module to render HTML for title and message - Fix Open-Meteo wind speed units
This PR uses `electron.screen.getPrimaryDisplay().workAreaSize` under electron to get the screen size. If this fails the current defaults (800x600) are used. This solves some problems with xrandr under bullseye where the sreen comes up with 800x600 instead of fullscreen, e.g. described [here](https://khassel.gitlab.io/magicmirror/pi-modules/). Tested this on my pi setup. By the way, the Issue #1919 is back on my side (not related to this PR) ...
Do not know whether this is a bug or new electron's behavior.
I just tested MM's dev branch 2.11.0 and have found that now the electron's white screen appears just after MM start for 0.5-1.0 seconds and then reverts to black one.
See video how it looks like: https://youtu.be/Uhb5BjEy-dA - on this video white screen starts at 10th second and lasts until the beginning of the 12th second.
I have never seen such behavior before during the previous installs.
Looks not good with the mirror while everything should be black for good reflection.
The text was updated successfully, but these errors were encountered: