Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.38k stars 1.03k forks source link

Package and distribute the application Not Work #1715

Open arcanisgk opened 3 years ago

arcanisgk commented 3 years ago

Electron Version

12.0.5+

What operating system are you using?

Windows

Operating System Version

Windows 10 Home 20H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Package and distribute the application my application Following this guide:

https://www.electronjs.org/docs/tutorial/quick-start#package-and-distribute-the-application

In your site.

Actual Behavior

Get Error:

C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser (master) (BusinessBrowser@1.0.0)
λ npm run make

> BusinessBrowser@1.0.0 make C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser
> electron-forge make

√ Checking your system
√ Resolving Forge Config
We need to package your application before we can make it
√ Preparing to Package Application for arch: x64
√ Preparing native dependencies
√ Packaging Application
Making for the following targets: squirrel
× Making for target: squirrel - On platform: win32 - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: 4294967295
Output:
System.AggregateException: Se han producido uno o varios errores. ---> System.Exception: Failed to modify resources, command invoked was: 'C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\node_modules\electron-winstaller\vendor\rcedit.exe "C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\out\make\squirrel.windows\x64\Setup.exe" --set-version-string "CompanyName" "Walter Nu�ez" --set-version-string "LegalCopyright" "Copyright � 2021 Walter Nu�ez" --set-version-string "FileDescription" "The best browser for business work environments." --set-version-string "ProductName" "The best browser for business work environments." --set-file-version 1.0.0 --set-product-version 1.0.0'

Output was:
Fatal error: Unable to load file
   en Squirrel.Update.Program.<setPEVersionInfoAndIcon>d__20.MoveNext()
   --- Fin del seguimiento de la pila de la excepci�n interna ---
   en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   en Squirrel.Update.Program.<>c__DisplayClass10_0.<Releasify>b__6()
   en Squirrel.Utility.<>c__DisplayClass8_0.<Retry>b__0()
   en Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
   en Squirrel.Utility.Retry(Action block, Int32 retries)
   en Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)
   en Squirrel.Update.Program.executeCommandLine(String[] args)
   en Squirrel.Update.Program.main(String[] args)
   en Squirrel.Update.Program.Main(String[] args)
---> (N� de excepci�n interna 0) System.Exception: Failed to modify resources, command invoked was: 'C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\node_modules\electron-winstaller\vendor\rcedit.exe "C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\out\make\squirrel.windows\x64\Setup.exe" --set-version-string "CompanyName" "Walter Nu�ez" --set-version-string "LegalCopyright" "Copyright � 2021 Walter Nu�ez" --set-version-string "FileDescription" "The best browser for business work environments." --set-version-string "ProductName" "The best browser for business work environments." --set-file-version 1.0.0 --set-product-version 1.0.0'

Output was:
Fatal error: Unable to load file
   en Squirrel.Update.Program.<setPEVersionInfoAndIcon>d__20.MoveNext()<---

Error: Failed with exit code: 4294967295
Output:
System.AggregateException: Se han producido uno o varios errores. ---> System.Exception: Failed to modify resources, command invoked was: 'C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\node_modules\electron-winstaller\vendor\rcedit.exe "C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\out\make\squirrel.windows\x64\Setup.exe" --set-version-string "CompanyName" "Walter Nu�ez" --set-version-string "LegalCopyright" "Copyright � 2021 Walter Nu�ez" --set-version-string "FileDescription" "The best browser for business work environments." --set-version-string "ProductName" "The best browser for business work environments." --set-file-version 1.0.0 --set-product-version 1.0.0'

Output was:
Fatal error: Unable to load file
   en Squirrel.Update.Program.<setPEVersionInfoAndIcon>d__20.MoveNext()
   --- Fin del seguimiento de la pila de la excepci�n interna ---
   en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   en Squirrel.Update.Program.<>c__DisplayClass10_0.<Releasify>b__6()
   en Squirrel.Utility.<>c__DisplayClass8_0.<Retry>b__0()
   en Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
   en Squirrel.Utility.Retry(Action block, Int32 retries)
   en Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas)
   en Squirrel.Update.Program.executeCommandLine(String[] args)
   en Squirrel.Update.Program.main(String[] args)
   en Squirrel.Update.Program.Main(String[] args)
---> (N� de excepci�n interna 0) System.Exception: Failed to modify resources, command invoked was: 'C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\node_modules\electron-winstaller\vendor\rcedit.exe "C:\Users\wnune\Desktop\Walter Nu�ez\desarrollo personal\BusinessBrowser\out\make\squirrel.windows\x64\Setup.exe" --set-version-string "CompanyName" "Walter Nu�ez" --set-version-string "LegalCopyright" "Copyright � 2021 Walter Nu�ez" --set-version-string "FileDescription" "The best browser for business work environments." --set-version-string "ProductName" "The best browser for business work environments." --set-file-version 1.0.0 --set-product-version 1.0.0'

Output was:
Fatal error: Unable to load file
   en Squirrel.Update.Program.<setPEVersionInfoAndIcon>d__20.MoveNext()<---

    at ChildProcess.<anonymous> (C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser\node_modules\electron-winstaller\src\spawn-promise.ts:52:16)
    at ChildProcess.emit (events.js:314:20)
    at ChildProcess.EventEmitter.emit (domain.js:483:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! BusinessBrowser@1.0.0 make: `electron-forge make`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the BusinessBrowser@1.0.0 make 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\wnune\AppData\Roaming\npm-cache\_logs\2021-04-22T18_38_25_228Z-debug.log

Testcase Gist URL

No response

Additional Information

can't reproduce it in Electron Fiddle.

my package.json file contains the following:

{
  "name": "BusinessBrowser",
  "version": "1.0.0",
  "description": "The best browser for business work environments.",
  "main": "main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make"
  },
  "keywords": [],
  "author": "Walter Nuñez",
  "license": "MIT",
  "devDependencies": {
    "@electron-forge/cli": "^6.0.0-beta.54",
    "@electron-forge/maker-deb": "^6.0.0-beta.54",
    "@electron-forge/maker-rpm": "^6.0.0-beta.54",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.54",
    "@electron-forge/maker-zip": "^6.0.0-beta.54",
    "electron": "^12.0.5"
  },
  "dependencies": {
    "electron-squirrel-startup": "^1.0.0",
    "is-admin": "^3.0.0"
  },
  "config": {
    "forge": {
      "packagerConfig": {},
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "BusinessBrowser"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ]
    }
  }
}

Log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'make'
1 verbose cli ]
2 info using npm@6.14.8
3 info using node@v12.19.0
4 verbose run-script [ 'premake', 'make', 'postmake' ]
5 info lifecycle BusinessBrowser@1.0.0~premake: BusinessBrowser@1.0.0
6 info lifecycle BusinessBrowser@1.0.0~make: BusinessBrowser@1.0.0
7 verbose lifecycle BusinessBrowser@1.0.0~make: unsafe-perm in lifecycle true
8 verbose lifecycle BusinessBrowser@1.0.0~make: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser\node_modules\.bin;C:\otros\cmder\bin;C:\otros\cmder\vendor\bin;C:\otros\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\otros\cmder\vendor\conemu-maximus5;C:\otros\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python39\Scripts\;C:\Python39\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\laragon\bin\php\php-7.4.16;C:\Program Files\Git\cmd;C:\composer;C:\laragon\bin;C:\laragon\bin\apache\httpd-2.4.35-win64-VC15\bin;C:\laragon\bin\composer;C:\laragon\bin\git\bin;C:\laragon\bin\git\cmd;C:\laragon\bin\git\mingw64\bin;C:\laragon\bin\git\usr\bin;C:\laragon\bin\laragon\utils;C:\laragon\bin\mysql\mysql-5.7.24-winx64\bin;C:\laragon\bin\nginx\nginx-1.16.0;C:\laragon\bin\ngrok;C:\laragon\bin\nodejs\node-v12;C:\laragon\bin\notepad++;C:\laragon\bin\putty;C:\laragon\bin\redis\redis-x64-3.2.100;C:\laragon\bin\telnet;C:\laragon\usr\bin;C:\Users\wnune\AppData\Local\Yarn\config\global\node_modules\.bin;C:\Users\wnune\AppData\Roaming\Composer\vendor\bin;C:\Users\wnune\AppData\Roaming\npm;C:\Users\wnune\AppData\Local\Microsoft\WindowsApps;C:\Users\wnune\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\wnune\AppData\Local\GitHubDesktop\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\otros\cmder
9 verbose lifecycle BusinessBrowser@1.0.0~make: CWD: C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser
10 silly lifecycle BusinessBrowser@1.0.0~make: Args: [ '/d /s /c', 'electron-forge make' ]
11 silly lifecycle BusinessBrowser@1.0.0~make: Returned: code: 1  signal: null
12 info lifecycle BusinessBrowser@1.0.0~make: Failed to exec make script
13 verbose stack Error: BusinessBrowser@1.0.0 make: `electron-forge make`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:314:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:314:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid BusinessBrowser@1.0.0
15 verbose cwd C:\Users\wnune\Desktop\Walter Nuñez\desarrollo personal\BusinessBrowser
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "make"
18 verbose node v12.19.0
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error BusinessBrowser@1.0.0 make: `electron-forge make`
22 error Exit status 1
23 error Failed at the BusinessBrowser@1.0.0 make script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
MingcaiShi commented 3 years ago

I have encountered the same problem. Have you solved it?

arcanisgk commented 3 years ago

I have encountered the same problem. Have you solved it?

not at the moment... and manteiner not reply to my post...

MingcaiShi commented 3 years ago

I have encountered the same problem. Have you solved it?

not at the moment... and manteiner not reply to my post...

This seems to be the problem of the project path. I move the project to the path of all English characters and then build it successfully

arcanisgk commented 3 years ago

I have encountered the same problem. Have you solved it?

not at the moment... and manteiner not reply to my post...

This seems to be the problem of the project path. I move the project to the path of all English characters and then build it successfully

Can you be more specific with the solution you propose?

At the beginning, the path that you use did not have all the characters in English, what was your initial path and what did you change it to?

I honestly think that it is still a bug ... I think I should accept the path if they are UTF-8 characters ... why should I develop in an ISO for English only?

I think it is a bad limitation ... is there documentation about it?

now there are more questions than answer :(

MingcaiShi commented 3 years ago

My windows environment uses GB2312 encoding by default.

At the beginning, my project path contained Chinese, and the same problem as you encountered occurred. Then I stopped using the Chinese path and ran successfully.

Soundmark commented 3 years ago

I have encountered the same problem. Have you solved it?

not at the moment... and manteiner not reply to my post...

This seems to be the problem of the project path. I move the project to the path of all English characters and then build it successfully

This works for me too! THX

sunfeng90 commented 8 months ago

I have encountered the same problem. Have you solved it?

not at the moment... and manteiner not reply to my post...

This seems to be the problem of the project path. I move the project to the path of all English characters and then build it successfully

This worked for me!

ck837 commented 5 months ago

对我也管用,太谢谢了