Closed mydea closed 9 years ago
Pretender actually was the reason for this until recently, the relevant PR just got merged. Try updating your Pretender.js to version 0.9.0 in your bower.json
and see if that works
I tried this, but after updating to Pretender 0.9.0 my page doesn't load anymore.I get no errors or warnings, just an empty page. After downgrading to 0.6.0, it works again. (Note that it stops working whenever I use any Pretender version > 0.6.0)
Ok - I'll have to take a closer look when I have some time. Did the Pretender API change?
Seems like I found the issue - apparently, Passthrough-Requests only work with jQuery 2.x: https://github.com/pretenderjs/pretender/issues/85
It works now after upgrading to jquery 2.1.4 and Pretender 0.9.0.
I have the same problem. Pretender 0.7.0 is "catching" what it shouldn't catch and after I update it to 0.9.0 - blank screen, nothing works... And I can't switch to jQuery 2.x :-(
@mydea - I'm not sure if jQuery 1.x
causes the problem.
I've tried to reproduce the bug with pure Pretender 0.9.0
and it works with jQuery 1.11.3
- here is my demo (in case if it's down - here is its source)
So Pretender 0.9.0
works fine with jQuery 1.11.3
and doesn't intercept JSONP to the same domain. But when I do this in my Ember app, it gives the blank screen and all is broken. Maybe it's problem with ember-cli-mirage
?
This doesn't appear to be a jquery or pretender issue. I'm pretty sure I have a fix and will be submitting a PR as soon as I test it. Stay tuned.
@jamesdixon I see that you've tagged this issue in a commit.
Can we get an update on what (if anything) needs to be done here?
@blimmer see this PR. In a nutshell, I need someone to re-run the Travis CI build (didn't see a way to do it myself) as it failed, but didn't appear to fail because of my changes. All tests passed on my end.
I'm having the same issue here in this issue https://github.com/samselikoff/ember-cli-mirage/issues/404 Is there something that I need to do related to this discussion/PR to get external resources to passthrough properly?
Hi,
I'm using ember-cli-mirage in my app and it works fine so far. However, I need to access an external service (https://www.telize.com/geoip) and fetch data from it. I do not need ember-cli-mirage/pretender to handle this, just ignore it. I tried
this.pretender.get('https://www.telize.com/geoip', this.pretender.passthrough);
But I nevertheless get "Error: Pretender will not respond to requests for URLs.". Am I missing something or is it simply impossible to access external URLs while using ember-cli-mirage?