Skip to content
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

Running AppImage shows error 'cannot find /tmp/.../browser/init.js' #2958

Closed
lutzroeder opened this issue May 28, 2018 · 9 comments
Closed

Comments

@lutzroeder
Copy link
Contributor

lutzroeder commented May 28, 2018

  • Version: 20.15.1
  • Target: Linux

After npx electron-builder --linux running the .AppImage on Ubuntu fails with with error below.

~/Projects/XXXX$ ./build/electron/XXXX-X.X.X-x86_64.AppImage
module.js:545
    throw err;
    ^

Error: Cannot find module '/tmp/.mount_XXXXUh8n4M/resources/electron.asar/browser/init.js'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:473:25)
    at Function.Module.runMain (module.js:683:10)
    at startup (bootstrap_node.js:196:16)
    at bootstrap_node.js:622:3
@Furyspark
Copy link

Furyspark commented May 28, 2018

  • Version: 20.15.1
  • Target: Linux (AppImage)
  • OS: Antergos 64-bit

Having the exact same issue on Antergos 64-bit. If I boot to Windows and build an NSIS installer, that works great, so it's unlikely to be a configuration issue, I think.

Also, after I open the AppImage but before I select one of the options the default message shows, I took a look inside /tmp/.mount_*/resources and there was no electron.asar or app.asar, while a lot of other files were present in its parent directory.

@yishn
Copy link

yishn commented May 29, 2018

Seems like this issue did not exist in v20.14.7.

@fxha
Copy link

fxha commented May 31, 2018

Build work with v20.14.7 if build on Linux but not if you build on macOS. Any updates here?

appimage structure build on Linux:

$ tree
.
├── app
│   ├── blink_image_resources_200_percent.pak
│   ├── content_resources_200_percent.pak
│   ├── content_shell.pak
│   ├── icudtl.dat
│   ├── libffmpeg.so
│   ├── libnode.so
│   ├── LICENSE.electron.txt
│   ├── LICENSES.chromium.html
│   ├── locales
│   │   ├── am.pak
│   │   ├── ar.pak
│   │   ├── bg.pak
│   │   ├── bn.pak
│   │   ├── ca.pak
│   │   ├── cs.pak
│   │   ├── da.pak
│   │   ├── de.pak
│   │   ├── el.pak
│   │   ├── en-GB.pak
│   │   ├── en-US.pak
│   │   ├── es-419.pak
│   │   ├── es.pak
│   │   ├── et.pak
│   │   ├── fake-bidi.pak
│   │   ├── fa.pak
│   │   ├── fil.pak
│   │   ├── fi.pak
│   │   ├── fr.pak
│   │   ├── gu.pak
│   │   ├── he.pak
│   │   ├── hi.pak
│   │   ├── hr.pak
│   │   ├── hu.pak
│   │   ├── id.pak
│   │   ├── it.pak
│   │   ├── ja.pak
│   │   ├── kn.pak
│   │   ├── ko.pak
│   │   ├── lt.pak
│   │   ├── lv.pak
│   │   ├── ml.pak
│   │   ├── mr.pak
│   │   ├── ms.pak
│   │   ├── nb.pak
│   │   ├── nl.pak
│   │   ├── pl.pak
│   │   ├── pt-BR.pak
│   │   ├── pt-PT.pak
│   │   ├── ro.pak
│   │   ├── ru.pak
│   │   ├── sk.pak
│   │   ├── sl.pak
│   │   ├── sr.pak
│   │   ├── sv.pak
│   │   ├── sw.pak
│   │   ├── ta.pak
│   │   ├── te.pak
│   │   ├── th.pak
│   │   ├── tr.pak
│   │   ├── uk.pak
│   │   ├── vi.pak
│   │   ├── zh-CN.pak
│   │   └── zh-TW.pak
│   ├── marktext
│   ├── natives_blob.bin
│   ├── pdf_viewer_resources.pak
│   ├── resources
│   │   ├── app.asar
│   │   ├── app.asar.unpacked
│   │   │   └── node_modules
│   │   │       └── nwsapi
│   │   │           ├── bin
│   │   │           │   ├── js_linux
│   │   │           │   ├── jsl_linux
│   │   │           │   ├── jsl_macos
│   │   │           │   ├── js_macos
│   │   │           │   ├── jsmin_linux
│   │   │           │   ├── jsmin_macos
│   │   │           │   └── os_list
│   │   │           ├── bower.json
│   │   │           ├── build
│   │   │           │   ├── conf
│   │   │           │   │   ├── jsl.conf
│   │   │           │   │   └── jsl.default.conf
│   │   │           │   ├── HEADER
│   │   │           │   ├── packer
│   │   │           │   │   ├── base2.js
│   │   │           │   │   └── packer.js
│   │   │           │   ├── scripts
│   │   │           │   │   ├── nwjslint.sh
│   │   │           │   │   ├── nwpacker.js
│   │   │           │   │   ├── nwpackjs.sh
│   │   │           │   │   └── nwtestjs.sh
│   │   │           │   └── VERSION
│   │   │           ├── LICENSE
│   │   │           ├── Makefile
│   │   │           ├── package.json
│   │   │           └── src
│   │   │               ├── modules
│   │   │               │   ├── nwsapi-jquery.js
│   │   │               │   └── nwsapi-traversal.js
│   │   │               └── nwsapi.js
│   │   ├── app-update.yml
│   │   └── electron.asar
│   ├── snapshot_blob.bin
│   ├── ui_resources_200_percent.pak
│   └── views_resources_200_percent.pak
├── AppRun
├── marktext.desktop
├── marktext.png -> usr/share/icons/hicolor/1025x1025/apps/marktext.png
└── usr
    ├── lib
    │   ├── libappindicator.so.1
    │   ├── libgconf-2.so.4
    │   ├── libindicator.so.7
    │   ├── libnotify.so.4
    │   ├── libXss.so.1
    │   └── libXtst.so.6
    └── share
        └── icons
            └── hicolor
                ├── 1025x1025
                │   └── apps
                │       └── marktext.png
                ├── 128x128
                │   └── apps
                │       └── marktext.png
                ├── 16x16
                │   └── apps
                │       └── marktext.png
                ├── 24x24
                │   └── apps
                │       └── marktext.png
                ├── 256x256
                │   └── apps
                │       └── marktext.png
                ├── 32x32
                │   └── apps
                │       └── marktext.png
                ├── 48x48
                │   └── apps
                │       └── marktext.png
                ├── 512x512
                │   └── apps
                │       └── marktext.png
                ├── 64x64
                │   └── apps
                │       └── marktext.png
                └── 96x96
                    └── apps
                        └── marktext.png

38 directories, 114 files

appimage structure build on macOS:

$ tree
.
├── AppRun
├── blink_image_resources_200_percent.pak
├── content_resources_200_percent.pak
├── content_shell.pak
├── icudtl.dat
├── libffmpeg.so
├── libnode.so
├── LICENSE.electron.txt
├── LICENSES.chromium.html
├── locales
│   ├── am.pak
│   ├── ar.pak
│   ├── bg.pak
│   ├── bn.pak
│   ├── ca.pak
│   ├── cs.pak
│   ├── da.pak
│   ├── de.pak
│   ├── el.pak
│   ├── en-GB.pak
│   ├── en-US.pak
│   ├── es-419.pak
│   ├── es.pak
│   ├── et.pak
│   ├── fake-bidi.pak
│   ├── fa.pak
│   ├── fil.pak
│   ├── fi.pak
│   ├── fr.pak
│   ├── gu.pak
│   ├── he.pak
│   ├── hi.pak
│   ├── hr.pak
│   ├── hu.pak
│   ├── id.pak
│   ├── it.pak
│   ├── ja.pak
│   ├── kn.pak
│   ├── ko.pak
│   ├── lt.pak
│   ├── lv.pak
│   ├── ml.pak
│   ├── mr.pak
│   ├── ms.pak
│   ├── nb.pak
│   ├── nl.pak
│   ├── pl.pak
│   ├── pt-BR.pak
│   ├── pt-PT.pak
│   ├── ro.pak
│   ├── ru.pak
│   ├── sk.pak
│   ├── sl.pak
│   ├── sr.pak
│   ├── sv.pak
│   ├── sw.pak
│   ├── ta.pak
│   ├── te.pak
│   ├── th.pak
│   ├── tr.pak
│   ├── uk.pak
│   ├── vi.pak
│   ├── zh-CN.pak
│   └── zh-TW.pak
├── marktext
├── marktext.desktop
├── marktext.png -> usr/share/icons/hicolor/1025x1025/apps/marktext.png
├── natives_blob.bin
├── pdf_viewer_resources.pak
├── resources
│   └── app-update.yml
├── resources_1
│   ├── app.asar
│   └── electron.asar
├── snapshot_blob.bin
├── ui_resources_200_percent.pak
├── usr
│   ├── lib
│   │   ├── libappindicator.so.1
│   │   ├── libgconf-2.so.4
│   │   ├── libindicator.so.7
│   │   ├── libnotify.so.4
│   │   ├── libXss.so.1
│   │   └── libXtst.so.6
│   └── share
│       └── icons
│           └── hicolor
│               ├── 1025x1025
│               │   └── apps
│               │       └── marktext.png
│               ├── 128x128
│               │   └── apps
│               │       └── marktext.png
│               ├── 16x16
│               │   └── apps
│               │       └── marktext.png
│               ├── 24x24
│               │   └── apps
│               │       └── marktext.png
│               ├── 256x256
│               │   └── apps
│               │       └── marktext.png
│               ├── 32x32
│               │   └── apps
│               │       └── marktext.png
│               ├── 48x48
│               │   └── apps
│               │       └── marktext.png
│               ├── 512x512
│               │   └── apps
│               │       └── marktext.png
│               ├── 64x64
│               │   └── apps
│               │       └── marktext.png
│               └── 96x96
│                   └── apps
│                       └── marktext.png
└── views_resources_200_percent.pak

28 directories, 90 files

/cc @Jocs

@petebytes
Copy link

I have the same error, and in my case the AppImage ends up with 2 resource folders
resources and resources_1
app is looking for electron.asar in resources, however the file is actually in resources_1

@Stefanough
Copy link

I was having the same issue in Ubuntu 16.04. Downgrading electron-builder to 20.14.7 solved my particular build issue.

@lutzroeder
Copy link
Contributor Author

@develar looks like Linux builds are broken in 20.15. Is this a known issue?

meriadec added a commit to meriadec/ledger-live-desktop that referenced this issue Jun 8, 2018
meriadec added a commit to meriadec/ledger-live-desktop that referenced this issue Jun 8, 2018
zaeleus added a commit to stjude/sjcloud-data-transfer-app that referenced this issue Jun 12, 2018
Building AppImages on 20.15.0 is currently broken. See
<electron-userland/electron-builder#2958>.
sindresorhus added a commit to atomiclabs/hyperdex that referenced this issue Jun 12, 2018
bjornhanson added a commit to bjornhanson/electron-updater-example that referenced this issue Jun 14, 2018
Trying to get Linux AppImage working. Seems to be broken in 20.15.1:

electron-userland/electron-builder#2958
BenRussert added a commit to BenRussert/nteract that referenced this issue Jun 18, 2018
-  An issue with `electron-builder` breaks appimage builds
- See electron-userland/electron-builder#2958
- Closes nteract#3000
@Timunas
Copy link

Timunas commented Sep 21, 2018

I'm having the same issue with version 20.28.4.
Is this issue already fixed? @develar

@paulshapiro
Copy link

Same issue.

@rahilsondhi
Copy link

it looks like this was fixed in #2720

but that commit is included in https://github.com/electron-userland/electron-builder/releases/tag/v20.7.1, so @Timunas i'm surprised you're experiencing it with 20.28.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants