SOLVED: + heroku questions


SOLVED: I solved this issue by explicitly setting the port in the url to :443 when loading the script. Also I downloaded the script and loaded it from my www/js folder instead of remotely grabbing the file.

I’m developing my ionic app locally on http://localhost:9105.
When my node.js server is running on localhost:3000 I load up as follows:

<script src="http://localhost:3000/"></script>

This works great.

Now I’m ready to deploy my application and run it on heroku. So for heroku I’m doing this:

<script src=""></script>

This will load the script.

My first question is: will this cause problems getting accepted in the app store as I’ve read that loading remote .js files can be problematic to being accepted in the ios app store.

My second question is the following: web sockets work locally, but not when running on heroku. On heroku I notice the following when emitting events through


As you can see, the port number “9105” that I use in ionic locally is somehow being injected in the url? This is definitely wrong.

I’m using angular-socket-io as a module btw.

Any help is welcome. I’m stuck pushing this to production, so thanks for helping out!


I was having the exact same problem. Thanks for posting how to fix it!


I’ve been there, and Heroku with socket is a pain in the ass, you can’t use more than 1 dyno! I had to fallback to timed request. :frowning: