Skip to content

Building Asar broken with [email protected] #892

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

Closed
3 tasks done
markmcdowell opened this issue Oct 1, 2018 · 8 comments
Closed
3 tasks done

Building Asar broken with [email protected] #892

markmcdowell opened this issue Oct 1, 2018 · 8 comments
Labels
blocked 🚫 Depends on another issue either in this project or a dependency's project build-host:windows Running Electron Packager on Windows

Comments

@markmcdowell
Copy link

  • 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.

Hello! If you do a fresh install with npm i electron-packager it brings down [email protected].

Running electron-packager . --asar then fails with an ENOENT error as the file destination is no-longer correct: (it looks like the temp directory is used twice).

As a quick fix I fixed the version of asar:

npm i [email protected] -D

Error

  flora-colossus creating walker with rootModule=dist +0ms
  electron-packager Running asar with the options {} +14ms
fs.js:941
   binding.lstat(pathModule._makeLong(path));
          ^

Error: ENOENT: no such file or directory, lstat '%TMP%\electron-packager\win32-x64\app\resources\app\%TMP%\electron-packager\win32-x64\app\resources\app\main.js'
    at Object.fs.lstatSync (fs.js:941:11)
    at handleFile (D:\dev\trading-ui\electron-host\node_modules\asar\lib\asar.js:116:23)
    at next (D:\dev\trading-ui\electron-host\node_modules\asar\lib\asar.js:170:12)
    at Object.module.exports.createPackageFromFiles (D:\dev\trading-ui\electron-host\node_modules\asar\lib\asar.js:175:10)
    at D:\dev\trading-ui\electron-host\node_modules\asar\lib\asar.js:50:20
    at D:\dev\trading-ui\electron-host\node_modules\asar\lib\crawlfs.js:19:12
    at f (D:\dev\trading-ui\electron-host\node_modules\once\once.js:25:25)
    at Glob.<anonymous> (D:\dev\trading-ui\electron-host\node_modules\asar\node_modules\glob\glob.js:146:7)
    at emitOne (events.js:116:13)
    at Glob.emit (events.js:211:7)
    at Glob._finish (D:\dev\trading-ui\electron-host\node_modules\asar\node_modules\glob\glob.js:185:8)
    at done (D:\dev\trading-ui\electron-host\node_modules\asar\node_modules\glob\glob.js:172:12)
    at Glob._processGlobStar2 (D:\dev\trading-ui\electron-host\node_modules\asar\node_modules\glob\glob.js:614:12)
    at D:\dev\trading-ui\electron-host\node_modules\asar\node_modules\glob\glob.js:603:10
    at RES (D:\dev\trading-ui\electron-host\node_modules\inflight\inflight.js:31:16)
    at f (D:\dev\trading-ui\electron-host\node_modules\once\once.js:25:25)
@welcome
Copy link

welcome bot commented Oct 1, 2018

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@malept malept added the blocked 🚫 Depends on another issue either in this project or a dependency's project label Oct 1, 2018
@malept
Copy link
Member

malept commented Oct 1, 2018

Can you please file a bug upstream in the asar repository, if asar is broken? I cannot reproduce this on Linux:

  1. git clone https://github.com/electron/electron-quick-start && cd electron-quick-start
  2. npm install && npm install --save-dev electron-packager
  3. $(npm bin)/electron-packager . --asar

@markmcdowell
Copy link
Author

Sure, the same commands you ran on Linux fails on Windows.

@malept malept added the build-host:windows Running Electron Packager on Windows label Oct 1, 2018
@malept
Copy link
Member

malept commented Oct 1, 2018

Perhaps it's a Windows-only problem in asar then?

@Appuls
Copy link

Appuls commented Oct 1, 2018

As a quick fix I fixed the version of asar:

npm i [email protected] -D

I just ran into the same problem on Windows and your quick fix worked for me. Thanks!

@mrthorne
Copy link

mrthorne commented Oct 1, 2018

Also ran into the same issue with Asar 0.14.4; forcing version 0.14.3 allows us to work around for now as well.

image

@malept
Copy link
Member

malept commented Oct 1, 2018

To people affected by this:

This is a confirmed bug with the asar module on Windows. Per the original post, there is a workaround to pin the asar version to the last known good version.

It would be appreciated if people refrained from saying "I ran into the same issue, the workaround worked", as it causes unnecessary notifications for people subscribing to this issue. Instead, use the reaction emoji.

It would also be appreciated if someone could file a detailed bug report at the asar repository so its developers know about the regression. I have filed electron/asar#158.

@malept
Copy link
Member

malept commented Oct 2, 2018

This should be fixed in asar 0.14.5. Please let upstream developers know if it still doesn't work, after you've verified that asar has indeed been updated to >= 0.14.5 for the Electron Packager installation you're using. A common mistake is updating the Packager dependencies for the project-specific installation, and then running the globally-installed Packager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked 🚫 Depends on another issue either in this project or a dependency's project build-host:windows Running Electron Packager on Windows
Projects
None yet
Development

No branches or pull requests

4 participants