Server error when trying to get zxcvbn.js
I'm setting up Talkyard in Azure. So far, only http to test it. When I click continue I get:
Has the server stopped? Or did you just get disconnected from the Internet? Or is the hostname or port number wrong, cross-origin request blocked? [TyE0SRVR]
Details: "Error loading script http://188.8.131.52/-/assets/v0.2020.27/zxcvbn.js: [object Event] [EdELDJSERR]
Interestingly, I get a similar error when I use Chrome and try to "Sign Up" from https://insightful.demo.talkyard.io/latest. If I use the Microsoft Edge browser, it works fine for talkyard.io domain. However, I still get the error for my install in Azure using the Edge browser. :(
Any direction forward to resolve this would be greatly appreciated.
- 5 replies
- PJeff M @phoenix2020-10-28 16:18:34.602Z
I found out that I can curl http://10.0.0.4/-/assets/v0.2020.27/zxcvb.min.js successfully, however I cannot curl http://10.0.0.4-/assets/v0.2020.27/zxcvb.js --> returns a 404. Likewise, if I try it from my browser, http://184.108.40.206/-/assets/v0.2020.27/zxcvbn.js fails, yet http://220.127.116.11/-/assets/v0.2020.27/zxcvbn.min.js succeeds.
- KajMagnus @KajMagnus2020-10-29 11:14:44.458Z2020-10-29 11:22:57.210Z
Hello Jeff, is
10.0.0.4a different machine on the intranet? But which machine is
18.104.22.168— that's the Talkyard server?
Is there possibly any infrastructure, like load balancers or reverse proxies, between your client and Talkyard?
When Talkyard asks for this script:
zxcvbn.js, then Nginx will look for
zxcvbn.js.gz(gzipped) but maybe if any proxy or load balancer removes some "Accept gzip" header, I wonder if that could cause problems.
In any case, Talkyard ought to request
.min.js— I can change that, and then this problem should go away.
I'll try to repro via
One thing to note is that I'm behind a heavily scrutinized corporate firewall.
I have installed this in Azure. There is an Application Gateway, which is a web traffic load balancer; this is 22.214.171.124. The Application Gateway is in its own Network Security Group (nsg). Then I have Talkyard on a Ubuntu VM; this is 10.0.0.4. The VM is in its own nsg as well.
It's very possible that the load balancer is removing some "Accept gzip" header. That's a good idea to check & I will investigate. Strangely, I was able to "hack" a solution to get Talkyard to work; I can login, administrate it, add multiple users, post images, etc. This is what I did: I copied the zxcvbn.min.js to zxcvbn.js. Everything worked as expected then.
I used this repo: git clone https://github.com/debiki/talkyard-prod-one.git talkyard
Thanks for your help!
was able to "hack" a solution to get Talkyard to work; [...] I copied the zxcvbn.min.js to zxcvbn.js
Ok then I even more think it's something weird going on with some in-between proxy server gzip configuration.
I'm releasing a new version soon that uses
zxcvbn.min.jsinstead, and thereafter I think all will work fine, also without copying
zxcvbn.jsany more. (And also, no need to reconfigure any load balancer or for you to do anything)