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:

…compute.amazonaws.com/js/app-902848d7b359667250cff504edb444d3.js?vsn=d]

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

./lib/demo-proj-0.1.0/priv/static/js/app-7893a21a9c42f59f8c08cceb47642c8a.js

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.

Thanks.