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

WebView Cookies not working #12896

Closed
jmezach opened this issue Jan 25, 2023 · 4 comments · Fixed by #13736
Closed

WebView Cookies not working #12896

jmezach opened this issue Jan 25, 2023 · 4 comments · Fixed by #13736

Comments

@jmezach
Copy link

jmezach commented Jan 25, 2023

Description

I'm trying to set some cookies that I have gotten through an HttpClient onto a WebView so that it will send those along. However, this doesn't seem to work at all, both on iOS and Android. I've followed the documentation, but from what I can see the cookies are never being sent. I also noticed this TODO into code, which leads me to believe that this feature hasn't been implemented yet. But the docs seem to state that it is, so I'm a bit confused right now.

Steps to Reproduce

  1. Add a WebView control to a page
  2. Create a CookieContainer instance and add some cookies to it for a specific URL
  3. Set the CookieContainer instance on the Cookies property of the WebView
  4. Set the Source property on the WebView control to an instance of UrlWebViewSource with the same URL used in step 2.
  5. Navigation to the page fails because it requires those cookies
  6. I also don't see the cookies anywhere in the Safari or Edge Developer Tools connected to the WebView on the simulator

Link to public reproduction project repository

https://github.com/jmezach/MAUICookieBased

Version with bug

7.0 (current)

Last version that worked well

7.0 (current)

Affected platforms

iOS, Android

Affected platform versions

Android API 33, iOS 16.2

Did you find any workaround?

Perhaps I could drop down to the native platform API's to set up the cookies outside of MAUI, but I haven't tried this yet. I wanted to try using the MAUI API's though because in a previous experiment I was able to get this working on Android, but not on IOS using the native API's, so I was wondering if MAUI fixed that somehow.

Relevant log output

No response

@jmezach jmezach added the t/bug Something isn't working label Jan 25, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jan 25, 2023
@PureWeen PureWeen added this to the Backlog milestone Jan 25, 2023
@ghost
Copy link

ghost commented Jan 25, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@rmarinho
Copy link
Member

Maybe related #3901

@mhrastegari
Copy link

Hey @jsuarezruiz thank you for the fix! 🥰
Will this be ported to .NET 7 too?

@ghost
Copy link

ghost commented May 6, 2023

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

@samhouts samhouts modified the milestones: Backlog, .NET 8 May 24, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants