All threads / How to get ngrok working with webpack-dev-server

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to get ngrok working with webpack-dev-server

Daniel Weaver asked in Rails

I run my local dev site on ngrok and the webpack-dev-server spits out errors to the console on a regular basis:

GET https://localhost:3035/sockjs-node/info?t=1566173800826 net::ERR_CERT_AUTHORITY_INVALID @ sockjs.js:1795

[WDS] Disconnected!

Any ideas what I need to change to stop these errors appearing? Nothing I've tried so far has worked. Or do I need to make choice between using webpacker and ngrok?

Probably because you're using SSL to access your site over ngrok and your dev server is not. Try using http with ngrok.

Change webpacker.yml config

dev_server:
https: true

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.