[Javascript driver error] Neo4jError: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver

Hello,

I faced javascript neo4j driver problem. I have a AWS EC2 Server which installed neo4j community server(4.2). When my react program(using neo4j javascript driver(official)), browser throw error "Websocket connection failure".

One strange thing is when I execute same react program in local(my Laptop) this problem does not emerged. Only when I tried my react program deploy AWS amplify(With https protocol), browser throw connection fail error.

I have searched some threads for solutions or same issues, all of that not working.

  1. In javascript change scheme ( neo4j to bolt protocol ) => not worked
  2. In EC2 neo4j server, I changed dbms.connector.bolt.advertised_address={ip:port} => I changed to my ec2 private IP address and public IP all, but any changing not worked.

Really strange thing is executing react program in localhost doesn't have any problem, only problem case is deploy to AWS amplify service.

I couldn't convince that what is problem causes ( HTTPS protocol ? AWS amplify problem? )

Any little information would be greatly helpful to me.

Thanks.

You need to share more details e.g. your source code

also try to connect with cypher-shell or neo4j-browser first to see if your connection works in the first place