question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ZombieJS and CORS

See original GitHub issue

So I solved my other issue, it was down to watermarks seemingly causing issues with ZombieJs fills, so the validation was failing so the request was never sent.

Now that the request is sent I get the error statusText: 'No Transport', so after googling it seems like it could be down to jquery ajax and CORS.

Now I notice in #521 that you have added support for CORS, so I am wondering if I need to do some IE style quirk handling in my code to handle ZombieJS. I currently do:

 if (navigator.appName == "Microsoft Internet Explorer")
            {  jQuery.support.cors = true; }

To allow version of IE to work with CORS and Jquery, so is there anything I need to do to allow ZombieJS to work with it? as I could not find any info on it from searching.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
evestlundcommented, May 11, 2016
  browser.on("loaded", function listener() {
    browser.removeListener("loaded", listener);
    browser.evaluate(`
      var tmp = window.XMLHttpRequest;
      window.XMLHttpRequest = function () {
        var ctorArgs = Array.prototype.slice.call(arguments);
        var tmpInstance = new (Function.prototype.bind.apply(tmp, [null].concat(ctorArgs)))();
        tmpInstance.withCredentials = false;
        return tmpInstance;
      };`
    );
  });

Try this if you don’t want jQuery.

0reactions
cutesquirrelcommented, Jan 4, 2017

Hi guys, I’m just testing zombie.js, with mapbox.js as well and have the same issue. Did you find any workaround for this ? thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

jquery CORS based ajax request fails with zombiejs #1881
I have already posted an issue around this on the zombie boards: assaf/zombie#805 When using regular xhr (granted its not cross browser etc) ......
Read more >
zombie-cors - npm Package Health Analysis - Snyk
Zombie.js is a lightweight framework for testing client-side JavaScript code in a simulated environment. No browser required.
Read more >
zombie.js-triggered AJAX requests don't complete
I'm trying to write unit tests with Zombie.js. My problem is that AJAX requests aren't finishing when initiated using browser.evaluate ...
Read more >
zombie | Yarn - Package Manager
Zombie.js is a lightweight framework for testing client-side JavaScript code in a simulated environment. No browser required.
Read more >
Quality Assurance and Testing with Chai - Run Functional ...
site = 'https://plum-stupendous-drive.glitch.me'; suite("Functional Tests with Zombie.js", function() { const browser = new Browser( //{ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found