KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
530 stars 69 forks source link

Failed to load url error in compose desktop #85

Closed amrmsaraya closed 10 months ago

amrmsaraya commented 10 months ago

For a compose desktop application i get this error in state.errorsForCurrentRequest using the code sample in the README.desktop.md ERR_ABORTED), WebViewError(code=-3, description=Failed to load url: https://github.com)

Thanks for your efforts for this great library

KevinnZou commented 10 months ago

@amrmsaraya Thank you for your feedback! Which platform are you using? Have you followed the steps in README.desktop.md? If you have, could you please provide the code on setting up the WebView? You can refer to BasicWebViewSample as a reference.

amrmsaraya commented 10 months ago

Thanks @KevinnZou for the fast response. actually i figured out the problem after using BasicWebViewSample as a reference like you said. The problem was that i was creating the WebViewState before KCEF is intialized even if i don't call the WebView composable until it's initilaized. So all i needed to do is creating the WebViewState after KCEF has been initialized.

Sorry for the inconvenience.