deltachat-desktop icon indicating copy to clipboard operation
deltachat-desktop copied to clipboard

Setup file crashing on Windows 8.1 & 10

Open gerryfrancis opened this issue 5 years ago • 61 comments

- Platform (linux/mac/windows): Windows 8.1 Pro (x64).

- Delta Chat Desktop Version: 0.901.0-1.34.1.

- Expected behavior: Setup starts and installs Delta Chat.

- Actual behavior: Setup starts but fails to install Delta Chat.

- Logs: From Windows Event Log (unfortunately in German): Name der fehlerhaften Anwendung: DeltaChat Setup 0.901.0.exe, Version: 0.901.0.0, Zeitstempel: 0x5a6fed7c Name des fehlerhaften Moduls: System.dll, Version: 0.0.0.0, Zeitstempel: 0x5a6fed15 Ausnahmecode: 0xc0000005 Fehleroffset: 0x00001581 ID des fehlerhaften Prozesses: 0x20f8 Startzeit der fehlerhaften Anwendung: 0x01d5b89db8f3119f Pfad der fehlerhaften Anwendung: C:\Users\PC_USER\Downloads\DeltaChat Setup 0.901.0.exe Pfad des fehlerhaften Moduls: C:\Users\PC_USER\AppData\Local\Temp\nsd4150.tmp\System.dll Berichtskennung: f7848027-2490-11ea-8357-5c514fe0a33e Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

- Comments: "DeltaChat Setup 0.900.0.exe" executes successfully, the prior version has been uninstalled.

gerryfrancis avatar Dec 22 '19 08:12 gerryfrancis

To me it seems to be some race condition: I executed the same setup file multiple times and that worked. Running Delta Chat 0.901.0 now...

gerryfrancis avatar Dec 22 '19 08:12 gerryfrancis

We don't generate the setup file ourselves. It gets generated by electron builder.

Simon-Laux avatar Dec 22 '19 13:12 Simon-Laux

Well, I did nothing to make the setup file run successfully, I just executed it several times, like starting the engine of a car, and suddenly the setup process started, showing up the progress bar. I guess further investigation is needed to find the cause. Should you need any information about my Windows system, please let me know, thanks.

gerryfrancis avatar Dec 22 '19 16:12 gerryfrancis

Did this happen too on Deltachat Setup 0.900,1.exe?

Jikstra avatar Dec 22 '19 17:12 Jikstra

@Jikstra Do you mean 0.900.1 or 0.900.0? I had the latter one installed without any problem. If you want me to do a comparison, just let me know where I can grab 0.900.1, thanks.

gerryfrancis avatar Dec 22 '19 17:12 gerryfrancis

Ah sorry, mean 0.900.0, so just the previous setup file. https://github.com/deltachat/deltachat-desktop/releases/download/v0.900.0/DeltaChat.Setup.0.900.0.exe

Jikstra avatar Dec 22 '19 17:12 Jikstra

Never mind. I just ran multiple tests with 0.900.0 and 0.901.0 and both have the very same issue. So it seems I was lucky in my first attempt of installing 0.900.0 (before 0.901.0 was released).

See https://github.com/electron-userland/electron-builder/issues/2751 as well. (Note: The exception offset is always the same, 0x00001581, so this should be the same issue.)

gerryfrancis avatar Dec 22 '19 17:12 gerryfrancis

Windows 7 and 10 seem to be affected as well, though I cannot test on such systems.

Electron Builder 20.6.0 (pre-release) addresses an identical bug: https://github.com/electron-userland/electron-builder/issues/2518

@Jikstra or @ another DC developer: Should the issue be solved with a higher version of Electron Builder, maybe you want to give it a try, compile a new Delta Chat setup file with it and send it over to me for testing, because this failure is thrown statistically in three of four tries on my system.

gerryfrancis avatar Dec 22 '19 19:12 gerryfrancis

@gerryfrancis we're using 21.2.0 so this should be fixed already

Does the portable zip file work for you?

https://github.com/deltachat/deltachat-desktop/releases/download/v0.900.0/DeltaChat.Portable.0.900.0.exe

Jikstra avatar Dec 24 '19 17:12 Jikstra

@Jikstra The portable file works, but I have to enter my login credentials with every run, which is not so neat.

FYI: Inspired by this comment https://github.com/vladimiry/ElectronMail/issues/6#issuecomment-360614994 , I copied the setup file from the "Downloads" folder of my user profile to another location ("C:\test") to execute it from there for appx. five times, and I could not reproduce the issue. Then I ran the (original) downloaded file located in the "Downloads" folder again, which resulted in an "APPCRASH" right away. So, it seems that the path or working directory of/to the executable setup file has an influence.

Merry Christmas to the whole team, you are doing a fantastic job!

gerryfrancis avatar Dec 24 '19 21:12 gerryfrancis

Gosh, I think I just nailed it...

Pre-information: In my first post, I replaced my real name inside the path of my Windows user profile to "PC_USER". My full name consists of six characters for the first, and seven for the last (sir) name, with a space character in between.

You might want to do the following test to reproduce the issue:

  1. Create a new folder named "test" in the root of "C:".
  2. Copy setup file "DeltaChat Setup 0.901.0.exe" to "C:\test".
  3. Create a new Windows user named "TestUser" (eight characters).
  4. Add Windows user "TestUser" to the "Administrators" group.
  5. Log on the newly created Windows user "TestUser". (This step creates a new Windows user profile automatically.)
  6. Copy setup file "DeltaChat Setup 0.901.0.exe" from "C:\test" to "C:\Users\TestUser\Downloads".
  7. Execute setup file from "C:\Users\TestUser\Downloads", and install/uninstall Delta Chat for at least five times (if you can).

Result: No issues.

  1. Log off Windows user "TestUser".
  2. Delete the user profile of Windows user "TestUser".
  3. Rename Windows user "TestUser" to "Testtest Useruser".
  4. Log on Windows user "Testtest Useruser". (This step creates a new Windows user profile automatically.)
  5. Copy setup file "DeltaChat Setup 0.901.0.exe" from "C:\test" to "C:\Users\Testtest Useruser\Downloads".
  6. Execute setup file from "C:\Users\Testtest Useruser\Downloads", and install/uninstall Delta Chat for at least five times (if you can).

Result: At least one "APPCRASH" occurs. (I performed three tries, and all of them failed consistently.)

My conclusion: Either the length of the full path name or a space character inside can be a huge problem for the installer.

gerryfrancis avatar Dec 24 '19 22:12 gerryfrancis

Sorry, I accidentally closed the issue by pressing the wrong button...

gerryfrancis avatar Dec 24 '19 22:12 gerryfrancis

The issue most likely will not occur with Windows 10 under Microsoft user accounts, because usually the first five characters of the mail address are applied to the user directory name (e.g.: A Microsoft user account "[email protected]" will have the profile path "C:\Users\first", considering that "C:" is the Windows OS volume.). However, earlier user profiles with longer user names might exist when the Windows OS has been upgraded to Windows 10...

gerryfrancis avatar Dec 24 '19 23:12 gerryfrancis

Still an issue in version 0.999.1.

gerryfrancis avatar Feb 03 '20 06:02 gerryfrancis

We didn't update electron builder in 0.999.1 but shortly after. I want to trigger some preview builds including a recent electron builder to see if it works for you. Probably tomorrow or the next days.

Jikstra avatar Feb 06 '20 06:02 Jikstra

Sorry, it is still an issue in version 1.0.0:

- Logs: Name der fehlerhaften Anwendung: DeltaChat-Setup-v1.0.0.exe, Version: 1.0.0.0, Zeitstempel: 0x5c157f86 Name des fehlerhaften Moduls: System.dll, Version: 0.0.0.0, Zeitstempel: 0x5c157efa Ausnahmecode: 0xc0000005 Fehleroffset: 0x00001581 ID des fehlerhaften Prozesses: 0x29d0 Startzeit der fehlerhaften Anwendung: 0x01d5ecc3cd832dfa Pfad der fehlerhaften Anwendung: C:\Users\PC_USER\Downloads\DeltaChat-Setup-v1.0.0.exe Pfad des fehlerhaften Moduls: C:\Users\PC_USER\AppData\Local\Temp\nsfFADE.tmp\System.dll Berichtskennung: 0bf48b85-58b7-11ea-8364-d4c9eff87512 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

Looks like it has something to do with this: https://github.com/deltachat/deltachat-desktop/issues/1269#issuecomment-568807407

gerryfrancis avatar Feb 26 '20 16:02 gerryfrancis

Still an issue in version 1.1.0:

Name der fehlerhaften Anwendung: DeltaChat Setup 1.1.0.exe, Version: 1.1.0.0, Zeitstempel: 0x5c157f86 Name des fehlerhaften Moduls: System.dll, Version: 0.0.0.0, Zeitstempel: 0x5c157efa Ausnahmecode: 0xc0000005 Fehleroffset: 0x00001581 ID des fehlerhaften Prozesses: 0x60 Startzeit der fehlerhaften Anwendung: 0x01d5f7a77e80a77e Pfad der fehlerhaften Anwendung: C:\Users\PC_USER\Downloads\DeltaChat Setup 1.1.0.exe Pfad des fehlerhaften Moduls: C:\Users\PC_USER\AppData\Local\Temp\nszF166.tmp\System.dll Berichtskennung: be2dd295-639a-11ea-8368-d4c9eff87512 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

gerryfrancis avatar Mar 11 '20 13:03 gerryfrancis

It seams like i have the exact same issue on windows 10. Both setup 1.1.0, 1.0.0 and 0.999.1 and 0.901 fails. However 0.900 WORKS!

edit: on my previous install I was using 0.999 successfully, however i just reformatted and started with a fresh install of win10-64 and only now i got this bug

Michael-Yongshi avatar Mar 26 '20 20:03 Michael-Yongshi

@gerryfrancis you could workaround this bug with a different username? @Michael-Yongshi can you try the same? Not sure and hard to reproduce, but I would like to create new win10 users with the same usernames as you have, maybe I can then reproduce it?

Jikstra avatar Mar 28 '20 18:03 Jikstra

So i created 2 new local accounts with 1 called 'testing' and one called exactly the same as my microsoft account with a lot of spaces (i could dm that to you if you would like, for privacy reasons i will not put it here). Both went fine, so it must be the fact that it is a microsoft account which is faulty.

I did notice that the local accounts name is exactly the name of the folder under c/users and with the microsoft account its not (first 5 letters of email). Maybe thats the source of the issue?

Michael-Yongshi avatar Mar 29 '20 08:03 Michael-Yongshi

@Jikstra The user name should not make a difference. However, it seems that the name of the user profile matters. (See my explanation in https://github.com/deltachat/deltachat-desktop/issues/1269#issuecomment-568807407 .) @Michael-Yongshi I have no Microsoft account, so I do not think that this has something to do with the issue.

Still an issue in version 1.2.0:

Name der fehlerhaften Anwendung: DeltaChat Setup 1.2.0.exe, Version: 1.2.0.0, Zeitstempel: 0x5c157f86 Name des fehlerhaften Moduls: System.dll, Version: 0.0.0.0, Zeitstempel: 0x5c157efa Ausnahmecode: 0xc0000005 Fehleroffset: 0x00001581 ID des fehlerhaften Prozesses: 0x3700 Startzeit der fehlerhaften Anwendung: 0x01d606d6324855fe Pfad der fehlerhaften Anwendung: C:\Users\PC_USER\Downloads\DeltaChat Setup 1.2.0.exe Pfad des fehlerhaften Moduls: C:\Users\PC_USER\AppData\Local\Temp\nsk1D27.tmp\System.dll Berichtskennung: 70bd27ed-72c9-11ea-8369-d4c9eff87512 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist:

gerryfrancis avatar Mar 30 '20 21:03 gerryfrancis

@gerryfrancis Well if microsoft account doesnt matter than it must be the path that is different that is the source of the issue. As I created a local account with exactly the same user profile name and there it works.

Michael-Yongshi avatar Mar 31 '20 07:03 Michael-Yongshi

@Michael-Yongshi Yes, that would match with my findings. (See https://github.com/deltachat/deltachat-desktop/issues/1269#issuecomment-568807407 .)

gerryfrancis avatar Mar 31 '20 08:03 gerryfrancis

Just uninstalled delta-chat 9.000 and tried to install 1.1.0 and worked perfectly. But i dont think it uninstalled everything, as i didnt have to import anything, it immediately opened in my chats.

so updating from an older version to a newer one does work, so maybe the issue is with the data files...

Michael-Yongshi avatar Apr 22 '20 06:04 Michael-Yongshi

But i dont think it uninstalled everything, as i didnt have to import anything, it immediately opened in my chats.

@Michael-Yongshi I guess that is an intended behavior. The database of Delta Chat resides in the respective user profile of the operating system and will not be uninstalled. I do not think that it is a good idea to remove the chat data during the uninstall process.

gerryfrancis avatar Apr 22 '20 09:04 gerryfrancis

Still an issue in version 1.3.0.

gerryfrancis avatar May 05 '20 20:05 gerryfrancis

Thanks for keeping an eye on those issues and updating us! I'm currently busy with fixing mac specific bugs, but will switch to windows again in some time to squash bugs there :)

Jikstra avatar May 05 '20 22:05 Jikstra

@Jikstra No worries here, just take your time. :)

gerryfrancis avatar May 06 '20 05:05 gerryfrancis

Maybe add the workaround to the readme in the meantime? (install 0.900 first and than update to newer version)

Michael-Yongshi avatar May 06 '20 06:05 Michael-Yongshi

@Michael-Yongshi I would not recommend installing version 0.900.1 and update afterwards. For me the installation of version 1.3.0 works when using a Windows user profile that has a shorter name. But of course this is just a workaround.

gerryfrancis avatar May 06 '20 08:05 gerryfrancis