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

Crash on Help -> About - v4.6.0 #497

Closed
2 of 7 tasks
dreamsyntax opened this issue Dec 17, 2023 · 5 comments
Closed
2 of 7 tasks

Crash on Help -> About - v4.6.0 #497

dreamsyntax opened this issue Dec 17, 2023 · 5 comments
Assignees
Labels
status:confirmed Issues that could be reproduced status:patch-released Patched in current stable release type:bug Something isn't working

Comments

@dreamsyntax
Copy link

dreamsyntax commented Dec 17, 2023

Acknowledgements

  • I have checked that there is no other issue describing the same or
    similar problem that I currently have, regardless if it has been
    closed or open.

  • This bug affects Discord website.

  • This issue is confirmed to be reproducible when WebCord is packaged
    on at least all three latest supported Electron major releases.

  • This issue is reproducible in Chrome, Chromium or any
    Chromium-based browser, e.g Brave or Edge (please write in
    Additional Context which browser you have used if it is neither
    Chrome nor unmodified Chromium).

  • There are no fixes done to master which resolves this issue.

  • My issue describes one of the unstable and/or not fully implemented
    features.

  • I have found a workaround to mitigate or temporarily fix this issue
    in affected releases (please write it in Additional context section
    below).

Operating System / Platform

🪟️ Windows
&
🐧 Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

18 - per release notes (unable to see in about)

Application version

v4.6.0

Bug description

Reproduce steps (Windows):

  • Unzip WebCord-win32-x64-4.6.0.zip
  • Run webcord.exe
  • Click Help in the menubar and then About

The program will either crash, or a blank about dialog will appear and constantly spam reloading state.

Confirmed this is not unique to Windows, also happens in arch linux (used AUR webcord-bin)

Additional context

Video of the case when the program does not crash
https://github.com/SpacingBat3/WebCord/assets/14857235/fbbfa84c-11f2-4d9d-b166-b49b9018c70a

@dreamsyntax dreamsyntax added the type:bug Something isn't working label Dec 17, 2023
@dreamsyntax dreamsyntax changed the title Crash on Help -> About on Windows for 4.6.0 Crash on Help -> About - v4.6.0 Dec 17, 2023
@SpiritOTHawk
Copy link

Confirm

@SpacingBat3
Copy link
Owner

SpacingBat3 commented Dec 17, 2023

Info from the DevTools console of the blank window (not from window that displays Discord interface, you should be able to go to DevTools with Ctrl+i once the correct window is in foreground/selected) or logs in the regular console if it crashes at main process?

@SpacingBat3 SpacingBat3 added the status:need-info Further information is requested label Dec 17, 2023
@dreamsyntax
Copy link
Author

dreamsyntax commented Dec 18, 2023

Info from the DevTools console of the blank window (not from window that displays Discord interface, you should be able to go to DevTools with Ctrl+i once the correct window is in foreground/selected) or logs in the regular console if it crashes at main process?

All I see is
AppCrashedFatalReport: getLastCrash not supported. in dev tools (ctrl+shift+i after enabling developer mode in File->settings) in case when it full crashes

If I launch in cli and click about

$ webcord
[WebSocket] Listening at port 6463.
[UPDATE] Application is up-to-date!
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
[WC_9:139] crashed
Crash count exceeded (>10), relaunching in safe mode...

If you are asking me to open the dev tools on the About window itself, I have not had luck getting it to appear like in the video, most of the time the crash loop happens without it ever opening.

@SpacingBat3
Copy link
Owner

So the renderer crashes... And I think why.

The problem is, I think I might be using the import() in the About window's preload script – and that import() is for Chromium context than Node's. I mean, Node16 kinda adds the import() to use ESM right now, and ESM was, well... kinda problematic for a long time in Electron and even right now it has its own quirks that developers shall be aware of.

I'll have to check the code and rewrite it so no import() statements are there. For now, I'm not confirming the issue until I'll test it or approach fixing.

@SpacingBat3 SpacingBat3 removed the status:need-info Further information is requested label Dec 18, 2023
@SpacingBat3
Copy link
Owner

Just tested this and can confirm. 99.99% the issue caused by me forgetting to prepare preloads and remove import().

@SpacingBat3 SpacingBat3 added the status:confirmed Issues that could be reproduced label Dec 18, 2023
@SpacingBat3 SpacingBat3 added the status:patch-released Patched in current stable release label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed Issues that could be reproduced status:patch-released Patched in current stable release type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants