cookies icon indicating copy to clipboard operation
cookies copied to clipboard

SetFromRespose not working on Android

Open niloufarMakhzani opened this issue 4 years ago • 4 comments

I'm using cookieManager to get cookies and store them, Then I want to set them back to my Url. Here is my code which is working perfect on iOS but when I setFromResponse on Android it doesn't work properly!

Here is my code:

componentDidMount() { AsyncStorage.getItem('cookie') .then(d => { if (d) { CookieManager.setFromResponse( baseUrl, d, ).finally(() => this.setState({loading: false})); } }) .finally(() => this.setState({loading: false})); } onMessage = ({nativeEvent: {data}}) => { if (data.includes('user-login')) { AsyncStorage.setItem('cookie', data); CookieManager.setFromResponse(baseUrl, data) .then( console.log.bind( 'Done', ), ) .catch(console.log.bind(console, 'Failed')); } };

niloufarMakhzani avatar Apr 27 '20 05:04 niloufarMakhzani

Having the same issue

smakosh avatar Jul 02 '20 07:07 smakosh

3.0.0 +1 CookieManager.setFromResponse(passURL,"JSESSIONID=84ECF11A0FE5A973A57DAEEBF12ADBE9; Path=/; HttpOnly, rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Wed, 08-Jul-2020 06:11:02 GMT")

Mad-hu avatar Jul 09 '20 05:07 Mad-hu

Works when debugging is turned on

smakosh avatar Jul 09 '20 09:07 smakosh

Is there any updates on this issue? Debugging turned off or on same result. Is there work in progress on this issue?

AndriySikora avatar Nov 03 '20 11:11 AndriySikora