Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
ToDo App (localhost:3000) shows no UI in Browser #9
Comments
|
Odd. Do you have any errors appearing in the browser's console? It seems that the stylesheet is loading, as the background is grey, but the app just hasn't started up. |
|
I am no expert in this kind of debugging. Here is the console log from Chrome:
Here the one from Edge: `HTML1300: Navigation occurred. HTML1527: DOCTYPE expected. Consider adding a valid HTML5 doctype: "". HTML1300: Navigation occurred. CONSOLE1810304: console.memory is not implemented and will return 0 for all attributes. Please use the memory profiler to monitor memory utilization. SEC7136: [Integrity] The origin 'http://localhost:3000' failed an integrity check for a script resource at 'http://localhost:3000/js/react.production.min.js'. SEC7136: [Integrity] The origin 'http://localhost:3000' failed an integrity check for a script resource at 'http://localhost:3000/js/react-dom.production.min.js'. SEC7136: [Integrity] The origin 'http://localhost:3000' failed an integrity check for a script resource at 'http://localhost:3000/js/react-bootstrap.js'. SEC7136: [Integrity] The origin 'http://localhost:3000' failed an integrity check for a script resource at 'http://localhost:3000/js/babel.min.js'. And from Firefox:
|
|
Thanks for the feedback. So, the browser is failing its Sub-resource Integrity (SRI) checks. In case you aren't aware of what that is, the Now the question... why are you getting different hashes? I just checked on my local machine and the hashes are still valid based on what's in the index.html file. So, this probably means there's something changing the files on your machine. Do you have a set of extensions on each of your browsers? If so, can you try running in an incognito/private window with those disabled and see if you get the same result? Are you using a corporate or other proxy server? Those typically aren't involved on localhost-based requests, but still worth asking. |
|
Same result in Incognito Mode on all three browsers. Also tried in safe mode with Firefox. Then checked with IE (disabled all AddOns but one (Snow Cloud Metering, can't be disabled) and used an in-Private browsing window) , no dice, even though the errors look different (see screenshot): I tried both on my work laptop and on my home laptop with identical results. My home laptop does not use any internet proxies. The only things common to all browsers are LastPass and AdBlock plus. |
|
Having a similar issue as what @Monte-Christo submitted above, (on Docker Desktop CE Edge 2.2.3.0 running on Windows 10 Pro 2004) I'm getting back into learning containers and can help too if needed. I've fiddled with @mikesir87 Are there some additional logging or events/message sources you'd recommend we look into? Ready to learn and help anyone else tripping up on this. |
|
Thanks for chiming in @t3hcr! The issue isn't a container-related issue, but (for some reason) the SRI checks the browser is running is failing (more details earlier). You can go into the |
|
Hi, thanks for the suggestion, @mikesir87. That worked as far as the Console errors are concerned. But there is still nothing being displayed but an error message:
Should I file a separate issue for this? |
Based on this issue: docker#9 the base 64 encoded sha256 checksums as they exist break the container and result in a non working app. These new values result in a working app on Docker Desktop CE Edge 2.2.3.0 running on Windows 10 Pro 2004.
|
Following @mikesir87 suggestion to remove the integrity checks resulted in a working todo app for me. I compared the sha256 checksum in WSL and Windows and both showed the same value. (albeit Windows uses caps for letters vs WSL's lower case) These values did not match the values in index.html. (maybe they formed differently...?) That led me to digging over here for what's up with integrity checks: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity (cool feature, I can see why this is a good thing) So ... the checksums are base64 encoded... In WSL, I did the following to get those new values and replaced them in /app/src/static/index.html
New values:
I rebuilt the container and now it all just works. I submitted the updated values back as this PR: #19 Totally not a developer, but... maybe today I am taking a step into it after years of doing infrastructure and systems work. |
|
Just commented on the PR, but will post here too... what's interesting is these hashes fail on the Mac. This is the first time I've seen different hashes generated for the same content. So, trying to figure out why that might be going on. Long-term, I'd like to have the SRI hashes there, as they are a good practice to have (even though not as critical in this case because it's all being served locally and not from a remote source). So, maybe short-term, we just remove the hashes to let people progress while we figure out what's going on. |
Signed-off-by: Michael Irwin <mikesir87@gmail.com> Work-around for #9 while trying to figure out what's going on
|
@Monte-Christo see if the latest update works better for you. @mikesir87 - thanks for helping us move this forward so we can just "get started." |
|
No problem @t3hcr! I apologize that there were a few hiccups getting started, but hey! No one said it was perfect and I'm still learning new stuff all the time too! If you run into more issues or have any questions, feel free to reach out! |
|
@mikesir87 Thank you, I am in business. After the latest pull, it works. Strangely enough, though, if I add the new hashes from @t3hcr I again get a blank window, but with no errors in the console. So there is more going on than meets the eye. Went back to the version straight from the repo and this restored functionality. |
|
Hi, Window 10 64 bit. I didn't get this part for how to do it in windows. Sorry for asking basic questions.
|
|
@mustafamalik looks like you are trying to start getting-starting container but not application container. |



When I start the container with the node app, everything looks fine, but upon navigating to localhost:3000 the browser window is empty (see screenshot):
The logs contain exactly two lines:
Using sqlite database at /etc/todos/todo.db Listening on port 3000This is on Docker Desktop CE Stable for WIndows 2.2.0.5, Docker Desktop CE Edge 2.2.3.0 under Windows 10 Pro 2004 and Windows 10 Enterprise 19.03. Tested with Chrome, Firefox, and Edge (all latest versions).