electron / windows-installer

Build Windows Installers for Electron apps
MIT License
1.55k stars 259 forks source link

Hangs on Windows #500

Closed wdanilo closed 5 months ago

wdanilo commented 5 months ago

Hi, I posted the issue already on Electron Forge Issue tracker, but it seems that it uses this package and it hangs during its execution, so this might be a better place to ask for help. Basically, the app packages super fast on Linux and macOS, but never finishes on Windows. If I leave if for ~1h on GH Actions, it crashes:

[STARTED] Preparing native dependencies
[250](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:251)
(node:1680) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
[251](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:252)
(node:1680) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
[252](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:253)
(node:1680) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
[253](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:254)

[254](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:255)
<--- Last few GCs --->
[255](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:256)

[256](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:257)
[1680:0000016642240080]  1280434 ms: Scavenge 1887.0 (2078.6) -> 1875.5 (2078.9) MB, 5.79 / 0.00 ms  (average mu = 0.367, current mu = 0.360) task; 
[257](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:258)
[1680:0000016642240080]  1280522 ms: Scavenge 1887.7 (2078.9) -> 1876.5 (2079.6) MB, 6.41 / 0.00 ms  (average mu = 0.367, current mu = 0.360) task; 
[258](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:259)
[1680:0000016642240080]  1280654 ms: Scavenge 1888.3 (2079.6) -> 1877.3 (2080.4) MB, 6.69 / 0.00 ms  (average mu = 0.367, current mu = 0.360) task; 
[259](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:260)

[260](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:261)

[261](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:262)
<--- JS stacktrace --->
[262](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:263)

[263](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:264)
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[264](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:265)
----- Native stack trace -----
[265](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:266)

[266](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:267)
 1: 00007FF6A8F6ED9B node::SetCppgcReference+15579
[267](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:268)
 2: 00007FF6A8EE6344 DSA_meth_get_flags+87860
[268](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:269)
 3: 00007FF6A99A8EC1 v8::Isolate::ReportExternalAllocationLimitReached+65
[269](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:270)
 4: 00007FF6A9992888 v8::Function::Experimental_IsNopFunction+1192
[270](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:271)
 5: 00007FF6A97E3710 v8::StackTrace::GetFrameCount+426608
[271](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:272)
 6: 00007FF6A97EF891 v8::StackTrace::GetFrameCount+476145
[272](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:273)
 7: 00007FF6A97ECD90 v8::StackTrace::GetFrameCount+465136
[273](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:274)
 8: 00007FF6A97DD3C2 v8::StackTrace::GetFrameCount+401186
[274](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:275)
 9: 00007FF6A97D8E35 v8::StackTrace::GetFrameCount+383381
[275](https://github.com/<redacted>/actions/runs/7620878944/job/20756341011#step:7:276)
10: 00007FF6A91FF37D BIO_ssl_shutdown+189

I'd be happy to provide any additional input and I'd be thankful for help here.

wdanilo commented 5 months ago

After increasing NODE mem limit to 7GB, I was able to make it working, but it takes now 2.5 hours on Windows, 4 minutes on macOS, and 4 minutes on Linux. Something is not right here. Here are the logs:

Tue, 23 Jan 2024 04:48:03 GMT
=== Building for 'win32-x64' ===
174
Tue, 23 Jan 2024 04:48:03 GMT

175
Tue, 23 Jan 2024 04:48:05 GMT
[STARTED] Checking your system
176
Tue, 23 Jan 2024 04:48:05 GMT
2024-01-23T04:48:05.681Z electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this
177
Tue, 23 Jan 2024 04:48:05 GMT
[STARTED] Checking git exists
178
Tue, 23 Jan 2024 04:48:05 GMT
[STARTED] Checking node version
179
Tue, 23 Jan 2024 04:48:05 GMT
[STARTED] Checking packageManager version
180
Tue, 23 Jan 2024 04:48:05 GMT
[TITLE] Found node@21.6.1
181
Tue, 23 Jan 2024 04:48:05 GMT
[SUCCESS] Found node@21.6.1
182
Tue, 23 Jan 2024 04:48:05 GMT
[TITLE] Found git@2.43.0.windows.1
183
Tue, 23 Jan 2024 04:48:05 GMT
[SUCCESS] Found git@2.43.0.windows.1
184
Tue, 23 Jan 2024 04:48:06 GMT
[TITLE] Found npm@10.2.4
185
Tue, 23 Jan 2024 04:48:06 GMT
[SUCCESS] Found npm@10.2.4
186
Tue, 23 Jan 2024 04:48:06 GMT
[SUCCESS] Checking your system
187
Tue, 23 Jan 2024 04:48:08 GMT
[STARTED] Loading configuration
188
Tue, 23 Jan 2024 04:48:08 GMT
2024-01-23T04:48:08.028Z electron-forge:project-resolver searching for project in: D:\a\mail\mail\app\desktop
189
Tue, 23 Jan 2024 04:48:08 GMT
2024-01-23T04:48:08.031Z electron-forge:project-resolver package.json with forge dependency found in D:\a\mail\mail\app\desktop\package.json
190
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.392Z electron-forge:plugin:webpack hooking process events
191
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.393Z electron-forge:hook hook triggered: resolveForgeConfig
192
Tue, 23 Jan 2024 04:48:11 GMT
[SUCCESS] Loading configuration
193
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Resolving make targets
194
Tue, 23 Jan 2024 04:48:11 GMT
[DATA] Making for the following targets: 
195
Tue, 23 Jan 2024 04:48:11 GMT
[SUCCESS] Resolving make targets
196
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Running package command
197
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Preparing to package application
198
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.398Z electron-forge:project-resolver searching for project in: D:\a\mail\mail\app\desktop
199
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.399Z electron-forge:project-resolver package.json with forge dependency found in D:\a\mail\mail\app\desktop\package.json
200
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.405Z electron-forge:plugin:webpack hooking process events
201
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.405Z electron-forge:hook hook triggered: resolveForgeConfig
202
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.405Z electron-forge:hook hook triggered: readPackageJson
203
Tue, 23 Jan 2024 04:48:11 GMT
[SUCCESS] Preparing to package application
204
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Running packaging hooks
205
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Running generateAssets hook
206
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.407Z electron-forge:hook hook triggered: generateAssets
207
Tue, 23 Jan 2024 04:48:11 GMT
[SUCCESS] Running generateAssets hook
208
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Running prePackage hook
209
Tue, 23 Jan 2024 04:48:11 GMT
2024-01-23T04:48:11.408Z electron-forge:hook hook triggered: prePackage
210
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] [plugin-webpack] Preparing webpack bundles
211
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Building webpack bundle for x64
212
Tue, 23 Jan 2024 04:48:11 GMT
[STARTED] Preparing native dependencies
213
Tue, 23 Jan 2024 04:48:11 GMT
[TITLE] Preparing native dependencies
214
Tue, 23 Jan 2024 04:48:12 GMT
[SUCCESS] Preparing native dependencies
215
Tue, 23 Jan 2024 04:48:12 GMT
[STARTED] Building webpack bundles
216
Tue, 23 Jan 2024 04:48:12 GMT
2024-01-23T04:48:12.985Z electron-forge:plugin:webpack:webpackconfig Config mode: production
217
Tue, 23 Jan 2024 04:48:16 GMT
[SUCCESS] Building webpack bundles
218
Tue, 23 Jan 2024 04:48:16 GMT
[SUCCESS] Building webpack bundle for x64
219
Tue, 23 Jan 2024 04:48:16 GMT
[SUCCESS] [plugin-webpack] Preparing webpack bundles
220
Tue, 23 Jan 2024 04:48:16 GMT
[SUCCESS] Running prePackage hook
221
Tue, 23 Jan 2024 04:48:16 GMT
[SUCCESS] Running packaging hooks
222
Tue, 23 Jan 2024 04:48:16 GMT
[STARTED] Packaging application
223
Tue, 23 Jan 2024 04:48:16 GMT
[DATA] Determining targets...
224
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.616Z electron-forge:packager packaging with options {
225
Tue, 23 Jan 2024 04:48:16 GMT
  asar: { unpack: '{**/*.node,**/*.node}' },
226
Tue, 23 Jan 2024 04:48:16 GMT
  overwrite: true,
227
Tue, 23 Jan 2024 04:48:16 GMT
  ignore: [Function: ignore],
228
Tue, 23 Jan 2024 04:48:16 GMT
  extraResource: [ 'D:\\a\\mail\\mail\\dist\\gui', 'D:\\a\\mail\\mail\\dist\\server' ],
229
Tue, 23 Jan 2024 04:48:16 GMT
  quiet: true,
230
Tue, 23 Jan 2024 04:48:16 GMT
  dir: 'D:\\a\\mail\\mail\\app\\desktop',
231
Tue, 23 Jan 2024 04:48:16 GMT
  arch: 'x64',
232
Tue, 23 Jan 2024 04:48:16 GMT
  platform: 'win32',
233
Tue, 23 Jan 2024 04:48:16 GMT
  afterFinalizePackageTargets: [ [AsyncFunction (anonymous)] ],
234
Tue, 23 Jan 2024 04:48:16 GMT
  afterComplete: [ [AsyncFunction (anonymous)] ],
235
Tue, 23 Jan 2024 04:48:16 GMT
  afterCopy: [ [AsyncFunction (anonymous)] ],
236
Tue, 23 Jan 2024 04:48:16 GMT
  afterExtract: [ [AsyncFunction (anonymous)] ],
237
Tue, 23 Jan 2024 04:48:16 GMT
  afterPrune: [ [AsyncFunction (anonymous)] ],
238
Tue, 23 Jan 2024 04:48:16 GMT
  out: 'D:\\a\\mail\\mail\\app\\desktop\\out',
239
Tue, 23 Jan 2024 04:48:16 GMT
  electronVersion: '28.1.1'
240
Tue, 23 Jan 2024 04:48:16 GMT
}
241
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.620Z electron-packager Electron Packager 18.1.3
242
Tue, 23 Jan 2024 04:48:16 GMT
Node v21.6.1
243
Tue, 23 Jan 2024 04:48:16 GMT
Host Operating system: win32 10.0.20348 (x64)
244
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.620Z electron-packager Packager Options: {"asar":{"unpack":"{**/*.node,**/*.node}"},"overwrite":true,"extraResource":["D:\\a\\mail\\mail\\dist\\gui","D:\\a\\mail\\mail\\dist\\server"],"quiet":true,"dir":"D:\\a\\mail\\mail\\app\\desktop","arch":"x64","platform":"win32","afterFinalizePackageTargets":[null],"afterComplete":[null],"afterCopy":[null],"afterExtract":[null],"afterPrune":[null],"out":"D:\\a\\mail\\mail\\app\\desktop\\out","electronVersion":"28.1.1"}
245
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.620Z electron-packager Target Platforms: win32
246
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.620Z electron-packager Target Architectures: x64
247
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.620Z electron-packager Requiring author in package.json, as CompanyName was not specified for win32metadata
248
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.624Z electron-packager Inferring application name from name in D:\a\mail\mail\app\desktop\package.json
249
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.624Z electron-packager Inferring appVersion from version in D:\a\mail\mail\app\desktop\package.json
250
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.624Z electron-packager Inferring win32metadata.CompanyName from author in D:\a\mail\mail\app\desktop\package.json
251
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.625Z electron-packager Application name: <redacted>-desktop-client
252
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.625Z electron-packager Target Electron version: 28.1.1
253
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.625Z electron-forge:packager targets: [ { platform: 'win32', arch: 'x64' } ]
254
Tue, 23 Jan 2024 04:48:16 GMT
[STARTED] Packaging for x64 on win32
255
Tue, 23 Jan 2024 04:48:16 GMT
[STARTED] Copying files
256
Tue, 23 Jan 2024 04:48:16 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
257
Tue, 23 Jan 2024 04:48:16 GMT
(Use `node --trace-deprecation ...` to show where the warning was created)
258
Tue, 23 Jan 2024 04:48:16 GMT
2024-01-23T04:48:16.628Z electron-packager Downloading Electron with options {"platform":"win32","arch":"x64","version":"28.1.1","artifactName":"electron"}
259
Tue, 23 Jan 2024 04:48:17 GMT
2024-01-23T04:48:17.425Z electron-packager Creating C:\Users\RUNNER~1\AppData\Local\Temp\electron-packager\win32-x64-template-K4xIlm
260
Tue, 23 Jan 2024 04:48:17 GMT
2024-01-23T04:48:17.426Z electron-packager Extracting C:\Users\runneradmin\AppData\Local\electron\Cache\8990948de8705eeef55c5be2cfa3e5006f76eb2fe79d3e9545464cbf76572da7\electron-v28.1.1-win32-x64.zip to C:\Users\RUNNER~1\AppData\Local\Temp\electron-packager\win32-x64-template-K4xIlm
261
Tue, 23 Jan 2024 04:48:20 GMT
2024-01-23T04:48:20.483Z electron-forge:hook hook triggered: packageAfterExtract
262
Tue, 23 Jan 2024 04:48:20 GMT
2024-01-23T04:48:20.538Z electron-packager Initializing app in C:\Users\RUNNER~1\AppData\Local\Temp\electron-packager\tmp-jTDThF from C:\Users\RUNNER~1\AppData\Local\Temp\electron-packager\win32-x64-template-K4xIlm template
263
Tue, 23 Jan 2024 04:48:20 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
264
Tue, 23 Jan 2024 04:48:20 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
265
Tue, 23 Jan 2024 04:48:20 GMT
2024-01-23T04:48:20.541Z electron-packager Ignored paths based on the out param: [ 'D:\\a\\mail\\mail\\app\\desktop\\out' ]
266
Tue, 23 Jan 2024 04:48:20 GMT
[SUCCESS] Copying files
267
Tue, 23 Jan 2024 04:48:20 GMT
[STARTED] Preparing native dependencies
268
Tue, 23 Jan 2024 04:48:20 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
269
Tue, 23 Jan 2024 04:48:20 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
270
Tue, 23 Jan 2024 04:48:20 GMT
(node:5360) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
271
Tue, 23 Jan 2024 07:18:26 GMT
[07:18:26] Finished 'buildDesktopClient_ElectronForge' after 2.51 h
272
Tue, 23 Jan 2024 07:18:26 GMT
[07:18:26] Starting 'buildDesktopClient_copyToDist'...
273
Tue, 23 Jan 2024 07:18:26 GMT
[07:18:26] Finished 'buildDesktopClient_copyToDist' after 166 ms
274
Tue, 23 Jan 2024 07:18:26 GMT
[07:18:26] Finished 'default' after 2.53 h
wdanilo commented 5 months ago

Fixed after moving from web pack to Vite