question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Removing temporary directory on Windows fails with no error

See original GitHub issue

Running on a Windows Server 2008 build agent the packager fails to generate artifacts with no error

Which version of electron-packager are you using?

Tested on both 7.2.0 and 7.3.0. The exact same config was working a few days ago so perhaps something has changed in the dependency tree?

What CLI arguments are you passing? Alternatively, if you are using the API, what parameters are you passing to the packager() function?

const defaultPackageConf = {
  'app-bundle-id': packageJSON.name,
  'app-category-type': 'public.app-category.healthcare-fitness',
  'app-copyright': `Copyright © ${(new Date()).getFullYear()} ${packageJSON.author.name}, All rights reserved.`, // eslint-disable-line
  'app-version': packageJSON.version,
  arch: 'ia32',
  asar: true,
  'build-version': packageJSON.version,
  dir: '.',
  icon: './build/assets/img/main',
  ignore: ignoreFn,
  name: packageJSON.productName,
  out: './dist/',
  overwrite: true,
  platform: 'win32',
  prune: true,
  tmpdir,
  version,
  'version-string': {
    CompanyName: packageJSON.author.name,
    FileDescription: packageJSON.productName,
    ProductName: packageJSON.productName,
    InternalName: packageJSON.productName,
  },
};

What version of Electron are you building with?

Tried building with Electron 1.2.x and 1.3.x

What is the host platform are you running electron-packager on?

Windows Server 2008, x64

What target platform(s)/architecture(s) are you building for?

Windows x86

Is there a stack trace in the error message you’re seeing?

No, there is no error, it just stops. When running with DEBUG enabled the extract-zip module declares itself complete then a second later the process exits with exit code 0.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
neonhomercommented, Aug 1, 2016

We just ran into this issue where one of our Windows 10 machines would stall with no error or any information like @MarshallOfSound. After some extensive debugging we found that fs-extra was silently failing when trying to remove the tempBase folder.

We cleared out the C:\Users\USERNAME\AppData\Local\Temp folder and it works fine now.

0reactions
elroncommented, Sep 13, 2021

Hello This problem happened to me as well, using these versions (windows):

  "devDependencies": {
    "electron": "13.2.0",
    "electron-packager": "15.1.0"
  }

and the solution for me was:

  1. In the Task Manager, I closed all programs (that might use TEMP files), and most importantly VScode and Node processes.
  2. Then I go to the windows %temp% folder (Windows+R and then writing %temp% and hitting enter)
  3. Permanently delete everything possible in that folder
  4. Then I deleted the node_modules folder from my project and reinstalled npm i.

When I rebuilt using electron-packager, the problem disappeared and the project is compiled!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Temporary File Error - Microsoft Community
Simultaneously press the Windows + R hotkey to open Run. Type %TEMP% and click OK. The %TEMP% folder will open, please permanently delete...
Read more >
How to Fix "Unable to execute file in the temporary directory ...
Method 2: Create a new Temp folder and change the variables ... The error message clearly says that there is a problem with...
Read more >
Error: Can not remove temporary directory - espressif32
I was referred from github to the forum to seek help with the same problem as described by the op. github.com/platformio/platformio-core ...
Read more >
[Error 5] Unable To Execute Files In The Temporary Directory
The problem may be caused due to security right issues if the first solution fails. Try the following steps: Step 1. Navigate to...
Read more >
Things to know before deleting temporary, cache and log files ...
To avoid this problem, make sure that you stop the deployment process before you remove the config/temp files. Why remove these files?: Sometimes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found