RTK / cordova-cookie-emperor

MIT License
13 stars 17 forks source link

Plugin not working with cordova-ios 6.1.0 #5

Open drogerie21 opened 4 years ago

drogerie21 commented 4 years ago

This plugin is not working anymore since cordova 6.1.0 (probably cordova-ios 6.0.0 too). Always getting the error: "No cookie found"

RTK commented 4 years ago

I think it may be the case because cordova-ios removed the usage of UIWebview an forces the WKWebview now. Can you confirm, that you have used the UIWebview before?

Furthermore, as stated here https://stackoverflow.com/questions/33156567/getting-all-cookies-from-wkwebview, the access to cookies should work the same way but values may be added delayed. Can you confirm, that the expected cookies are added sometime after?

drogerie21 commented 4 years ago

No, we have used the WKWebview before. What do you mean that values may be added delayed? We waited a couple of seconds, but the cookies could not be found...

drogerie21 commented 4 years ago

This is most probably a problem with the new release of the inappbrowser (and cordova-ios in turn only works with the new inappbrowser 4.0.0). We are trying to get cookies that are set by preauth-site, that is opened by the inappbrowser. See: https://github.com/apache/cordova-plugin-inappbrowser/issues/753

RTK commented 4 years ago

So it comes down to the InAppBrowser plugin for iOS not writing cookies into the main Cordova-webview? If so, then this plugin works correctly? Unfortunately I cannot see a solution as long as there are multiple WKWebview instances involved which do not share their cookies.

drogerie21 commented 4 years ago

No, we have used the WKWebview before.

Hi again. We checked again and we found that the inAppBrowser-Plugin has used the UIWebview before (we didn´t know that you can configure this and assumed that the plugin uses the WKWebview too). The new InAppBrowser-Plugin (4.0.0) drops support for the UIWebview. If we configure the inAppBrowser-Plugin do use the WKWebview we cannot get the cookies even with cordova-ios 5.1.1. Do you know if there are any chances to get the Cookies from a third party service (so cross origin) within a wkwebview scenario?

ChrisTomAlx commented 3 years ago

any luck with this issue? I am facing a similar problem