electron / electron/forge

Unable to build Flatpak on GitHub Actions

Open
#2,662 4 comments 0 reactions 1 assignee Claimed by @VerteDinde View on GitHub
maker/flatpak platform/linux
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 17m
Merged PRs (30d)
32

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] 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.58

### Electron version

13.1.7

### Operating system

Ubuntu 20.04/ubuntu-latest x64

### Last known working Electron Forge version

None

### Expected behavior

To be able to build flatpak

### Actual behavior

I have 2 other makers before the `flatpak` maker: `rpm` and `deb` which run fine but the `flatpak` maker fails with the following error:
```bash
- Making for target: flatpak - 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. (/home/runner/work/OTK-GUI/OTK-GUI/node_modules/@malept/flatpak-bundler/index.js:71:16)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.emit (domain.js:475:12)
at maybeClose (internal/child_process.js:1058:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! otk-gui@0.6.8 make: `electron-forge make --arch=x64`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the otk-gui@0.6.8 make script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2022-01-02T15_45_23_411Z-debug.log
Error: Process completed with exit code 1.
```

### Steps to reproduce

Fork this repo and run the workflows again. Or simply check the logs for the latest workflow. (Build 6)
https://github.com/Aditya-ds-1806/flatpak-test

### Additional information

This is the flatpak portion of my `build.yaml`:
```yaml
name: install flatpak-builder and eu-strip
run: |
sudo apt-get install flatpak -y
sudo apt-get install flatpak-builder -y
sudo apt-get install elfutils -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y
```
This is my `forge.config.js`:
```js
{
name: '@electron-forge/maker-flatpak',
config: {
options: {
id: 'otk_gui',
productName: 'otk_gui',
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.