Trying to connect to third party service through Ember CLI Mirage

I’m having some trouble and I posted a issue on the github repo for ember-cli-mirage but I haven’t received a response, figured maybe someone who has worked with mirage has come across this issue before as well.

I’m trying to connect to Pubnub through ember, but the problem is when it tried to make the connection mirage is catching it and won’t let it through. I have tried to add a passthrough but the first issue is that Pubnub always connects on a slightly different url that looks like http://ps2.pubnub.com/... but that number changes everytime.

So I tried a regular expression but that wasn’t working, so I tried just copying the passthrough rule around 20 times and just had 20 listings but none of them would allow it through.

Can someone possibly point me in the right direction? Not sure if anyone has come across this before.

Hi @JordanRDesigns,

I am also having a probem getting passthrough to work. Did you ever get anything passing through successfully because I can’t even do that.

Cheers Rob

No I didn’t, I opened an issue in the github

https://github.com/samselikoff/ember-cli-mirage/issues/404#issuecomment-164111144

They say to use jQuery 2.x but I had 2.x installed and it still didn’t work. Maybe it will work for you.

For passthrough you need both a new version of jQuery and an updated version of pretender. But it is doable (I ran into snags to start with as well) so if you’re still stuck, can you post a reproduction Github repo we can take a look at? Can look at it after the New Year …

This fix worked for me. I updated both ember and jquery versions. I have pushed the changes to the dummy repo I built for highlighting the problem if anyones interested at GitHub - robwatkin/mirg: Ember mirage

Rob