PlutoVR / sandcastle

a friendly, powerful WebXR prototyping engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VR doesnt work when I publicly host

CodeRhymesLife opened this issue · comments

People on the internet can access my SandCastle scene on the public internet, but they cannot enter into VR.

Repro steps:

  1. npm run start
  2. Update router's port forwarding settings to expose port 1234 to the public internet
  3. Update inbound firewall settings to allow connections to port 1234
  4. Browse to your public ip and the port exposed by your router in step 2

EXPECTED:
Sandcastle app loads and you can enter VR

ACTUAL:
SandCastle app loads but cannot enter VR

since WebXR can only work on https connections with valid SSL certificates, there is no trivial first-party solution to this problem that doesn't require the user to issue one. While webpack-dev-server does offer https serving, its autogenerated certs aren't trusted by chrome.

The path of least resistance seems to me to use something like ngrok to create temporary secure https tunnels to localHost. While I believe including ngrok in Sandcastle would be out of scope for the project (it's a big package, not everyone will need to test networked components), I've added a note/mini-tutorial on the wiki.

Thanks for flagging!