I'm testing my existing web extension with the new iOS version and browser.cookies.getAll({url: "https://myurl.com"})
stopped working. It returns an empty array. Is there another way to get the cookies?
Get cookies - Safari web extension iOS 18
Can you give us some more details on this and a sample extension? Feedback Assistant is the best place to report those bug details. Thanks!
I believe this might be due to the service worker going inert. Known bug since 17.5, sadly. Search the forums for others with the same issue.
Confirmed on iOS 18.0 (22A55346a)
Thi code executed in the background scope ("cookie" permission is enabled in the manifest):
> await chrome.cookies.getAll({url: 'https://www.apple.com'})
< []
Meantime, I've executed a command in the content scope on https://www.apple.com
:
> document.cookie.split(/;\s?/)
< 0 "as_dc=ucp6"
1 "mbox=session#b6e888e3d25a447494058..."
2 "s_vi=[CS]v1|33670C16F9B818C4-600015E..."
3 "at_check=true"
4 "geo=US"
5 "mk_epub=%7B%22btuid%22%3A%22mn038..."
6 "s_cc=true"
7 "s_fid=68F59610D97CF34A-21EA35105ABE..."
I am also seeing this issue, and its causing some auth related issues for our extension to break. Is there any update on this issue from the safari team?
I can confirm this bug too. browser.cookies.getAll function is not working in Safari from v 18. it only works if developer tools console is opened.
We also have this issue on macOS 15 and Safari 18, 18.0.1 and 18.1. We have made a minimal example to reproduce the issue.
https://www.icloud.com/iclouddrive/0bajlhnuQaG6T5NsFKXEB0U9Q#test%5Fcookies
I am also facing the same issue. Is there any update @Frameworks Engineer ?
Same issue here.