You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having a strange issue on Android, with Ionic 5: it seems like most of the time (not always) our session cookies "disappear" after the app is restarted.
We have tested and observed this behaviour on several different android devices, so it's not device-specific. Also (as said above, it does work sometimes, which is especially strange...)
To make sure it's not caused by any other plugins, I have started a new blank Ionic 5 app with cordova. Then added only a little bit of code to:
authenticate by http request to /auth endpoint --> sets sessions cookies from response
fetch some data by calling an endpoint with withCredentials: true
Observed behaviour:
install app
launch app
authenticate (session cookies get attached to domain with Max-Age properly set)
fetch data (withCredentials: true) --> SUCCESS
can make authenticated calls all day long... works every time
close app
launch app again
fetch data (withCredentials: true) --> FAILS, because session cookies were missing
Version info:
Ionic 5.3.2
cordova-android: 9.0.0
cordova-plugin-ionic-webview: 5.0.0 (also tested with 4.2.1 --> seems to make no difference)
I could upload a "clean" project which can be used for testing/debugging if that helps...
The text was updated successfully, but these errors were encountered:
I have figured out the problem: it seems there is a 30 second timer on the sync process between WebView and CookieManager on android. We can solve this by manually flushing the CookieManager on android level.
Solution can be found here: apache/cordova-android#802 (comment).
We are having a strange issue on Android, with Ionic 5: it seems like most of the time (not always) our session cookies "disappear" after the app is restarted.
We have tested and observed this behaviour on several different android devices, so it's not device-specific. Also (as said above, it does work sometimes, which is especially strange...)
To make sure it's not caused by any other plugins, I have started a new blank Ionic 5 app with cordova. Then added only a little bit of code to:
withCredentials: true
Observed behaviour:
withCredentials: true
) --> SUCCESSwithCredentials: true
) --> FAILS, because session cookies were missingVersion info:
I could upload a "clean" project which can be used for testing/debugging if that helps...
The text was updated successfully, but these errors were encountered: