Ionic API requests not completing - stays in pending status
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.

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.

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).
Edit
I never found a solution to this, and since I was working on a short timeline, the only quickest option I had was to migrate to Ionic V4. The issue has since gone away, and the app is running fine.
ionic-framework ionic3 ionic-native
add a comment |
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.

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.

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).
Edit
I never found a solution to this, and since I was working on a short timeline, the only quickest option I had was to migrate to Ionic V4. The issue has since gone away, and the app is running fine.
ionic-framework ionic3 ionic-native
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
1
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48
add a comment |
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.

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.

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).
Edit
I never found a solution to this, and since I was working on a short timeline, the only quickest option I had was to migrate to Ionic V4. The issue has since gone away, and the app is running fine.
ionic-framework ionic3 ionic-native
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.

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.

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).
Edit
I never found a solution to this, and since I was working on a short timeline, the only quickest option I had was to migrate to Ionic V4. The issue has since gone away, and the app is running fine.
ionic-framework ionic3 ionic-native
ionic-framework ionic3 ionic-native
edited Nov 27 '18 at 13:25
asked Nov 12 '18 at 17:30
Murwa
832915
832915
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
1
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48
add a comment |
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
1
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
1
1
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48
add a comment |
1 Answer
1
active
oldest
votes
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();
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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();
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
add a comment |
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();
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
add a comment |
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();
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();
answered Nov 15 '18 at 14:16
Damian Celmer
163
163
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
add a comment |
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
Hey @damian, still doesn't work.
– Murwa
Nov 19 '18 at 0:04
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Whats the error in the console?
– Anand Raj
Nov 15 '18 at 8:17
hey @AnandRaj, there is none.
– Murwa
Nov 15 '18 at 9:08
But there is one in your screen shot
– Anand Raj
Nov 15 '18 at 10:11
No, that's a google maps script failing to load. It doesn't affect this though...
– Murwa
Nov 15 '18 at 10:44
1
Ok. Can you share your code?
– Anand Raj
Nov 15 '18 at 10:48