Sometimes white page after live reload

Hi,

since some months i get sometimes a white page after a change in the code in the frontend has been made. There doesn´t seem to be any logic to when it happens. After a forced rebuild everything looks normal again.

Any ideas?

This is probably a problem with the group of JavaScript-packages that Phoenix relies on to handle the combining of assets. I have noticed this problem before as well; it seemed to get worse the more complex the application became.

Which OS are you using? We have heard this issue reported on Windows, where it would first truncate the file and then write to it, causing the CSS/JS files to be empty for a brief period of time.

Here is a PR: https://github.com/phoenixframework/phoenix_live_reload/pull/69

If you could try it out and let us know if it fixes the issue it would be very appreciated! If so, we can continue the discussion in the issues tracker.

Ubuntu 16.04 latest release

I also had this happening on OSX 10.11.6, very in-between once in a while - perhaps happened 4 or 5 times in 5 or 6 months) and I always forget to try to debug why it happened because the error is unrelated to the code, restarting iex/phx.server solves it and it doesn’t happen enough times to annoy me.

I have been using Linux Mint Serena (which is based on Ubuntu 16.04). Currently I am using Manjaro (an Arch Linux flavour) but I have not tested it under this architecture yet.

@josevalim

Seems to fix the issue. Hard to test, cause it happend randomly. Will let you know if it stays that way.

2 Likes

Thanks for the feedback! 1.1.4 released.

1 Like

awesome! - just one thing… the readme says The default interval is 100ms.

while the code seems to be default 1000ms phoenix_live_reload/lib/phoenix_live_reload/live_reloader.ex at main · phoenixframework/phoenix_live_reload · GitHub

1 Like

Thanks, I forgot to save my changes. 1.1.5 is out with proper default of 100ms.

3 Likes