vrchat-community / creator-companion

The Entry Point for Making Things in VRChat
https://vrchat.com/home/download
54 stars 371 forks source link

[BUG] VCC Crashes if webview2 isn't installed #365

Closed FairplexVR closed 9 months ago

FairplexVR commented 9 months ago

Describe the bug

VCC needs webview2 in order to work as it's based on a Web UI. But will unexpectedly fail to open without webview2 runtime and provide no solution to the end user.

To Reproduce

  1. Uninstall webview2
  2. Launch VCC

Expected behavior

VCC should notify the user when it fails to deploy the webview2 runtime. It could then either automatically handle the webview2 installation with the webview2 Bootstrapper from Microsoft or invite the user to manually install webview2.

Screenshots

VCC

Related Product

VCC (VRChat Creator Companion)

Product Version

2.1.4

OS

Windows 11

Additional context

No response

orels1 commented 9 months ago

How exactly did you remove WebView from the system?

We do have a prompt to install WebView 2 if it is not available, but we have seen that some ways of removing edge from the system also break that behaviour, reporting that it is installed while it isn't.

orels1 commented 9 months ago

If you can check that either of those Registry keys are defined on your machine and if so - have a non-0.0.0.0 version - I would appreciate it!

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}

HKEY_CURRENT_USER\Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}
FairplexVR commented 9 months ago

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients{F30172 Screenshot_1

HKEY_CURRENT_USER\Software\Microsoft\EdgeUpdate\Clients{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5} Screenshot_13 Edit: after manually installing webview2

I have to mention that my PC has been debloated and Edge removed with WinUtils: https://github.com/ChrisTitusTech/winutil. In the section Misc Tweaks, you can Remove Microsoft Edge, this will also remove webview2

I know it's an edge case and not everybody debloat their computer, but doing it will prevent VCC to launch correctly without any error.

orels1 commented 9 months ago

@Fairpl3x seems like that way of removing Edge doesn't remove its registry entry, which will cause our detection to fail to recognize that there isn't one installed.

Those registry entries above are how MS tells you to check if WebView2 is available before prompting for installation, so I suppose we'll need to find other ways

orels1 commented 9 months ago

Seems like VCC is not the only one affected by those registry leftovers: https://github.com/ChrisTitusTech/winutil/issues/1075

orels1 commented 9 months ago

Based on this comment in this thread, this cleanup tool going forward will not be removing the WebView2: https://github.com/ChrisTitusTech/winutil/issues/1075#issuecomment-1750861402

FairplexVR commented 9 months ago

Based on this comment in this thread, this cleanup tool going forward will not be removing the WebView2: ChrisTitusTech/winutil#1075 (comment)

Oh I didn't know that. Well I think it's fair and maybe the actual detection through registry key is actually good.