Ionic API requests not completing - stays in pending status











up vote
0
down vote

favorite












I'm building an ionic app, with ionic 3 and angular 5.2. Everything has been working well for the longest time I can remember, until recently I noticed weird behavior.



Dev-tools network tab showing the request status



As from the image, the request stays in pending status forever.



The backend is done in PHP, and it's working fine in a different app as well as website without issues. The log for the above requests is as shown below.



Yii2 request and response status



I've checked this questions among other solutions, but none seems to resolve my issue.



I'm using ionic-cli 4.3.1 (tried with earlier versions too).










share|improve this question

















This question has an open bounty worth +50
reputation from Murwa ending in 3 days.


Looking for an answer drawing from credible and/or official sources.
















  • Whats the error in the console?
    – Anand Raj
    Nov 15 at 8:17










  • hey @AnandRaj, there is none.
    – Murwa
    Nov 15 at 9:08










  • But there is one in your screen shot
    – Anand Raj
    Nov 15 at 10:11










  • No, that's a google maps script failing to load. It doesn't affect this though...
    – Murwa
    Nov 15 at 10:44










  • Ok. Can you share your code?
    – Anand Raj
    Nov 15 at 10:48















up vote
0
down vote

favorite












I'm building an ionic app, with ionic 3 and angular 5.2. Everything has been working well for the longest time I can remember, until recently I noticed weird behavior.



Dev-tools network tab showing the request status



As from the image, the request stays in pending status forever.



The backend is done in PHP, and it's working fine in a different app as well as website without issues. The log for the above requests is as shown below.



Yii2 request and response status



I've checked this questions among other solutions, but none seems to resolve my issue.



I'm using ionic-cli 4.3.1 (tried with earlier versions too).










share|improve this question

















This question has an open bounty worth +50
reputation from Murwa ending in 3 days.


Looking for an answer drawing from credible and/or official sources.
















  • Whats the error in the console?
    – Anand Raj
    Nov 15 at 8:17










  • hey @AnandRaj, there is none.
    – Murwa
    Nov 15 at 9:08










  • But there is one in your screen shot
    – Anand Raj
    Nov 15 at 10:11










  • No, that's a google maps script failing to load. It doesn't affect this though...
    – Murwa
    Nov 15 at 10:44










  • Ok. Can you share your code?
    – Anand Raj
    Nov 15 at 10:48













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm building an ionic app, with ionic 3 and angular 5.2. Everything has been working well for the longest time I can remember, until recently I noticed weird behavior.



Dev-tools network tab showing the request status



As from the image, the request stays in pending status forever.



The backend is done in PHP, and it's working fine in a different app as well as website without issues. The log for the above requests is as shown below.



Yii2 request and response status



I've checked this questions among other solutions, but none seems to resolve my issue.



I'm using ionic-cli 4.3.1 (tried with earlier versions too).










share|improve this question















I'm building an ionic app, with ionic 3 and angular 5.2. Everything has been working well for the longest time I can remember, until recently I noticed weird behavior.



Dev-tools network tab showing the request status



As from the image, the request stays in pending status forever.



The backend is done in PHP, and it's working fine in a different app as well as website without issues. The log for the above requests is as shown below.



Yii2 request and response status



I've checked this questions among other solutions, but none seems to resolve my issue.



I'm using ionic-cli 4.3.1 (tried with earlier versions too).







ionic-framework ionic3 ionic-native






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 17:55









James Z

11.1k71735




11.1k71735










asked Nov 12 at 17:30









Murwa

704815




704815






This question has an open bounty worth +50
reputation from Murwa ending in 3 days.


Looking for an answer drawing from credible and/or official sources.








This question has an open bounty worth +50
reputation from Murwa ending in 3 days.


Looking for an answer drawing from credible and/or official sources.














  • Whats the error in the console?
    – Anand Raj
    Nov 15 at 8:17










  • hey @AnandRaj, there is none.
    – Murwa
    Nov 15 at 9:08










  • But there is one in your screen shot
    – Anand Raj
    Nov 15 at 10:11










  • No, that's a google maps script failing to load. It doesn't affect this though...
    – Murwa
    Nov 15 at 10:44










  • Ok. Can you share your code?
    – Anand Raj
    Nov 15 at 10:48


















  • Whats the error in the console?
    – Anand Raj
    Nov 15 at 8:17










  • hey @AnandRaj, there is none.
    – Murwa
    Nov 15 at 9:08










  • But there is one in your screen shot
    – Anand Raj
    Nov 15 at 10:11










  • No, that's a google maps script failing to load. It doesn't affect this though...
    – Murwa
    Nov 15 at 10:44










  • Ok. Can you share your code?
    – Anand Raj
    Nov 15 at 10:48
















Whats the error in the console?
– Anand Raj
Nov 15 at 8:17




Whats the error in the console?
– Anand Raj
Nov 15 at 8:17












hey @AnandRaj, there is none.
– Murwa
Nov 15 at 9:08




hey @AnandRaj, there is none.
– Murwa
Nov 15 at 9:08












But there is one in your screen shot
– Anand Raj
Nov 15 at 10:11




But there is one in your screen shot
– Anand Raj
Nov 15 at 10:11












No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 at 10:44




No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 at 10:44












Ok. Can you share your code?
– Anand Raj
Nov 15 at 10:48




Ok. Can you share your code?
– Anand Raj
Nov 15 at 10:48












1 Answer
1






active

oldest

votes

















up vote
0
down vote













I had a similar problem. After some time, the requests were placed in a "pending" state. I solved this thanks to the Cordova Background Plugin by doing:



cordova.plugins.backgroundMode.setDefaults({ silent: true });
cordova.plugins.backgroundMode.on('activate', function() {
cordova.plugins.backgroundMode.disableWebViewOptimizations();
});
cordova.plugins.backgroundMode.enable();





share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267259%2fionic-api-requests-not-completing-stays-in-pending-status%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I had a similar problem. After some time, the requests were placed in a "pending" state. I solved this thanks to the Cordova Background Plugin by doing:



    cordova.plugins.backgroundMode.setDefaults({ silent: true });
    cordova.plugins.backgroundMode.on('activate', function() {
    cordova.plugins.backgroundMode.disableWebViewOptimizations();
    });
    cordova.plugins.backgroundMode.enable();





    share|improve this answer

























      up vote
      0
      down vote













      I had a similar problem. After some time, the requests were placed in a "pending" state. I solved this thanks to the Cordova Background Plugin by doing:



      cordova.plugins.backgroundMode.setDefaults({ silent: true });
      cordova.plugins.backgroundMode.on('activate', function() {
      cordova.plugins.backgroundMode.disableWebViewOptimizations();
      });
      cordova.plugins.backgroundMode.enable();





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        I had a similar problem. After some time, the requests were placed in a "pending" state. I solved this thanks to the Cordova Background Plugin by doing:



        cordova.plugins.backgroundMode.setDefaults({ silent: true });
        cordova.plugins.backgroundMode.on('activate', function() {
        cordova.plugins.backgroundMode.disableWebViewOptimizations();
        });
        cordova.plugins.backgroundMode.enable();





        share|improve this answer












        I had a similar problem. After some time, the requests were placed in a "pending" state. I solved this thanks to the Cordova Background Plugin by doing:



        cordova.plugins.backgroundMode.setDefaults({ silent: true });
        cordova.plugins.backgroundMode.on('activate', function() {
        cordova.plugins.backgroundMode.disableWebViewOptimizations();
        });
        cordova.plugins.backgroundMode.enable();






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 at 14:16









        Damian Celmer

        62




        62






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267259%2fionic-api-requests-not-completing-stays-in-pending-status%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?