-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Admin pages frequently come up blank white for custom hubs cloud clients. #4208
Comments
Ditto. We just installed a custom client, seeing the same thing. We had been running a custom client based on the previous client code, and ported our small changes to this. Admin pages works fine without the custom client, and everything else in the client seems to work (spoke, rooms, etc). Just the admin pages. Signing out and back in doesn't help. |
In our case, the admin page is sending an empty Javascript bundle even though the expected 3 MB build file appears in |
FWIW, /hab/svc/hubs/var/dist/pages/admin.html (Is this where it's served from?) is small.
At the bottom of admin.html it's trying to load a script at That script exists, and is fairly large
So it's being uploaded, it's just not "being gotten". |
And the response from the server for that file is 200, happy, but it gets back content-length 0. |
Same thing here: if I view source, I am getting an html page, but the body contains nothing but a ui-root div and a call to that admin js file, which does not load. |
Given that I see the JS file on my server at the right place, but if I try to access that URL directly in the browser it returns nothing, is it possibly a server issue or some sort of cache/CDN problem? |
@blairmacintyre There's two different The latter file is the "correct" one which was built locally and supposedly uploaded, but it appears the server is still holding an old script file. Maybe if you try manually cleaning the files on the server and then re-deploying, it will accept the new script?
This is the only part that confuses me, I'm seeing a different script requested by the current admin page. Could you double check this? |
Hm, that is an interesting clue. I can see in my own example that the script being called from my admin.html is zero bytes in size, in my S3 bucket. I can also see that I had a 3M version of this file on January 26th, the last time the admin pages worked, and I have many other versions that are zero bytes, from all the times it has not worked. So clearly it is the process of creating this file that is dropping the ball. |
@mattrossman hmmm. I'm confused now too. The dates on these files are correct in that directory on the server, based on when we deployed the modified client, but the admin.html file we are getting (that you see, Matt, which I also see, now that I look) is different from the admin.html file on the server. Am I not looking in the right place? I there some sort of cache on the server that's stuck? |
Well, my only current theory is the New Moon tonight, but... my admin pages are working again for the moment. :-) Anybody else see anything different here today? |
Mine started working; I rebuilt and re-uploaded. No idea why it failed the first time. |
Whoops, back to white pages again. :-\ |
I've seen this happen as a result of having "invalid" data in local storage. We can probably handle this case more gracefully. |
Well, for anyone else cursed with this affliction, I just discovered a workaround! Deploying a clean, fresh client does not do anything for me, however "npm run undeploy" DOES restore my admin pages! Obviously, this is not a fix, since it abandons all my custom client work, but it enables making changes to admin and then redeploying the custom client afterwards. |
I'm also experiencing this "white admin page" issue. The pathology for me is that admin.js is truncated and stops at some random point within the file. This point is different each time. The root cause for me is here in the deploy script. The contents of admin/dist are copied to the top-level dist folder, but the
The output is typically something like this:
Multiple callbacks are NOT part of the advertised functionality and I can confirm (using fs.stat) that the file copy is not always complete after the first callback. This fits with the pathology:
Inserting a pause after the copy command makes the problem go away, but obviously that's a band-aid solution. ncp hasn't been touched in a long time and should be replaced with something more modern and less flaky. |
@rawnsley By "inserting a pause after the copy command", do you mean something like the following: |
I can also confirm that this wasn't an issue on my older computer (i3), but has been on newer ones (i5, i7, M1) |
Something like this to give the ncp command the time it needs to actually finish, which is probably a fraction of a second:
I haven't had the problem since making this change and the one time I did have a problem was because I had accidentally reverted it. |
Had the same issue since the April Hubs-Cloud Update. @rawnsley hack got it working for me now, thank you! :) |
@rawnsley you saved my day |
Thanks for identifying that, I was having this issue again with the April release and your workaround fixed it. Looks like a known issue with ncp:
Here is another package with similar functionality and popularity but is more recently updated, perhaps it would be a more reliable option. It does have several dependencies though. |
Honestly I'm not really familiar with the deploy script yet but sounds like @rawnsley 's workaround should get in the core because we often get the problem report about this problem and the workaround seems to actually resolve the problem. And the workaround is very easy and simple. We may be able to either seek a more proper way to detect the copy completion, try to fix ncp, or try other libs later if possible and needed. What do you think? @netpro2k @brianpeiris |
I've submitted a trivial PR in case you want to include it temporarily. |
I was also very helpful. |
Thanks for the detailed investigation and workaround @rawnsley, and for the alternative @mattrossman. I'll see if I can fix this more permanently. |
Alright, I think #5365 is a good fix, though I wasn't able to reproduce the issue myself, so that might require verification from the community. But, I think it's solid enough to ship. Sorry it took so long to get to this. Thanks to @takahirox for bringing attention to it. |
I'm going to mark this as closed, since #5365 has been merged into our master branch, though it will take a while to be released to Hubs Cloud proper. Keep an eye on the the changelog to watch for that. In the mean time, if you are running into this issue, you should be able to cherry pick the changes from #5365 into your Hubs Cloud fork directly. |
Yes. The white page is still existing in the "master" branch of the github. You have to upload the files directly to the 'hubs-cloud' branch to avoid this problem |
This may or may not be related, but I've experienced some erratic behavior with whitescreens before when making rapid enough requests to reticulum. Ret has a rate limiter available as a plug and it looks like lots of files pull it in. I'm pretty sure the rate limiter is what was causing this type of error for me. |
Bug can be erratic and does not affect everyone, but those affected see nothing but a blank white screen instead of admin pages, and very few to no messages in the browser logs.
To reproduce: deploy a custom client, and you may or may not have this problem.
When active, the bug affects all browsers equally.
We experienced the issue from the point we installed our current stack several weeks ago all the way up until a couple of days ago, not immediately but a couple of days after installing the new hubs cloud client. At one point it just miraculously fixed itself, and worked for a day or two, but today it has gone back to a blank white screen, and several other users are reporting the problem now as well.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: