You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/02 03:51:31 UTC

[GitHub] [cordova-ios] nickredding opened a new issue #931: document.cookie non functional in ios 6.0.0/6.1.0

nickredding opened a new issue #931:
URL: https://github.com/apache/cordova-ios/issues/931


   # Bug Report
   
   Using
   
   ```
   <preference name="scheme" value="app" />
   <preference name="hostname" value="localhost" />
   ```
   
   renders document.cookie completely non-functional.
   
   ### What is expected to happen?
   
   To see this just do
   
   ```
   cordova create myApp org.apache.cordova.myApp myApp
   cd myApp
   (add scheme and hostname preferences to config.xml)
   cordova platform add ios@^6.1.0
   ```
   
   Now load myApp into the emulator from xcode, then go to the Safari web inspector and try
   
   ```
   document.cookie="foo=bar"
   document.cookie
   ```
   
   Result is empty string.
   
   Removing the scheme and hostname preferences enables document.cookie, but then you don't have the benefit of the scheme.
   
   With ios 5 I used cordova-plugin-wkwebview-file-xhr to enable loading both local and remote urls, and cordova-plugin-wkwebviewxhrfix to enable Javascript trap information to be passed to my code.
   
   With ios 6.1.0 I am still using cordova-plugin-wkwebview-file-xhr  (I just removed the dependency on the wkwebview plugin) and this removes the need for the scheme and hostname preferences. However, the scheme and hostname preferences are necessary for Javascript trap information to be passed to my code (other people have commented that cordova-plugin-wkwebviewxhrfix is not compatible with ios 6.0.0).
   
   ### Command or Code
   See above
   
   ### Environment, Platform, Device
   Mac Mini, iPhone 11 xcode simulator
   
   ### Version information
   Cordova 9.0.0, Cordova ios 6.1.0, xcode 11.5
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] adamdport edited a comment on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
adamdport edited a comment on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-785201620


   For those arriving here from google, I'd encourage you to share some votes/contributions/testing to the following:
   
   - Apple's issue: https://bugs.webkit.org/show_bug.cgi?id=213510
   - Niklas Merz's plugin, which bypasses WkWebView's native xhr handling: https://github.com/GEDYSIntraWare/cordova-plugin-webview-proxy


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] derMani commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
derMani commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-656121200


   I can confirm this.
   
   document.cookie = 'test' 
   
   will be ignored with cordova-ios@6.0.0 or 6.1.0 
   
   Additionally, server cookies within the response won't be set.
   
   This is most probably related to WKWebview and seems to be some kind of Safari failure. 
   
   
   > Whats also interesting the new release of Safari 13.1 for Mac has the following in release notes:
   > 
   > New Features
   > - Prevented several potential approaches to circumventing Intelligent Tracking Prevention.
   > - Added cookie blocking for all cross-site resources by default.
   > 
   > Since then a CORS test that works in all other browsers stopped working on Safari for Mac as well.
   
   Source:
   https://bugs.webkit.org/show_bug.cgi?id=140205 
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] ardabeyazoglu edited a comment on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
ardabeyazoglu edited a comment on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-700599026


   the only way cross-site server set cookies work now is to keep "hostname" empty. With the following config, i can send xhr requests to anywhere with cookies working. (I am not using ionic)
   
   ```
   <preference name="scheme" value="app" />
   <preference name="hostname" value="" />
   ```
   
   Using document.cookie still not working though.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] nickredding commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
nickredding commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-690396904


   Re: cookie emperor. I can't see any reason why this plugin would stop working with iOS 6.1.0. Most likely you are supplying the wrong url or path. Are you setting scheme and hostname? Are you trying to use document.cookie in conjunction with cookie emperor? More information would be useful if you want some suggestions on how to deal with this.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] iwan-uschka commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
iwan-uschka commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-662350088


   Before switching to `cordova-ios@6` i used https://github.com/RTK/cordova-cookie-emperor for handling cookies. Just mentioning that this doesn't seem to work anymore.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] nickredding commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
nickredding commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-691146122






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] adamdport commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
adamdport commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-785201620


   For those arriving here from google, I'd encourage you to share some votes/contributions/testing to the following:
   
   Apple's issue: https://bugs.webkit.org/show_bug.cgi?id=213510
   Niklas Merz's plugin, which bypasses WkWebView's native xhr handling: https://github.com/GEDYSIntraWare/cordova-plugin-webview-proxy


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] drogerie21 commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
drogerie21 commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-690930160






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] ardabeyazoglu commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
ardabeyazoglu commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-700599026


   @drogerie21 @nickredding the only way cross-site server set cookies work now is to keep "hostname" empty. With the following config, i can send xhr requests to anywhere with cookies working. (I am not using ionic)
   
   ```
   <preference name="scheme" value="app" />
   <preference name="hostname" value="" />


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] drogerie21 commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
drogerie21 commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-690289302


   We also used the cookie emperor plugin and can confirm that with cordova 6.1.0 this plugin is not working anymore.
   We need this really bad. Does anyone has an alternative solution to get cookies? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] nickredding commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
nickredding commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-691146122


   > Of course, more information: Our app wants to get cookies that are set by a pre-authentication service. So here comes crossdomain into play. Retrieving cookies with the cookie emperor plugin works with cordova 5.1.1 but not with cordova-ios 6.1.1.
   
   Actually, I am asking for some technical information.
   --Were you using the WKWebView plugin with iOS 5 or the standard UIWebView?
   --I assume you are using the wkwebview-file-xhr plugin. If not, are you setting the CORS header from your server to enable cross-origin requests?
   --Are you setting "secure; samesite=None" when  you set cookies on your server and app?
   --Are you using an external authentication service, and if so is that service setting "secure; samesite=None" for the cookies it sends?
   --Is you app origin app://localhost or file:// ?
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] nickredding commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
nickredding commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-693152517


   > Hi,
   > 
   > 1. We are using the WKWebView and have been using WKWebView before (through plugin cordova-plugin-ionic-webview)
   > 2. We are using the advanced-http-request plugin (https://github.com/silkimen/cordova-plugin-advanced-http), so no use for wkwebview-file-xhr plugin
   > 3. No.
   > 4. " samesite=None" was not set. But setting it does not change anything.
   > 5. ionic://localhost, we are using the plugin cordova-plugin-ionic-webview
   
   I suspect the issue is with the other plugins you mention. I have cookie code very similar to cookie emperor and there is no problem with iOS 6.0.0


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] victorvhpg commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
victorvhpg commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-815343701


   please fix these bugs.
   ios 14  cordova ios 6+ dont store/send cookies 
   we use aws load balance that only use cookies for "sticky session feature" 
   we need cookies to bind a user's session to a specific instance ([aws load balance](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/sticky-sessions.html)) "sticky session feature"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] drogerie21 commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
drogerie21 commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-690930160


   Of course, more information: Our app wants to get cookies that are set by a pre-authentication service. So here comes crossdomain into play. Retrieving cookies with the cookie emperor plugin works with cordova 5.1.1 but not with cordova-ios 6.1.1.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] drogerie21 commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
drogerie21 commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-690930160






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] drogerie21 commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
drogerie21 commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-691899886


   Hi, 
   
   1) We are using the WKWebView and have been using WKWebView before (through plugin cordova-plugin-ionic-webview) 
   2) We are using the advanced-http-request plugin (https://github.com/silkimen/cordova-plugin-advanced-http), so no use for wkwebview-file-xhr plugin
   3) No.
   4) " samesite=None" was not set. But setting it does not change anything.
   5) ionic://localhost, we are using the plugin cordova-plugin-ionic-webview
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] iwan-uschka commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
iwan-uschka commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-716743999


   `cordova-plugin-wkwebview-file-xhr` has been updated to version 3.0.0 on 28th of September. See https://github.com/apache/cordova-ios/issues/883#issuecomment-689646840.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] nickredding commented on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
nickredding commented on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-691146122






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] derMani edited a comment on issue #931: document.cookie non functional in ios 6.0.0/6.1.0

Posted by GitBox <gi...@apache.org>.
derMani edited a comment on issue #931:
URL: https://github.com/apache/cordova-ios/issues/931#issuecomment-656121200


   I can confirm this.
   
   document.cookie = 'test' 
   
   will be ignored with cordova-ios@6.0.0 or 6.1.0 
   
   Additionally, server cookies within the response won't be set.
   
   The last behaviour is most likely related to WKWebview and seems to be some kind of Safari "feature". 
   
   
   > Whats also interesting the new release of Safari 13.1 for Mac has the following in release notes:
   > 
   > New Features
   > - Prevented several potential approaches to circumventing Intelligent Tracking Prevention.
   > - Added cookie blocking for all cross-site resources by default.
   > 
   > Since then a CORS test that works in all other browsers stopped working on Safari for Mac as well.
   
   Source:
   https://bugs.webkit.org/show_bug.cgi?id=140205 
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org