iOS - get returns empty object
See original GitHub issueI have tried get() with specific examples with and without the useWebKit variable. Each time, CookieManager has returned as an empty object, and no errors have been created. Built on react native init. No expo.
For example:
import CookieManager from '@react-native-community/cookies';
...
const getCookies = async () => {
const useWebKit = true;
try {
const cookies = await CookieManager.getAll(useWebKit);
console.log({cookies});
} catch (error) {
console.log({error});
}
};
returns {"cookies": {}}
in the console
I am using iOS ver 13.5. In package.json: “@react-native-community/cookies”: “^2.0.9”, “react-native-wkwebview-reborn”: “^2.0.0”,
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:10 (3 by maintainers)
Top Results From Across the Web
iOS Core Data executeFetchRequest is returning empty object
First, the reason that 'objects' had one row, but appeared "empty" was because that is the default behavior. Values will not be retrieved...
Read more >CookieManager.get() returns empty object iOS #164 - GitHub
I use CookieManager.get() to get them. It works fine on Android but returns empty object on iOS. Is there any ideas why it...
Read more >GET request from React to Flask sometimes returns empty object
GET request from React to Flask sometimes returns empty object. Hello! So, I sometimes get this in React from the fetch request: "[{…}] ......
Read more >[Solved]-object return empty description in iOS - appsloveworld
The problem is with your if condition. fblink is nil , you are checking nil is equal to [NSNull null] so this case...
Read more >LWC controller returns empty objects
guys! I have a problem. Every time, when I'm trying to execute quick action i see this error-message: [e.opportunity is undefined]. Can somebody ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vlerant-saiti the best way would to store the cookie in storage and set the cookie before you make the request. Would this work for you?
I had the same problem this week, in my case, I was setting an expiration with Dayjs and this caused the problem. Using the vanilla Date API fixed the issue.