Javascript file fails to connect to WebSockets

I am deploying a Phoenix app using docker and deploying it to AWS.

I have a simple Javascript page that connects to Websockets and display the data. It was working fine initially but now, I am seeing this error in the browser console and the Websockets are not loading properly:


When I view the Javascript file under Sources on the dev console, it shows a line like this:

When I connect to the running docker container, I see a flie under


So, the digest number is obviously different but I don’t how the Javascript file has a different digest number in the tag and how to get it correctly inserted.

Any help would be greatly appreciated.

Hello and welcome,

Did You run mix phx.digest ?

Thanks Kokolegorille.

Yes, I am running mix phx.digest within my Dockerfile.

Actually, thanks to your question, I ran the mix phx.digest locally and it created that digest file and then I ran the Docker build and now it works.

When I ran the mix phx.digest locally it created that digest file in priv/static/js, which I didn’t see earlier.