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

The format of the URI could not be determined #55

Closed
HZSamir opened this issue Aug 6, 2016 · 15 comments
Closed

The format of the URI could not be determined #55

HZSamir opened this issue Aug 6, 2016 · 15 comments

Comments

@HZSamir
Copy link

HZSamir commented Aug 6, 2016

What version of electron-installer-windows are you using?
0.2.0
What version of node and npm are you using?
v6.3.1 and 3.10.3
What operating system are you using?
Windows 10 (Latest build)
Can you compile the example app successfully?
Yes. Although the app doesn't start for whatever reason
What did you do? Please include the configuration you are using for electron-installer-windows.
Building the installer with the minimum options passed. Just an src and a dist folder.
electron-installer-windows --src ./OLS-Educ2-win32-x64/ --dest dist/installers/
What did you expect to happen?
An installer is born
What actually happened?
A huge error stack which boils down to this: "The format of the URI could not be determined".

I have seen in older issues that this issue stems from an incorrect icon path, however whether I pass one (http link to whatever icon) or not, the issue remains.

Here is the full text of the error:
`C:\Users\Samir\Documents\school5.electrify.dist>electron-installer-windows --src OLS-Educ2-win32-x64/ --dest dist/installers/
(node:1396) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Creating package (this may take a while)
Error: Error creating package: Error executing file (1):
C:\Users\Samir\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\nuget\NuGet.exe pack C:\Users\Samir\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\nuget\OLS-Educ2.nuspec -BasePath C:\Users\Samir\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\OLS-Educ2 -OutputDirectory C:\Users\Samir\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\nuget -NoDefaultExcludes
Invalid URI: The format of the URI could not be determined.

at C:\Users\Samir\AppData\Roaming\npm\node_modules\electron-installer-windows\src\installer.js:273:21
at ChildProcess.<anonymous> (C:\Users\Samir\AppData\Roaming\npm\node_modules\electron-installer-windows\src\installer.js:62:5)
at emitTwo (events.js:111:20)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12) 'Error: Error creating package: Error executing file (1): \nC:\\Users\\Samir\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\vendor\\nuget\\NuGet.exe pack C:\\Users\\Samir\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\nuget\\OLS-Educ2.nuspec -BasePath C:\\Users\\Samir\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\OLS-Educ2 -OutputDirectory C:\\Users\\Samir\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\nuget -NoDefaultExcludes\nInvalid URI: The format of the URI could not be determined.\r\n\n    at C:\\Users\\Samir\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\src\\installer.js:273:21\n    at ChildProcess.<anonymous> (C:\\Users\\Samir\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\src\\installer.js:62:5)\n    at emitTwo (events.js:111:20)\n    at ChildProcess.emit (events.js:191:7)\n    at maybeClose (internal/child_process.js:852:16)\n    at Socket.<anonymous> (internal/child_process.js:323:11)\n    at emitOne (events.js:96:13)\n    at Socket.emit (events.js:188:7)\n    at Pipe._handle.close [as _onclose] (net.js:492:12)'`

Thank you for taking the time.

@NikitaG
Copy link

NikitaG commented Aug 20, 2016

I had same issue. I noticed projectUrl in .nuspec file is incorrect. After I added homepage to package.json, this issue disappeared.

@unindented
Copy link
Collaborator

Thanks @NikitaG for looking into it! I'll close the ticket then.

@mindvox
Copy link

mindvox commented Feb 26, 2017

What does the homepage property of package.json need to be set to in order to fix this issue?

@unindented
Copy link
Collaborator

It's required by Squirrel.Windows, which is the underlying library that generates the installer, as explained in the README. You can read their documentation here: https://github.com/Squirrel/Squirrel.Windows

@mindvox
Copy link

mindvox commented Feb 26, 2017

Thank you, but I have it set and still get the error?

@unindented
Copy link
Collaborator

@karlbateman It could be a malformed URL that you are passing to some other option. Can you paste your config file?

@mindvox
Copy link

mindvox commented Feb 26, 2017

package.json?

@unindented
Copy link
Collaborator

Yeah, if that's what you're using.

@mindvox
Copy link

mindvox commented Feb 26, 2017

{
  "name": "timesheet-data-tool",
  "version": "0.1.0",
  "description": "Timesheet data access",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "package:windows": "electron-packager ./ TimesheetTool --platform win32 --arch x64 --out dist --overwrite",
    "setup:windows": "electron-installer-windows --src dist/TimesheetTool-win32-x64/ --dest dist/installers/"
  },
  "homepage": "https://github.com/oxheyhall/timesheets-desktop",
  "repository": "https://github.com/oxheyhall/timesheets-desktop",
  "keywords": [],
  "author": "OxheyHall",
  "license": "UNLICENSED",
  "devDependencies": {
    "electron": "^1.4.1",
    "electron-installer-windows": "^0.2.0",
    "electron-packager": "^8.5.2"
  }
}

@unindented
Copy link
Collaborator

Try providing an email and homepage for your author field (it's the only difference I find when comparing with the example app provided with the package):

{
  "name": "timesheet-data-tool",
  "version": "0.1.0",
  "description": "Timesheet data access",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "package:windows": "electron-packager ./ TimesheetTool --platform win32 --arch x64 --out dist --overwrite",
    "setup:windows": "electron-installer-windows --src dist/TimesheetTool-win32-x64/ --dest dist/installers/"
  },
  "homepage": "https://github.com/oxheyhall/timesheets-desktop",
  "repository": "https://github.com/oxheyhall/timesheets-desktop",
  "keywords": [],
  "author": {
    "name": "OxheyHall",
    "email": "OxheyHall@example.com",
    "url": "http://example.com/"
  },
  "license": "UNLICENSED",
  "devDependencies": {
    "electron": "^1.4.1",
    "electron-installer-windows": "^0.2.0",
    "electron-packager": "^8.5.2"
  }
}

@mindvox
Copy link

mindvox commented Feb 26, 2017

Same problem

@unindented
Copy link
Collaborator

Try comparing with the example app, see what other differences you find. For example, you are not providing an icon, so maybe try that?

@mindvox
Copy link

mindvox commented Feb 26, 2017

Will do, I got it working with electron-builder.

@Wqrld
Copy link

Wqrld commented Oct 30, 2017

bump, how do i need to set this up? im having the same problem with a config.json

{
  "dest": "dist/installers/",
  "iconUrl": "file:///C:/Users/werel/Desktop/programmeren/gamehub/gamehub/favicon.ico",
  "tags": [
    "Utility"
  ]
}

@joshuapinter
Copy link

@Wqrld Since your icon is a local file, you should use icon instead:

{
  "dest": "dist/installers/",
  "icon": "C:/Users/werel/Desktop/programmeren/gamehub/gamehub/favicon.ico",
  "tags": [
    "Utility"
  ]
}

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

No branches or pull requests

6 participants