wry icon indicating copy to clipboard operation
wry copied to clipboard

On linux webview don't remember previous state.

Open fazibear opened this issue 1 year ago • 2 comments

Describe the bug On linux webview don't remember previous state. OSX works correctly.
Am I miss something?

Steps To Reproduce

  • checkout wry
  • change url to "https://google.com" in examples/simple
  • cargo run --example simple
  • accept/reject cookies
  • close
  • cargo run --example simple
  • need to accept/reject cookies once again

Expected behavior Remember previous state

Platform and Versions (please complete the following information): OS: Pop!_OS 24.04 LTS Rustc: rustc 1.81.0 (eeb90cda1 2024-09-04)

fazibear avatar Nov 12 '24 08:11 fazibear

Please try again after modifying the example to set a data dir via https://docs.rs/wry/latest/wry/struct.WebContext.html#method.new

on macos this is handled internally by the os, on linux and windows it has to be done manually (windows has a fallback, maybe linux doesn't save anything at all idk)

FabianLars avatar Nov 12 '24 09:11 FabianLars

Just added

  let mut context = WebContext::new(Some(PathBuf::from("/tmp/webcontext")));
  WebViewBuilder::with_web_context(&mut context);

Nothing changed. Just salt files are created in tmp folder.

fazibear avatar Nov 12 '24 10:11 fazibear