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

Cannot create squirrel distributable due to invalid iconUrl #980

Closed
3 tasks done
uikoo9 opened this issue Jun 29, 2019 · 3 comments
Closed
3 tasks done

Cannot create squirrel distributable due to invalid iconUrl #980

uikoo9 opened this issue Jun 29, 2019 · 3 comments
Labels

Comments

@uikoo9
Copy link

uikoo9 commented Jun 29, 2019

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

electron-forge make error
when npm run make1
"make1": "@PowerShell -Command $env:DEBUG='electron-windows-installer*,electron-forge*';electron-forge make",

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

PS D:\workspaces\yach_84_web> npm run make1

> yach_84_web@0.4.8 make1 D:\workspaces\yach_84_web
> @powershell -Command $env:DEBUG='electron-windows-installer*,electron-forge*';electron-forge make

WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:async-ora Process Started: Checking your system +0ms
  electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
  electron-forge:async-ora Process Succeeded: Checking your system -- after 789ms +790ms
WARNING: DEBUG environment variable detected.  Progress indicators will be sent over electron-forge:lifecycle
  electron-forge:async-ora Process Started: Resolving Forge Config +0ms
  electron-forge:project-resolver searching for project in: D:\workspaces\yach_84_web +0ms
  electron-forge:project-resolver electron-forge compatible package.json found in D:\workspaces\yach_84_web\package.json +4ms
  electron-forge:async-ora Process Succeeded: Resolving Forge Config -- after 9ms +11ms
  electron-forge:require-search searching [ '@electron-forge/maker-squirrel',
  'D:\\workspaces\\yach_84_web\\@electron-forge\\maker-squirrel',
  'D:\\workspaces\\yach_84_web\\node_modules\\@electron-forge\\maker-squirrel' ] relative to D:\workspaces\yach_84_web +0ms
  electron-forge:require-search testing @electron-forge/maker-squirrel +2ms
We need to package your application before we can make it
  electron-forge:async-ora Process Started: Preparing to Package Application for arch: x64 +32ms
  electron-forge:project-resolver searching for project in: D:\workspaces\yach_84_web +38ms
  electron-forge:project-resolver electron-forge compatible package.json found in D:\workspaces\yach_84_web\package.json +2ms
  electron-forge:packager packaging with options { asar: false,
  overwrite: true,
  dir: 'D:\\workspaces\\yach_84_web',
  arch: 'x64',
  platform: 'win32',
  afterCopy: [ [Function] ],
  afterExtract: [ [Function] ],
  afterPrune: [ [Function] ],
  out: 'D:\\workspaces\\yach_84_web\\out',
  electronVersion: '5.0.6',
  quiet: true } +0ms
  electron-forge:async-ora Process Succeeded: Preparing to Package Application for arch: x64 -- after 33.1s +33s
  electron-forge:async-ora Process Started: Preparing native dependencies +1ms
  electron-forge:async-ora Process Succeeded: Preparing native dependencies -- after 462ms +463ms
  electron-forge:async-ora Process Started: Packaging Application +0ms
  electron-forge:async-ora Process Succeeded: Packaging Application -- after 38.2s +38s
Making for the following targets: squirrel
  electron-forge:async-ora Process Started: Making for target: squirrel - On platform: win32 - For arch: x64 +2ms
  electron-windows-installer:main Created NuSpec file:
  electron-windows-installer:main <?xml version="1.0" encoding="utf-8"?>
  electron-windows-installer:main <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
  electron-windows-installer:main   <metadata>
  electron-windows-installer:main     <id>yach_84_web</id>
  electron-windows-installer:main     <title>yach</title>
  electron-windows-installer:main     <version>0.4.8</version>
  electron-windows-installer:main     <authors>x</authors>
  electron-windows-installer:main     <owners>x</owners>
  electron-windows-installer:main     <iconUrl>./favicon.ico</iconUrl>
  electron-windows-installer:main     <requireLicenseAcceptance>false</requireLicenseAcceptance>
  electron-windows-installer:main     <description>yach web project</description>
  electron-windows-installer:main     <copyright>Copyright © 2019 x</copyright>
  electron-windows-installer:main   </metadata>
  electron-windows-installer:main   <files>
  electron-windows-installer:main     <file src="locales\**" target="lib\net45\locales" />
  electron-windows-installer:main     <file src="resources\**" target="lib\net45\resources" />
  electron-windows-installer:main     <file src="*.bin" target="lib\net45" />
  electron-windows-installer:main     <file src="*.dll" target="lib\net45" />
  electron-windows-installer:main     <file src="*.pak" target="lib\net45" />
  electron-windows-installer:main     <file src="*.exe.config" target="lib\net45" />
  electron-windows-installer:main     <file src="*.exe.sig" target="lib\net45" />
  electron-windows-installer:main     <file src="icudtl.dat" target="lib\net45\icudtl.dat" />
  electron-windows-installer:main     <file src="Squirrel.exe" target="lib\net45\squirrel.exe" />
  electron-windows-installer:main     <file src="LICENSE" target="lib\net45\LICENSE" />
  electron-windows-installer:main     <file src="yach" target="lib\net45\yach" />
  electron-windows-installer:main   </files>
  electron-windows-installer:main </package>
  electron-windows-installer:main  +0ms
  electron-windows-installer:spawn Spawning D:\workspaces\yach_84_web\node_modules\electron-winstaller\vendor\nuget.exe pack C:\Users\x\AppData\Local\Temp\si-2019529-13664-1ljy1vo.mmtxh\yach_84_web.nuspec -BasePath D:\workspaces\yach_84_web\out\yach_84_web-win32-x64 -OutputDirectory C:\Users\x\AppData\Local\Temp\si-2019529-13664-1ljy1vo.mmtxh -NoDefaultExcludes +0ms
  electron-forge:async-ora Process Failed: Making for target: squirrel - On platform: win32 - For arch: x64 () => startTime ? `-- after ${`${(0, _prettyMs.default)(Date.now() - startTime)}`.cyan}` : null
+340ms

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 1
Output:
���ڳ��Դӡ�yach_84_web.nuspec�����ɳ������
��Ч�� URI: δ��ȷ�� URI �ĸ�ʽ��

Error: Failed with exit code: 1
Output:
���ڳ��Դӡ�yach_84_web.nuspec�����ɳ������
��Ч�� URI: δ��ȷ�� URI �ĸ�ʽ��

    at ChildProcess.<anonymous> (D:\workspaces\yach_84_web\node_modules\electron-winstaller\lib\spawn-promise.js:62:16)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! yach_84_web@0.4.8 make1: `@powershell -Command $env:DEBUG='electron-windows-installer*,electron-forge*';electron-forge make`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the yach_84_web@0.4.8 make1 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\x\AppData\Roaming\npm-cache\_logs\2019-06-29T10_06_24_586Z-debug.log

What command line arguments are you passing?

none

What does your config.forge data in package.json look like?

"config": {
    "forge": "./electron.forge.js"
  },

module.exports = {
    packageConfig: {
        dir: './dist',
        out: './app',
        overwrite: true
    },
    makers: [
        {
            name: '@electron-forge/maker-squirrel',
            config: {
                // authors: 'x', use package.json
                // certificateFile: './cert.pfx',
                // certificatePassword: 'this-is-a-secret',
                // copyright: 'x', use default
                // description: 'yach windows app', use package.json
                exe: 'yach',
                iconUrl: './favicon.ico',
                // loadingGif: '',
                // name: 'com.zhiyinlou.yach', use package.json
                noDelta: true,
                noMsi: false,
                // owners: 'x', use package.json
                // remoteReleases: '',
                // remoteToken: '',
                setupExe: 'yach-setup',
                // setupIcon: './favicon.ico',
                setupMsi: 'yach-setup',
                title: 'yach'
            }
        }
    ]
}

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.

@uikoo9
Copy link
Author

uikoo9 commented Jun 29, 2019

change the electron.forge.js file to

module.exports = {
    packageConfig: {
        dir: './dist',
        out: './app',
        overwrite: true
    },
    makers: [
        {
            name: '@electron-forge/maker-squirrel',
            config: {
                // authors: 'qiaowenbin', use package.json
                // certificateFile: './cert.pfx',
                // certificatePassword: 'this-is-a-secret',
                // copyright: 'qiaowenbin', use default
                // description: 'yach windows app', use package.json
                // exe: 'yach',
                // iconUrl: './favicon.ico',
                // loadingGif: '',
                // name: 'com.zhiyinlou.yach', use package.json
                // noDelta: true,
                // noMsi: false,
                // owners: 'qiaowenbin', use package.json
                // remoteReleases: '',
                // remoteToken: '',
                // setupExe: 'yach-setup',
                // setupIcon: './favicon.ico',
                // setupMsi: 'yach-setup',
                // title: 'yach'
            }
        }
    ]
}

fixed

@malept malept changed the title electron-forge make error Cannot create squirrel distributable due to invalid iconUrl Jul 1, 2019
@malept malept added the question label Jul 1, 2019
@malept
Copy link
Member

malept commented Jul 1, 2019

A couple of things are incorrect, according to the electron-winstaller docs:

  • exe needs to have an .exe extension
  • iconUrl needs to be an actual URL, not a path

I'm pretty sure the actual error that you're seeing is that it's saying that iconUrl is not a URL.

@malept malept closed this as completed Jul 1, 2019
@uikoo9
Copy link
Author

uikoo9 commented Jul 2, 2019

A couple of things are incorrect, according to the electron-winstaller docs:

  • exe needs to have an .exe extension
  • iconUrl needs to be an actual URL, not a path

I'm pretty sure the actual error that you're seeing is that it's saying that iconUrl is not a URL.

thanks~

dsanders11 pushed a commit that referenced this issue Jan 14, 2023
* build: update Electron releases JSON

* build: update Electron releases JSON

Co-authored-by: Electron Bot <electron-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants