Preview documentation on ngrok is potentially misleading
SmartyP opened this issue · 1 comments
I was trying to debug why my previews weren't working (finally are now - yay!), and was referencing this document:
https://github.com/gatsbyjs/gatsby-source-wordpress-experimental/blob/master/docs/debugging-and-troubleshooting.md#previews-dont-update
At the bottom it says to use a preview instance URL of https://your-ngrok-url.ngrok.io/8000
and a refresh endpoint of https://your-ngrok-url.ngrok.io/8000/__refresh
. I took this to mean that the /8000
portion of the ngrok URL was how ngrok did port routing, and so this odd formatting of ngrok.io/8000
instead of ngrok.io:8000
was intentional. I was noticing that hitting the /__refresh
endpoint on ngrok wasn't causing my gatsby develop
terminal to ever update.
Long story short, it wasn't until I changed https://your-ngrok-url.ngrok.io/8000
to https://your-ngrok-url.ngrok.io
and https://your-ngrok-url.ngrok.io/8000/__refresh
to https://your-ngrok-url.ngrok.io/__refresh
in my WP GatsbyJS plugin settings that this whole process worked for me, and that was a bit of a time suck. I'm guessing since the terminal command is run with ngrok http 8000
that having the trailing /8000
is unnecessary, but that's just a guess - I'm not really familiar with this tool.
Thanks for your consideration, hoping this bug and/or an update to this documentation might help someone else!
Ahh, yep that's a mistake :) I just updated it. Thanks for calling this out and sorry for the confusion there!