Skip to content
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

尝试多个版本程序均闪退 #32

Closed
BlackGu1tar opened this issue May 24, 2023 · 8 comments
Closed

尝试多个版本程序均闪退 #32

BlackGu1tar opened this issue May 24, 2023 · 8 comments
Labels
good first issue Good for newcomers question Further information is requested

Comments

@BlackGu1tar
Copy link

安装多个.net 6.0及以上的环境都不行,XHS-Spider从 v1.0.0.6开始直到最新版都这情况,v1.0.0.5菜单正常使用。

报错在事件查看器中如下,和这个路径有关系吗?

 at XHS.Spider.Views.Pages.Search.InitializeAsync() in G:\代码\GitHub\WPF项目\XHS-Spider\src\XHS.Spider\Views\Pages\Search.xaml.cs:line 51
错误应用程序名称: XHS.Spider.exe,版本: 1.0.0.8,时间戳: 0x63cf74d2
错误模块名称: KERNELBASE.dll,版本: 10.0.17763.134,时间戳: 0x1659a33b
异常代码: 0xe0434352
错误偏移量: 0x0000000000055299
错误进程 ID: 0xc9c4
错误应用程序启动时间: 0x01d98df18de04b37
错误应用程序路径: C:\Users\Administrator\Downloads\XHS.Spider-v1.0.0.8\XHS.Spider-v1.0.0.8\XHS.Spider.exe
错误模块路径: C:\Windows\System32\KERNELBASE.dll
报告 ID: 56be141c-0f1b-4a3a-a85b-53ca90bdefe0
错误程序包全名: 
错误程序包相对应用程序 ID: 
Application: XHS.Spider.exe
CoreCLR Version: 6.0.1623.17311
.NET Version: 6.0.16
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.Web.WebView2.Core.WebView2RuntimeNotFoundException: Couldn't find a compatible Webview2 Runtime installation to host WebViews.
 ---> System.IO.FileNotFoundException: 系统找不到指定的文件。 (0x80070002)
   --- End of inner exception stack trace ---
   at Microsoft.Web.WebView2.Core.CoreWebView2Environment.CreateAsync(String browserExecutableFolder, String userDataFolder, CoreWebView2EnvironmentOptions options)
   at Microsoft.Web.WebView2.Wpf.WebView2.<>c__DisplayClass34_0.<<EnsureCoreWebView2Async>g__Init|0>d.MoveNext()
--- End of stack trace from previous location ---
   at XHS.Spider.Views.Pages.Search.InitializeAsync() in G:\代码\GitHub\WPF项目\XHS-Spider\src\XHS.Spider\Views\Pages\Search.xaml.cs:line 51
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at XHS.Spider.App.Main()
@BlackGu1tar
Copy link
Author

应该不是系统问题,虚拟机多个win10版本系统都试了。
.net环境:
dotnet-sdk-6.0.100-win-x64
windowsdesktop-runtime-6.0.0-win-x64
windowsdesktop-runtime-6.0.16-win-x64
dotnet-sdk-6.0.408-win-x64

@xisuo67
Copy link
Owner

xisuo67 commented May 24, 2023

你的问题是因为没有webview2的运行时环境,错误提示Couldn't find a compatible Webview2 Runtime installation to host WebViews.

可查看链接,解决你的问题相关问题解决方案

webview2运行时下载

@xisuo67
Copy link
Owner

xisuo67 commented May 24, 2023

如果问题得到解决的话,记得关闭掉这个issuse哦!
@BlackGu1tar

@xisuo67 xisuo67 added the question Further information is requested label May 24, 2023
@BlackGu1tar
Copy link
Author

感谢,已解决!系统把webview精简掉了。

@RichForever888
Copy link

感谢,已解决!系统把webview精简掉了。

朋友你是怎么解决的?

@df865017
Copy link

同样的报错,问题解决,覆盖安装webview。下载链接:https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/#download-section

系统说明:win10 X64 闪退问题

1.如何查日志:
win10 搜索事件查看器,比较慢会卡一下,耐心等待。然后出来最近一条应用程序报错信息,点开。
image

2.对应报错信息一致,开始重新安装webview吧。
错误应用程序名称: XHS.Spider.exe,版本: 1.0.1.3,时间戳: 0x63cf74d2
错误模块名称: KERNELBASE.dll,版本: 10.0.19041.3086,时间戳: 0xe1ac3f79
异常代码: 0xe0434352
错误偏移量: 0x000000000002cf19
错误进程 ID: 0x20e0
错误应用程序启动时间: 0x01d9a9c9b8a42452
错误应用程序路径: C:\Users\Administrator\Downloads\XHS-Spider-v1.0.1.3\XHS-Spider-v1.0.1.3\XHS.Spider.exe
错误模块路径: C:\windows\System32\KERNELBASE.dll
报告 ID: c9e42873-30d3-4650-a4f1-aa544e6aa5b5
错误程序包全名:

下载链接:https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/#download-section

@RichForever888
Copy link

依然报错

@xisuo67 xisuo67 pinned this issue Aug 16, 2023
@xisuo67 xisuo67 added the good first issue Good for newcomers label Aug 16, 2023
@xisuo67
Copy link
Owner

xisuo67 commented Nov 24, 2023

5O7BNJIG}62JHP9@YOJF @6_tmb
安装不了的话---强力删除C:\Program Files (x86)\Microsoft文件夹,然后以管理员权限运行安装程序即可!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants