Comments (11)
Ah, got it
C:\Users\1234>[2024-06-30T23:19:39Z DEBUG vibe_desktop] Vibe App Running [2024-06-30T23:19:39Z ERROR tauri_runtime_wry] failed to create webview: WebView2 error: WindowsError(Error { code: HRESULT(0x80004002), message: "No such interface supported" }) [2024-06-30T23:19:39Z DEBUG vibe_desktop::setup] webview version: 100.0.1185.36 [2024-06-30T23:19:39Z DEBUG vibe_desktop::setup] CPU Features: AVX: true AVX2: true AVX512: true AVX512-VBMI: true AVX512-VNNI: true FMA: true F16C: true [2024-06-30T23:19:39Z DEBUG vibe_desktop::setup] COMMIT_HASH: cc1bb4f721a794c58081b139e57808c6ec8e00a5
Looking at this, it seems like the failed to create webview
error happened before WebviewWindowBuilder::build
, presumably before the whole setup function, and that probably explained why the panic hook didn't work
It seems like it's creating windows before setup hook which should be from config files but I don't see any windows from your config files, pretty strange
from tauri.
Yes, with webview_version
from tauri.
Seems like we use ICoreWebView2Environment10
which requires 101+ to support setting incognito mode, maybe we can skip that cast if we don't use incognito
?
https://github.com/tauri-apps/wry/blob/f9e6bcc032369c6d5e7ce0284406953a16da3d82/src/webview2/mod.rs#L330-L331
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2environment10?view=webview2-1.0.2478.35
https://learn.microsoft.com/en-us/microsoft-edge/webview2/release-notes/archive?tabs=dotnetcsharp#10121039
Seems like this is also when theme API gets added, probably could document when it's added and skip it instead of returning error for unsupported platforms
Let me catch such errors
I might be wrong but looks like you're using expect
here?
from tauri.
I might be wrong but looks like you're using
expect
here?
Let me catch such errors. currently I don't get anything from it. I even have a panic hook, but it doesn't kick in since seems like the event loop just keep runing.
from tauri.
I don't quite get it to be honest, expect
will panic the thread on error, if you want to handle the error you can just use the returned Result
from it or do you mean it's crashing at somewhere else?
from tauri.
I don't quite get it to be honest,
expect
will panic the thread on error, if you want to handle the error you can just use the returnedResult
from it or do you mean it's crashing at somewhere else?
Sorry, I should have explained it better. Even though I'm using expect
, it never gets there. Like I said, if the webview fails to start (like with an old version), tauri logs the error, but expect
isn't hit, and the event loop just keeps running. Hope that makes more sense!
from tauri.
and that probably explained why the panic hook didn't work
In addition the process kept running (the process was still listed in task manager)
from tauri.
Is it possible to also detect an outdated webview version and ask the user to update?
from tauri.
Looking at the failed part
tauri/core/tauri-runtime-wry/src/lib.rs
Lines 3267 to 3295 in 88552d6
Probably because we sent the window creation to the main thread and executed there, and you can't really handle that error, this is similar to other functions that needs to be executed on the main thread, you can't catch errors for those functions either
Not sure if it's worth it to send the error back
from tauri.
Not sure if it's worth it to send the error back
In case of error there the process will keep running normal without showing anything to the user and it's hard to debug it in production.
I also have panic hook that write to log but it won't was write either.
The only way I could understand the issue in production is telling the user to enable logs (tracing+tracing_subscriber), restart the cumputer and then copy for me
from tauri.
I also have panic hook that write to log but it won't was write either.
Because it didn't panic as the code shown above
The only way I could understand the issue in production is telling the user to enable logs (tracing+tracing_subscriber), restart the cumputer and then copy for me
For my case, I'm using the log plugin and it did catch this in the log, but this is not ideal anyway to be honest
I did another PR to make wry run on webview2 version before 90, probably will mitigate this a bit more
Ideally it should never fail but in reality probably we still need some way of letting the devs to handle it
I'm not familiar with the original design of this, @lucasfernog @amrbashir, any ideas?
from tauri.
Related Issues (20)
- [feat] provide mirror option for download nsis and wix3 HOT 2
- [bug] Migration tool incorrect output for Dialog plugin.
- [bug] The MSI and NSIS installers fail to install WebView2 on Windows 7. HOT 1
- [bug] custom sign command for windows will be executed for macos / linux build
- Are http/localhost urls blocked in Android? Can I unblock them? HOT 1
- [bug] Migration tool append unnecessary createUpdaterArtifacts config
- [docs] Readme feature clarification ("localhost free") HOT 3
- [bug] cannot create webview tauri 2 HOT 3
- [feat] set window background color HOT 1
- Quit and Close menu items do not trigger RunEvents if window was created using WindowBuilder
- [bug] [v2] Drag and drop events with `unstable` feature do not fire. HOT 1
- tauri build fails at appimage.sh [bug] HOT 1
- [bug] V2: Can't resize devtools sometimes on macOS
- Adding import for api/window causes vite desktop app not to initialize
- [bug] the message sent by channel can not be traced by vue HOT 2
- [feat] Some additional setting need to add, to work with Android TV HOT 1
- [bug] The app name displayed by windows task manager is not correct. HOT 1
- Run Compiled windows Tauri app - on windows docker
- [bug] 'IosVersionInvalid' when running 'tauri ios init' HOT 1
- [bug] PostMessage failed ; is the messages queue full? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tauri.