btpf / Alexandria

A minimalistic cross-platform eBook reader built with Tauri, Epub.js, and Typescript
GNU General Public License v3.0
2.07k stars 42 forks source link

Crashes on launch on windows 10 #24

Closed forswearadidas closed 6 months ago

forswearadidas commented 6 months ago

I am having the issue with latest (0.11.2version) in windows 10 pro 22h2. When i start the application it just crashes show the icon and then gone.

Used the latest setup and msi installer and portable version all crashes on start of application

Same issue duplicate - https://github.com/btpf/Alexandria/issues/3 sharing because it is happening with me now with new version

btpf commented 6 months ago

Hi, Did you update from an older version or is this your first time trying to run the software?

https://drive.google.com/file/d/13IC7bQxRh6nkv8D1RZEIubLTfA_Bn1Be/view?usp=sharing

Please extract that zip and run both of those bat files. Post the logs named alexandria_logs_errors.txt and alexandria_logs.txt here Thanks.

forswearadidas commented 6 months ago

Hi,

I installed the software first time.

I tried to debug by running the both bat file. It created the txt file but both are blanks text file no logs in them.

Still i am attaching will be no use alexandria_logs.txt alexandria_logs_errors.txt

btpf commented 6 months ago

So I tested on windows 10 21h2, and could not replicate your issue. Not the crashing or the empty logs.

The empty logs make me think the issue is not related to Alexandria, but instead something lower level like tauri or your specific system being broken. This is because one of the first thing Alexandria does on start is write to the console/log.

Maybe try checking the event viewer and see if anything shows up https://github.com/btpf/Alexandria/issues/3#issuecomment-1697514945

By any chance: Is Edge installed your computer? Have you ever run debloating scripts at some point?

Thanks

forswearadidas commented 6 months ago

Hi sorry for late reply

The issue was from my side and due to not having edgewebview2 or edge installed in my system. I was able to get the debug error from SysinternalsSuite's tool Dbgview.exe

Image is attached and 98 was the issue debug info image

Now i have installed the edgewebview2 on my system and it working fine as expected.

Thanks for this software

btpf commented 6 months ago

WebView2 : "Failed to find an installed WebView2 runtime or non-stable Microsoft Edge installation."

Interesting that Tauri failed to detect this, as it should have handled the installation of edgewebview2 on it's own.

https://tauri.app/v1/references/webview-versions/

On versions older than Windows 11 the installer generated by Tauri takes care of ensuring WebView2 is installed on the system.

https://tauri.app/v1/guides/building/windows/#webview2-installation-options

The installers by default download the WebView2 bootstrapper and executes it if the runtime is not installed ... On Windows 10 (April 2018 release or later) and Windows 11, the WebView2 runtime is distributed as part of the operating system.

Debloating probably left over registry keys which pass the bootstrapper check. https://github.com/tauri-apps/tauri/blob/dev/tooling/bundler/src/bundle/windows/templates/main.wxs#L253-L256

Regardless, I'm glad to hear its working now.

Notes To Self

From the Tauri Discord:

portable Exes do not run the bootstrapper https://discord.com/channels/616186924390023171/1105468421270945882/1105542776101294210

Checking if edge is installed, and if not, installing it: https://discord.com/channels/616186924390023171/731495028677148753/865979260166209576

https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution https://developer.microsoft.com/en-us/microsoft-edge/webview2?form=MA13LH#download-section