-
Notifications
You must be signed in to change notification settings - Fork 921
Rail's Webpacker issue with localhost and 0.0.0.0 on C9 #405
Comments
I think it would be good idea to rename the title to include Webpack issues in Cloud 9. |
Seems like webpacker doesn't handle correctly the case when it is running behind a proxy, which i'd say is a bug. It assumes that host passed for listening is the same one which should be used for loading the scripts. Usually it is a good idea to use locathion.hostname on the client side, if the passed hostname is As a workaround could you try adding a mapping from your preview hostname to echo "0.0.0.0 $C9_HOSTNAME" | sudo tee -a /etc/hosts and then passing $C9_HOSTNAME instead of 0.0.0.0 to the webpacker? |
@nightwing Thanks for chiming in. I tried your suggestion. It does allow running the webpack dev server using $C9_HOSTNAME. However, when loading up the application, I find this in the browser console: A detailed look into the response data of one of those requests shows: <html>
<head>
<meta charset='utf-8'>
<title>ECONNRESET: Request could not be proxied!</title>
<!-- ... --> I am not sure if this is a C9 issue now, or if the CC @ytbryan |
@BigChief45 could you give me access to an example cloud9 workspace where i can debug this? I've tried to create one but didn't succeed as i am not familiar with ruby, |
Gave it another try and indeed modifying Thanks for all the help everyone. @ytbryan I think you can close this issue now. |
The issue is found here rails/webpacker#176 (comment)
The text was updated successfully, but these errors were encountered: