$.getScript returns status canceled and the application does not execute the callback function?

14,098

The canceled status is an issue with current dev channel Google Chrome. It has been fixed upstream and will propagate to the dev channel accordingly.

https://bugs.webkit.org/show_bug.cgi?id=72873

Share:
14,098
ridermansb
Author by

ridermansb

I’ve been in the information technology area for over 17 years, working in and out of Brazil. Throughout my journey, I’ve developed software that communicated with automated robots, created applications and web pages, worked in emerging startups, and specialised myself in front-end technologies. I'm curious, enthusiastic and student most of the time, like the rest of the time to write code, especially in Javascript.

Updated on June 05, 2022

Comments

  • ridermansb
    ridermansb almost 2 years

    Environment

    To automate the compression and the junction of my js files, I use this tool.

    Once installed and configured, the code below returns a js compressed and concatenated with all the JS folder project

    <script src="@BundleTable.Bundles.ResolveBundleUrl("~/Scripts/pages/project-projectPhotos/js")"></script>

    Problem

    In my page, have the following code:

    loaderPhotosPage = function(url) {
      $.getScript('/Scripts/pages/project-projectPhotos/js', function() {
        alert(url); //This code is not executed!! Here's the problem;
      });
    };
    

    alert is never executed!

    Tests

    To simulate a test tool using Google Chrome Developer Tools, I got the following results:

    Code executed on Google Chrome Developer

    Look at the console, and the header. The execution is very successful!

    Code executed on Google Chrome Developer

    Now the preview result

    Result of script on Google Chrome Developer

    The HTTP status is as canceled, why? Yet the code in the console was running normally (text: success)

    Http Status

    I put the js file complete at this link.

    Another test:

    See the get, with the link of the script is running normally!

    Get Script

    Thanks for the help!