-
-
Notifications
You must be signed in to change notification settings - Fork 155
Blank screen on first load (I'm probably doing something wrong) #56
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
Comments
Thanks @bivald. Can you please post an issue in the electronegativity repository? I'd like this package to work for MacOS systems without a hitch, it's probably something small on their end. Hm, I've looked at this issue many times, but upon the first time I start up the project in any given day I run into this issue. Any time thereafter I close and re-open the app, it works without a hitch. You can refresh the screen anytime after I'll try to look into this a bit later today. |
@reZach Hmm, looks to be that it's trying to load http://localhost:40992/ which doesn't exist until webpack has started. The fact that it's blank is probably just Electrons way of handling Connection refused. If I run So looks like the price to pay for not using Any reasons for the live dev server, is that just for nicer dev experience or something about security stopping file:// in dev? I know others has solved it with what appears to be some hacking, including rendering static HTML with dll injections and stuff |
Electron will load the Webpack files once they exist, even if it begins trying before the files exist. |
@slapbox That's the strange thing for me, if it tries to load I've solved this by just running the dev-server separately from electron. So feel free to close this :) I'll keep hammering at it too see if I can get the autoreload to work out of the box without reloading, but it's not a huge issue. The reason I'm doing this is that I use |
@bivald and @slapbox, it looks like an issue with Subsequent runs, running |
Just FYI, I am getting this same issue on a Windows machine with a fresh clone:
Getting a white screen, nothing actually loads |
In my case on Windows, this does not solve the issue |
@netpoetica , you can refresh (ctrl + r) once the |
Thanks reZach - in my case, this is not the case. No matter how much Ctrl + R, Reload of Force Reload, the request to localhost always get no reply. The call to localhost just gives no response at all. I am running |
@netpoetica I've pushed a new update to the template, can you get the latest? I had thought loading contents over https was more secure for this template, but apparently I too experienced this issue where refreshing does not fix anything. The revert seems to have fixed it (back to where it was). |
Thanks @reZach for taking a look 💪 latest pull solves this |
Sure thing @netpoetica! I'm glad I was able to solve it fast. |
@bivald, @slapbox, @netpoetica it looks like there is a way to fix this, but unfortunately I do not know how to accomplish this suggestion. I will leave it to any one of you while I look at some other issues in this repo first. |
Here's a solid repro:
And now everything works. Now do this:
Now notice that the page loads up just fine. |
@bivald / @slapbox / @netpoetica / @twabbott I've made changes to the template so that the app (when loaded in development, the only configuration we see this issue due to the webpack dev server) is guaranteed to load after webpack is finished. Thanks to this comment, I've made changes which you can view the commit of files you need to change - OR if you simply get the latest version/release you should be set to go. Please re-open if you are still having problems. I was able to follow the repro steps by @twabbott and am not able to replicate the issue any longer.
|
First of all: Thank you for this project :)
Second of all: I'm new to Electron (this being my second app) so I'm most likely doing something wrong.
npm: 7.5.3, node 15.8.0
I ran into some road blocks trying to start a fresh project. All below is of a vanilla checkout from the template (I've done no changes yet):
The first was that @doyensec/electronegativity ^1.8.1 fails to install properly on OS X[1] (at least my version). Given that it's only a day old it's probably some compatibility. I resolved it by removing electronegativity from package.json and installing 1.8.0 globally. It will probably sort itself out since it's a downstream issue.
However, when I run ´npm run dev` I get the following in the electron window:
While it takes the 10 seconds for webpack to compile. If I then refresh the page (CTRL+R) after it's been compiled it runs like a charm.
Given that I am new to Electron I'm not sure if this is intended behaviour or not :)
[1]:
[2]
The text was updated successfully, but these errors were encountered: