-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[bug] WebviewWindowBuilder.data_store_identifier crashes #12843
Comments
So this could be an issue that's new with macOS 15? Or I need a better example? |
i don't think it's about the macos version. either it never worked or it's related to the objc2 (the objective-c rust bindings) updates 🤔 |
New example based with wry: use tao::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
};
use wry::{
WebViewBuilder,
};
#[cfg(target_os = "macos")]
fn main() -> wry::Result<()> {
use wry::WebViewBuilderExtDarwin;
let event_loop = EventLoop::new();
let window = WindowBuilder::new().build(&event_loop).unwrap();
let builder = WebViewBuilder::new()
.with_data_store_identifier([0; 16])
// tell the webview to load the custom protocol
.with_url("about:blank");
let _w = builder.build(&window)?;
event_loop.run(move |event, _, control_flow| {
*control_flow = ControlFlow::Wait;
if let Event::WindowEvent {
event: WindowEvent::CloseRequested,
..
} = event
{
*control_flow = ControlFlow::Exit
}
});
}
|
documentation of
so I enabled the feature, but then I got a crash with even less information:
|
use objc2::MainThreadMarker;
use objc2_foundation::NSUUID;
use objc2_web_kit::WKWebsiteDataStore;
fn main() {
let mtm = MainThreadMarker::new().unwrap();
let bytes = NSUUID::new().as_bytes();
println!("{bytes:?}");
let identifier = NSUUID::from_bytes(bytes);
unsafe {
WKWebsiteDataStore::dataStoreForIdentifier(&identifier, mtm);
}
} works, when |
I'll make a pr soon, I'll combine it with adding two missing apis (get all data store ids, delete data store by id) that I need. |
Describe the bug
likely a bug in wry, I'll investigate it soon.
Reproduction
you need to be on macOS as this feature is apple/WKWebview specific.
Expected behavior
no crash
Full
tauri info
outputStack trace
Additional context
No response
The text was updated successfully, but these errors were encountered: