# Requests cancelling issue in WKWebView

**URL:** <https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953>\
**Category:** ionic-v3\
**Created:** [December 20, 2017, 10:23am UTC](https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953 "2017-12-20T10:23:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexfurm](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@alexfurm](https://forum.ionicframework.com/u/alexfurm)\
**Post date:** [December 20, 2017, 10:23am UTC](https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953/1 "2017-12-20T10:23:22Z")

</div>

Hi there! Ionic is a great thing - like to use it!

I’ve updated to the latest Ionic release and trying to make it work on iOS.  
I have custom implementation of oAuth 1.0 and it was working OK before i’ve updated Ionic and switched to new WKWebView (and it still works OK on Android).

So this is correct flow of requests:

1. GET Request to [https://www.example.com/admin/oauth\_authorize/confirm/?oauth\_token=4r3454534sdfsdfsdf](https://www.example.com/admin/oauth_authorize/confirm/?oauth_token=4r3454534sdfsdfsdf)

- Status: 302
- Location: [https://www.example.com/index.php/admin/Oauth/redirectStub/?oauth\_token=4r3454534sdfsdfsdf&oauth\_verifier=4r3454534324sdfsdfsdf](https://www.example.com/index.php/admin/Oauth/redirectStub/?oauth_token=4r3454534sdfsdfsdf&oauth_verifier=4r3454534324sdfsdfsdf)

1. GET Request according received location to [https://www.example.com/index.php/admin/Oauth/redirectStub/?oauth\_token=4r3454534sdfsdfsdf&oauth\_verifier=4r3454534324sdfsdfsdf](https://www.example.com/index.php/admin/Oauth/redirectStub/?oauth_token=4r3454534sdfsdfsdf&oauth_verifier=4r3454534324sdfsdfsdf)

But this is requests flow on iOS with WKWebView:

1. GET Request to [https://www.example.com/admin/oauth\_authorize/confirm/?oauth\_token=4r3454534sdfsdfsdf](https://www.example.com/admin/oauth_authorize/confirm/?oauth_token=4r3454534sdfsdfsdf)

- Error: Cancelled

1. GET Request to [https://www.example.com/admin/oauth\_authorize/?oauth\_token=4r3454534sdfsdfsdf](https://www.example.com/admin/oauth_authorize/?oauth_token=4r3454534sdfsdfsdf)

- Status: 200

So the first request is cancelled (is not sent), but i see the next request is sent after this (but i don’t send this in my app - i’m sure) - so it looks like redirect? Can’t understand what’s going on here.

FIY: Ionic version - 3.9.2. iOS Version - 11.2.

Hope somebody will help.

Regards, Nikolay

---

<div class="post-metadata">

**Author:** ![alexfurm](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@alexfurm](https://forum.ionicframework.com/u/alexfurm)\
**Post date:** [December 20, 2017, 12:59pm UTC](https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953/2 "2017-12-20T12:59:04Z")

</div>

Addition:

There is Set-Cookie header in server response, but i don’t see Cookie header in further requests in iOS App, although i see them in Android. May be this is the reason?

---

<div class="post-metadata">

**Author:** ![MattE](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/matte/32/66712_2.png) [@MattE](https://forum.ionicframework.com/u/MattE)\
**Post date:** [December 20, 2017, 2:02pm UTC](https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953/3 "2017-12-20T14:02:26Z")

</div>

I have the same issue, it’s probably related to this problem.  
The main issue is that the cookie isn’t stored when set-cookie is called.  
Only after a force quit and restart, it works for some reason

> <https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/22>

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:57pm UTC](https://forum.ionicframework.com/t/requests-cancelling-issue-in-wkwebview/115953/4 "2021-07-19T21:57:57Z")

</div>

Closed on July 19, 2021, 9:57pm UTC


