electron-userland / electron-installer-windows

Create a Windows package for your Electron app.
MIT License
469 stars 49 forks source link

Build fails with message "The DateTimeOffset specified cannot be converted into a Zip file timestamp" #327

Closed tobias-klein closed 4 years ago

tobias-klein commented 4 years ago

What version of electron-installer-windows are you using?

3.0.0

What version of node and npm are you using?

Latest node version from GitHub Actions (v12.18.3) and npm 6.14.6.

What operating system are you using?

Microsoft Windows Server 2019 Datacenter (GitHub Actions hosted runner)

https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md

Can you compile the example app successfully?

I didn't try to build the example app via GitHub actions. But previously the build of Ezra Project was working fine via GitHub actions (since more than a year).

Last successful build on August 31st: https://github.com/tobias-klein/ezra-project/runs/1049876107?check_suite_focus=true#step:6:308

What did you do? Please include the configuration you are using for electron-installer-windows.

node_modules\\.bin\\electron-installer-windows --src release\\ezra-project-win32-ia32 --dest release\\packages --config package_config\\win_installer_config.json"

Content of win_installer_config.json:

{
    "options.productName" : "Ezra Project",
    "options.noMsi" : true,
    "options.tags": [
        "Bible study",
        "Education",
        "Theology",
        "Bible"
    ],
    "options.icon": "icons/ezra-project.ico"
}

What did you expect to happen?

Successful generation of the Windows installer for Ezra Project.

What actually happened?

Build failed with the error message "The DateTimeOffset specified cannot be converted into a Zip file timestamp"

Detailed log:

> ezra-project@0.15.0-Dev installer-win D:\a\ezra-project\ezra-project
> electron-installer-windows --src release\ezra-project-win32-ia32 --dest release\packages --config package_config\win_installer_config.json

Creating package (this may take a while)
ExitCodeError: Command failed with a non-zero return code (1):
D:\a\ezra-project\ezra-project\node_modules\electron-installer-windows\vendor\nuget\nuget.exe pack C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\nuget\ezra_project.nuspec -BasePath C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\ezra_project -OutputDirectory C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\nuget -NoDefaultExcludes
Attempting to build package from 'ezra_project.nuspec'.

The DateTimeOffset specified cannot be converted into a Zip file timestamp.
Parameter name: value
    at ChildProcess.<anonymous> (D:\a\ezra-project\ezra-project\node_modules\@malept\cross-spawn-promise\dist\src\index.js:84:24)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.cp.emit (D:\a\ezra-project\ezra-project\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) {
  cmd: 'D:\\a\\ezra-project\\ezra-project\\node_modules\\electron-installer-windows\\vendor\\nuget\\nuget.exe',
  args: [
    'pack',
    'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\electron-installer--2616-pe5JKNNSsTvw\\ezra_project_0.15.0-Dev_undefined\\nuget\\ezra_project.nuspec',
    '-BasePath',
    'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\electron-installer--2616-pe5JKNNSsTvw\\ezra_project_0.15.0-Dev_undefined\\ezra_project',
    '-OutputDirectory',
    'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\electron-installer--2616-pe5JKNNSsTvw\\ezra_project_0.15.0-Dev_undefined\\nuget',
    '-NoDefaultExcludes'
  ],
  stdout: "Attempting to build package from 'ezra_project.nuspec'.\r\n",
  stderr: 'The DateTimeOffset specified cannot be converted into a Zip file timestamp.\r\n' +
    'Parameter name: value\r\n',
  code: 1
} Error: Command failed with a non-zero return code (1):
D:\a\ezra-project\ezra-project\node_modules\electron-installer-windows\vendor\nuget\nuget.exe pack C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\nuget\ezra_project.nuspec -BasePath C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\ezra_project -OutputDirectory C:\Users\RUNNER~1\AppData\Local\Temp\electron-installer--2616-pe5JKNNSsTvw\ezra_project_0.15.0-Dev_undefined\nuget -NoDefaultExcludes
Attempting to build package from 'ezra_project.nuspec'.

The DateTimeOffset specified cannot be converted into a Zip file timestamp.
Parameter name: value
    at ChildProcess.<anonymous> (D:\a\ezra-project\ezra-project\node_modules\@malept\cross-spawn-promise\dist\src\index.js:84:24)
    at ChildProcess.emit (events.js:315:20)
    at ChildProcess.cp.emit (D:\a\ezra-project\ezra-project\node_modules\cross-spawn\lib\enoent.js:34:29)
    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! ezra-project@0.15.0-Dev installer-win: `electron-installer-windows --src release\ezra-project-win32-ia32 --dest release\packages --config package_config\win_installer_config.json`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ezra-project@0.15.0-Dev installer-win script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
fcastilloec commented 4 years ago

This is not an error with this module, but rather nuget which is used by this module. A simple Google search showed this issue https://github.com/NuGet/Home/issues/7001

I suggest you check your files for any weird dates, or if the Github Action is changing the date somehow. I'm closing this issue since we can't fix this problem. You should follow any progress on the NuGet side