An unhandled rejection has occurred inside Forge: Error: EACCES: permission denied, scandir

I have an Electron app that I’m trying to package for Flatpak with Electron Forge, but I keep running into this permissions error. I’ve made sure that the /tmp/electron-packager directory has the correct permissions, but this issue persists; even if switch tmp directories.

Below is the full log.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>yomen@pop-os:~/Documents/bluebird-teaching-frontend$ DEBUG=electron-forge:* npx electron-forge make
✔ Checking your system
electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
❯ Loading configuration
electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +0ms
electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +2ms
electron-forge:require-search searching [
'@electron-forge/plugin-auto-unpack-natives',
'/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives',
'/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +0ms
electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +1ms
✔ Loading configuration
❯ Resolving make targets
electron-forge:require-search searching [
'@electron-forge/maker-squirrel',
'/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-squirrel',
'/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-squirrel'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +1ms
electron-forge:require-search testing @electron-forge/maker-squirrel +0ms
electron-forge:require-search searching [
'@electron-forge/maker-flatpak',
'/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-flatpak',
'/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-flatpak'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +16ms
electron-forge:require-search testing @electron-forge/maker-flatpak +0ms
› Making for the following targets:
✔ Resolving make targets
❯ Running package command
❯ Preparing to package application
electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +72ms
electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +1ms
electron-forge:require-search searching [
'@electron-forge/plugin-auto-unpack-natives',
'/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives',
'/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +43ms
electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +0ms
✔ Preparing to package application
❯ Running packaging hooks
❯ Running generateAssets hook
✔ Running generateAssets hook
❯ Running prePackage hook
✔ Running prePackage hook
✔ Running packaging hooks
❯ Packaging application
› Determining targets...
electron-forge:packager packaging with options {
asar: { unpack: '{**/*.node,**/*.node}' },
overwrite: true,
ignore: [ /^/out//g ],
quiet: true,
dir: '/home/yomen/Documents/bluebird-teaching-frontend',
arch: 'x64',
platform: 'linux',
afterFinalizePackageTargets: [ [AsyncFunction (anonymous)] ],
afterComplete: [ [AsyncFunction (anonymous)] ],
afterCopy: [ [AsyncFunction (anonymous)] ],
afterExtract: [ [AsyncFunction (anonymous)] ],
afterPrune: [ [AsyncFunction (anonymous)] ],
out: '/home/yomen/Documents/bluebird-teaching-frontend/out',
electronVersion: '31.3.0'
} +0ms
electron-forge:packager targets: [ { platform: 'linux', arch: 'x64' } ] +3ms
❯ Packaging for x64 on linux
❯ Copying files
❯ Preparing native dependencies
❯ Finalizing package
✔ Copying files
An unhandled rejection has occurred inside Forge:
Error: EACCES: permission denied, scandir '/tmp/electron-packager/tmp-iytJkX/resources/app/build-dir/var/run/chrony'
</code>
<code>yomen@pop-os:~/Documents/bluebird-teaching-frontend$ DEBUG=electron-forge:* npx electron-forge make ✔ Checking your system electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms ❯ Loading configuration electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +0ms electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +2ms electron-forge:require-search searching [ '@electron-forge/plugin-auto-unpack-natives', '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives', '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives' ] relative to /home/yomen/Documents/bluebird-teaching-frontend +0ms electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +1ms ✔ Loading configuration ❯ Resolving make targets electron-forge:require-search searching [ '@electron-forge/maker-squirrel', '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-squirrel', '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-squirrel' ] relative to /home/yomen/Documents/bluebird-teaching-frontend +1ms electron-forge:require-search testing @electron-forge/maker-squirrel +0ms electron-forge:require-search searching [ '@electron-forge/maker-flatpak', '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-flatpak', '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-flatpak' ] relative to /home/yomen/Documents/bluebird-teaching-frontend +16ms electron-forge:require-search testing @electron-forge/maker-flatpak +0ms › Making for the following targets: ✔ Resolving make targets ❯ Running package command ❯ Preparing to package application electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +72ms electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +1ms electron-forge:require-search searching [ '@electron-forge/plugin-auto-unpack-natives', '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives', '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives' ] relative to /home/yomen/Documents/bluebird-teaching-frontend +43ms electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +0ms ✔ Preparing to package application ❯ Running packaging hooks ❯ Running generateAssets hook ✔ Running generateAssets hook ❯ Running prePackage hook ✔ Running prePackage hook ✔ Running packaging hooks ❯ Packaging application › Determining targets... electron-forge:packager packaging with options { asar: { unpack: '{**/*.node,**/*.node}' }, overwrite: true, ignore: [ /^/out//g ], quiet: true, dir: '/home/yomen/Documents/bluebird-teaching-frontend', arch: 'x64', platform: 'linux', afterFinalizePackageTargets: [ [AsyncFunction (anonymous)] ], afterComplete: [ [AsyncFunction (anonymous)] ], afterCopy: [ [AsyncFunction (anonymous)] ], afterExtract: [ [AsyncFunction (anonymous)] ], afterPrune: [ [AsyncFunction (anonymous)] ], out: '/home/yomen/Documents/bluebird-teaching-frontend/out', electronVersion: '31.3.0' } +0ms electron-forge:packager targets: [ { platform: 'linux', arch: 'x64' } ] +3ms ❯ Packaging for x64 on linux ❯ Copying files ❯ Preparing native dependencies ❯ Finalizing package ✔ Copying files An unhandled rejection has occurred inside Forge: Error: EACCES: permission denied, scandir '/tmp/electron-packager/tmp-iytJkX/resources/app/build-dir/var/run/chrony' </code>
yomen@pop-os:~/Documents/bluebird-teaching-frontend$ DEBUG=electron-forge:* npx electron-forge make
✔ Checking your system

electron-forge:check-system checking system, create ~/.skip-forge-system-check to stop doing this +0ms
❯ Loading configuration
  electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +0ms
  electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +2ms
  electron-forge:require-search searching [
  '@electron-forge/plugin-auto-unpack-natives',
  '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives',
  '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +0ms
  electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +1ms
✔ Loading configuration
❯ Resolving make targets
  electron-forge:require-search searching [
  '@electron-forge/maker-squirrel',
  '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-squirrel',
  '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-squirrel'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +1ms
  electron-forge:require-search testing @electron-forge/maker-squirrel +0ms
  electron-forge:require-search searching [
  '@electron-forge/maker-flatpak',
  '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/maker-flatpak',
  '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/maker-flatpak'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +16ms
  electron-forge:require-search testing @electron-forge/maker-flatpak +0ms
› Making for the following targets: 
✔ Resolving make targets
❯ Running package command
❯ Preparing to package application
  electron-forge:project-resolver searching for project in: /home/yomen/Documents/bluebird-teaching-frontend +72ms
  electron-forge:project-resolver package.json with forge dependency found in /home/yomen/Documents/bluebird-teaching-frontend/package.json +1ms
  electron-forge:require-search searching [
  '@electron-forge/plugin-auto-unpack-natives',
  '/home/yomen/Documents/bluebird-teaching-frontend/@electron-forge/plugin-auto-unpack-natives',
  '/home/yomen/Documents/bluebird-teaching-frontend/node_modules/@electron-forge/plugin-auto-unpack-natives'
] relative to /home/yomen/Documents/bluebird-teaching-frontend +43ms
  electron-forge:require-search testing @electron-forge/plugin-auto-unpack-natives +0ms
✔ Preparing to package application
❯ Running packaging hooks
❯ Running generateAssets hook
✔ Running generateAssets hook
❯ Running prePackage hook
✔ Running prePackage hook
✔ Running packaging hooks
❯ Packaging application
› Determining targets...
  electron-forge:packager packaging with options {
  asar: { unpack: '{**/*.node,**/*.node}' },
  overwrite: true,
  ignore: [ /^/out//g ],
  quiet: true,
  dir: '/home/yomen/Documents/bluebird-teaching-frontend',
  arch: 'x64',
  platform: 'linux',
  afterFinalizePackageTargets: [ [AsyncFunction (anonymous)] ],
  afterComplete: [ [AsyncFunction (anonymous)] ],
  afterCopy: [ [AsyncFunction (anonymous)] ],
  afterExtract: [ [AsyncFunction (anonymous)] ],
  afterPrune: [ [AsyncFunction (anonymous)] ],
  out: '/home/yomen/Documents/bluebird-teaching-frontend/out',
  electronVersion: '31.3.0'
} +0ms
  electron-forge:packager targets: [ { platform: 'linux', arch: 'x64' } ] +3ms
❯ Packaging for x64 on linux
❯ Copying files
❯ Preparing native dependencies
❯ Finalizing package
✔ Copying files

An unhandled rejection has occurred inside Forge:
Error: EACCES: permission denied, scandir '/tmp/electron-packager/tmp-iytJkX/resources/app/build-dir/var/run/chrony'

Below are also the results of ls -ld

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>yomen@pop-os:~/Documents/bluebird-teaching-frontend$ ls -ld /tmp/electron-packager/
drwxrwxr-x 3 yomen yomen 4096 Jul 28 16:49 /tmp/electron-packager/
</code>
<code>yomen@pop-os:~/Documents/bluebird-teaching-frontend$ ls -ld /tmp/electron-packager/ drwxrwxr-x 3 yomen yomen 4096 Jul 28 16:49 /tmp/electron-packager/ </code>
yomen@pop-os:~/Documents/bluebird-teaching-frontend$ ls -ld /tmp/electron-packager/
drwxrwxr-x 3 yomen yomen 4096 Jul 28 16:49 /tmp/electron-packager/

Completely stumped by this. I actually have a Windows install, and I’m able to run npx electron-forge make perfectly fine. However, that’ll make the windows package, and not Flatpak.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật