vladimiry / ElectronMail

Unofficial ProtonMail Desktop App
GNU General Public License v3.0
1.51k stars 99 forks source link

App crashes often. #696

Open GoldenGlimpse opened 1 month ago

GoldenGlimpse commented 1 month ago

The app crashes when trying to upload to drive. Or trying to open Calendar from right side pane.

Reproduce: Upload a file --> crash. or Click on Calendar in right side pane --> crash.

Error:

Unhandled Promise Rejection
Error: Failed to resolve file system resource directory from the "webclient://calendar.proton.me/mail" request
    at resolveFileSystemResourceLocation (/opt/ElectronMail/resources/app.asar/app/electron-main/index.cjs:76421:57)
    at AsyncFunction.<anonymous> (/opt/ElectronMail/resources/app.asar/app/electron-main/index.cjs:76455:42)

Version: ElectronMail v5.2.3 System: Linux Mint 21.3, Ubuntu 22.04 jammy.

vladimiry commented 1 month ago

Or trying to open Calendar from right side pane.

This is not supposed to work in the app, see the pinned #579. I should consider cutting out the related icon from the right panel to reduce confusion.

The app crashes when trying to upload to drive.

Could not reproduce on a short plain text file, but will try again later on something bigger. More details from you regarding file size/type might help with issue reproduction.

GoldenGlimpse commented 1 month ago

It happens pretty much with any file. I tried uploading a plain 10mb mp3 file. It uploads, it finishes, and 3 seconds later the app crashes with the same error box. Even tested with a 14kb docx file, same thing.

This is not supposed to work in the app,

I know about the calendar, but it used to show a blank error page. Now the app crashes and i have to reopen Electron and log back in.

Also tested uploading an empty 0kb file. Same thing, 3 sec, crash.

Two error boxes pop up: 1: https://i.postimg.cc/j5xcVTKB/screenshot-1.png 2: https://i.postimg.cc/mkhSDSPw/screenshot-1.png

Unable to copy the text from the second box.

vladimiry commented 1 month ago

Thanks for more info. The error occurs during /api/data/v1/metrics API fetch call, so I guess all the calls to this API will be triggering app crash. A brief look into it, aside from the Drive, also revealed some more /api/data/v1/metrics API uses in Account app during the signup flow, so I guess it might be impossible to create the account in the app (I didn't test the case yet). There were a bunch of redirection/resource-resolving errors I handled by patching, but this one I missed to notice.

PS, just uploaded ~10MB mp3 without any errors/crashes, so far. Also running Linux.

vladimiry commented 3 weeks ago

Can you test the build shared in https://github.com/vladimiry/ElectronMail/issues/694#issuecomment-2400871180? It comes with up-to-date Drive web client, and so maybe it gets better in some way.

I should consider cutting out the related icon from the right panel to reduce confusion.

Done in that build, by the way.