No internet connection
  1. Home
  2. Issues

Server error when trying to get zxcvbn.js

By Jeff M @phoenix
    2020-10-28 15:35:19.955Z

    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://20.64.66.14/-/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.

    Linked from:

    1. support-chat
    • 5 replies
    1. P
      Jeff M @phoenix
        2020-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://20.64.66.14/-/assets/v0.2020.27/zxcvbn.js fails, yet http://20.64.66.14/-/assets/v0.2020.27/zxcvbn.min.js succeeds.

        1. Progress
          with handling this problem
        2. KajMagnus @KajMagnus2020-10-29 11:14:44.458Z2020-10-29 11:22:57.210Z

          Hello Jeff, is 10.0.0.4 a different machine on the intranet? But which machine is 20.64.66.14 — 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.

          (You installed this repo: https://github.com/debiki/talkyard-prod-one right? (that's the correct repo) but not: https://github.com/debiki/talkyard (for development only) )

          ***

          I'll try to repro via insightful.demo.talkyard.io too

          1. P
            Jeff M @phoenix
              2020-10-29 13:17:36.011Zreplies toKajMagnus:

              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 20.64.66.14. 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!

              1. KajMagnus @KajMagnus2020-11-01 07:01:25.160Zreplies tophoenix:

                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.js instead, and thereafter I think all will work fine, also without copying min.js to zxcvbn.js any more. (And also, no need to reconfigure any load balancer or for you to do anything)

                1. P
                  Jeff M @phoenix
                    2020-11-02 16:33:41.509Zreplies toKajMagnus:

                    Sounds good. Thank you!

                    1. @KajMagnus marked this topic as Done 2021-01-03 22:00:29.911Z.