Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing cookies of a particular instance or domain does not work #2418

Open
2 tasks done
Rishi-Goyal opened this issue Nov 15, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@Rishi-Goyal
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

// delete a cookie
await cookieManager.deleteCookie(url: url, name: "myCookie");

// delete cookies
await cookieManager.deleteCookies(url: url, domain: ".flutter.dev");

I used both of these and have not been able to achieve the clearing of the cookies from my webview instances.
Tested on both Android device and Android Emulator

Expected Behavior

Expected behavior is that on using these methods, the cookies for a particular domain should be cleared from my webview.

Steps with code example to reproduce

Steps with code example to reproduce

Future clearCookiesForSpecificUrl(String url) async {
final cookieManager = CookieManager();
final cookies =
await cookieManager.getCookies(url: WebUri.uri(Uri.parse(urlss)));
for (var cookie in cookies) {
await cookieManager.deleteCookie(
url: WebUri.uri(Uri.parse(urlss)),
name: cookie.name,
);
}
setState(() {});
  }

Stacktrace/Logs

I dont have logs of the same

Flutter version

v3.24.4

Operating System, Device-specific and/or Tool

Android 14

Plugin version

v6.0.0

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@Rishi-Goyal Rishi-Goyal added the bug Something isn't working label Nov 15, 2024
@asiteandroid
Copy link

asiteandroid commented Dec 17, 2024

@Rishi-Goyal Please provide the domain and name as follows. I hope this helps you!

Let me know if it works

await cookieManager.deleteCookie(url: url, domain: ".flutter.dev", name: "myCookie");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants