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.

Error when creating flatpak

See original GitHub issue

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.0.0-beta.61

Electron version

15.0.0

Operating system

Zorin OS and POP OS 21.04 -> Doesn’t work on any of those OS.

Last known working Electron Forge version

Never

Expected behavior

Be able to create flatpak file.

Actual behavior

I have flatpak, flatpak-builder and also elfutils (eu-strip) installed. It provide me with an error:

✖ Making for target: flatpak - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: flatpak
flatpak failed with status code 1
Error: flatpak failed with status code 1
    at ChildProcess.<anonymous> (/home/ziga/Documents/Projects/Passky/Passky-Desktop/node_modules/@malept/flatpak-bundler/index.js:71:16)
    at ChildProcess.emit (node:events:390:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

Steps to reproduce

  1. Clone repository: https://github.com/Rabbit-Company/Passky-Desktop

  2. Add "@electron-forge/maker-flatpak": "^6.0.0-beta.61" to devDependencies in package.json file

  3. Add this json code to js/forge.config.js file:

     {
        "name": '@electron-forge/maker-flatpak',
        "config": {
          "options": {
            "categories": ['Utility']
          }
        }
      }
  1. Run npm i to install all dependencies

  2. Than run npm run make.

Result of npm run make:

> passky@4.0.1 make
> electron-forge make

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: deb, rpm, flatpak
✔ Making for target: deb - On platform: linux - For arch: x64
✔ Making for target: rpm - On platform: linux - For arch: x64
✖ Making for target: flatpak - On platform: linux - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: flatpak
flatpak failed with status code 1
Error: flatpak failed with status code 1
    at ChildProcess.<anonymous> (/home/ziga/Documents/Projects/Passky/Passky-Desktop/node_modules/@malept/flatpak-bundler/index.js:71:16)
    at ChildProcess.emit (node:events:390:28)
    at ChildProcess.emit (node:domain:475:12)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)

Additional information

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:12

github_iconTop GitHub Comments

3reactions
zigazajc007commented, Mar 17, 2022

Thanks for the tip! But are you sure we should close the ticket? It seems like this is still a bug in electron-forge

I will open it, but to be honest you will never see flatpaks distributed as files. There will always be downloaded from the repository. So the way I have suggested it the only “correct” way of making and distributing flatpaks.

On websites for projects that support Linux, they usually provide .deb, .rpm, .appImage, but never .flatpak. They will always link you to the flatpak repository.

1reaction
alariejcommented, Mar 16, 2022

Interestingly, I’m trying to build a flatpak using electron-builder --linux flatpak and I get the exact same error. I tried changing node / npm versions: no luck. Also installed the flatpaks suggested by @jochy above: no luck. I’m on Ubuntu 21.10, node 16.11.0, npm 8.1.0. Perhaps @malept has an idea?

  • electron-builder  version=22.14.13 os=5.13.0-35-generic
  • loaded configuration  file=/home/jfa/quadrix/builder-flatpak.json
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=17.1.2 appOutDir=dist/linux-unpacked
  • building        target=flatpak arch=x64 file=dist/quadrix-0.6.4-x86_64.flatpak
  ⨯ flatpak failed with status code 1  failedTask=build stackTrace=Error: flatpak failed with status code 1
    at ChildProcess.<anonymous> (/home/jfa/quadrix/node_modules/@malept/flatpak-bundler/index.js:71:16)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when creating flatpak · Issue #2561 · electron/forge
I have flatpak, flatpak-builder and also elfutils (eu-strip) installed. It provide me with an error: ✖ Making for target: flatpak - On platform ......
Read more >
How to Fix Flatpak Installation Error
If you face the above error, run the below command from the terminal and reboot the computer. This command would correct any missing...
Read more >
GLIBC_2.34 nof found error when building and installing ...
Hi, I have built a flatpak from my flutter app and everything went ok. These were the commands I ran: tar -C build/linux/x64/release/bundle ......
Read more >
Flatpak build error
I've successfully built a Flatpak for “myapp” without one of its dependencies. When I try again with that included it fails with ...configure:...
Read more >
Flatpak Builder Command Reference
flatpak manifest — Information for building an application ... locations for the same extension point defined with different tags then an error will...
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