Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Having trouble with creating installer on Ubuntu 15.10 #98

Open
pkkummermo opened this issue Jan 27, 2016 · 14 comments
Open

Having trouble with creating installer on Ubuntu 15.10 #98

pkkummermo opened this issue Jan 27, 2016 · 14 comments

Comments

@pkkummermo
Copy link

  • Ubuntu 15.10
  • Electron: 0.36.5
  • Mono: v 4.2.1
  • Wine: 1.9.2

I'm getting an error on both the 32-bit and 64-bit installer when trying to run them on a Win10 x64 machine.

The main culprint seems to be on this line
IEnableLogger: Failed to create uninstaller registry entry: System.Xml.XmlException: Koden Default krever et Extension-attributt som ikke er tomt

The line "Koden Default krever et Extension-attributt som ikke er tomt" is localized and I'm guessing it's something in the line of "Code Default requires an Extension-attribute which isn't empty".

If you want me to paste the whole error log I can, but it seems that everything looks OK until this point.

@Jaykah
Copy link

Jaykah commented Jan 27, 2016

Having the same issue on

  • Ubuntu 14.04
  • Mono 4.2.1
  • Wine 1.6.2
  • Electron 0.36.1

@Jaykah
Copy link

Jaykah commented Jan 28, 2016

Tried Mono 4.0.5.1 - no luck either.

@pkkummermo
Copy link
Author

Same issue trying to install on Win7 32-bit

@bendiksolheim
Copy link

Sooo, after some intensive googling it seems to me that the file named [Content_Types].xml inside the generated .nupkg file might be the cause. It contains the line

<Default ContentType="application/octet" Extension="" />

which seems to be the cause of this problem. The exact error in english is:

IEnableLogger: Failed to create uninstaller registry entry: System.Xml.XmlException: 'Default' tag requires a nonempty 'Extension' attribute. Line 10, position 4.

This is a generated file, and my guess is that there is some file without a file ending that is causing this line to be generated. I have yet to find out which file though.

@bendiksolheim
Copy link

I removed the LICENSE file from the electron build, and also removed the line

<file src="LICENSE" target="lib\net45\LICENSE" />

from template.nuspec. Everything build just fine, and the offending line in [Content_Types].xml is gone. I no longer get the error when installing, but now the installation just fails silently instead. It seems to install some of the files to my AppData folder, among others the executable. Running the executable does not work, it complains on some javascript files missing. This leads me to believe that the installation failed before it could copy all the files into AppData.

@bendiksolheim
Copy link

I have given up getting this to work on Linux. I am able to create working installers on Windows, so that will have to do for now.

@tomkel
Copy link

tomkel commented Feb 18, 2016

+1, I have the same issue. Like @bendiksolheim I have worked around it by building on Windows.

Seems to be related to #101.

@bendiksolheim
Copy link

There are, I think, multiple problems here:

  • One is a bug with Mono itself it seems, which makes the [Content_Types].xml inside the .nupkg file invalid. This bug is "documented" in the fifth comment in this issue, and in Allow custom template.nuspec #89
  • The installation does not copy over, or contain (I don't know, to be honest), the resources and locales folder. I have not seen any other references to this issue.

The first one can be battled by editing the template.nuspec (see comment 6), but I have not found a way to fix the other issue.

@bendiksolheim
Copy link

Further investigations: the .nupkg file is different depending on the platform you build on. When building on Windows, my application is located in lib/net45/resources inside the .nupkg-file, but this folder is missing when I build on Linux and Mac OS. I have no idea if this is because of Mono or grunt-electron-installer though.

EDIT:
I have looked through the code in this library, and it seems to me that it just proxies to Squirrel in the end. The file which is run in the end is Update-Mono.exe (which I believe is a file from Squirrel) with a bunch of options, one being the nupkg-file. This might mean that the error is in Squirrel. I am nowhere near sure about this though, I don't really have too much time to investigate at the moment.

@havenchyk
Copy link
Contributor

@bendiksolheim could you please try with electron/windows-installer#36 ? I believe I solves the issue, but I need a confirm from anybody, since there is no tests to support cross platform.

@bendiksolheim
Copy link

@havenchyk I can see it has already been merged, but I can confirm that this indeed does bundle the resources folder and locales folder in the nupkg file (and therefore also the setup file, I would guess). I have not tried to install it yet (lacking a Windows computer atm), but I would be surprised if it didn't work as this was the exact problem earlier.

I have made the same changes locally in the template.nuspec file in grunt-electron-installer, and it seems to work here as well. It does not fix the problem with the empty extension though:

<Default ContentType="application/octet" Extension="" />

@havenchyk
Copy link
Contributor

@bendiksolheim could you try once again? I believe it has been fixed with electron/windows-installer#49 If you still have this problem, please, create the issue on electron/windows-installer

@bendiksolheim
Copy link

@havenchyk I'll be sure to try it once I get the opportunity. I am traveling at the moment though, so I don't have any time before the end of the next week.

Thank you for taking the time to report back :)

@bendiksolheim
Copy link

Sorry about the long delay here. I just tested it, and it does indeed package the missing files now :) But it does not fix the problem with the empty extension. I still have this line in my [Content_Types].xml:

<Default ContentType="application/octet" Extension="" />

Unsure if that is an issue though. It seems to be an issue with mono itself, and not grunt-electron-installer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants