electron / electron/forge

Zypak module error when running Flatpaks

Open
#2,805 5 comments 1 reaction 0 assignees View on GitHub
maker/flatpak platform/linux status/confirmed
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

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

### Electron version

v18.0.4

### Operating system

Fedora 35

### Last known working Electron Forge version

_No response_

### Expected behavior

I use electron-forge to build the default template Hello world app flatpak. The build process goes fine, installation of the flatpak goes fine. Running the flatpak should too.

### Actual behavior

I run this command
```bash
flatpak run io.atom.electron.test1
```

I get this error

```bash
[13 zypak-sandbox] Failed to send spawn request to supervisor: Bad file descriptor (errno 9)
/app/bin/electron-wrapper: line 3: 3 Trace/breakpoint trap (core dumped) zypak-wrapper "test1" "$@"
```

### Steps to reproduce

Place this into your packages.json file under makers

```json
{
"name": "@electron-forge/maker-flatpak",
"config": {
"files": []
}}
```

run

```bash
npm run make
```
then go to the out/make/flatpak... directory and install the flatpak using
```bash
flatpak install --user io.atom...
```
Then run the installed flatpak

### Additional information

I found a potential fix by setting the zypak module manually as shown here

```json
{
"name": "@electron-forge/maker-flatpak",
"config": {
"options": {
"categories": [
"Utility"
],
"icon": {
"512x512": "icon.png"
}
},
"modules": [
{
"name": "zypak",
"sources": [
{
"type": "git",
"url": "https://github.com/refi64/zypak",
"tag": "v2022.03"
}
]
}
]
}
}

```

If this is a known issue it should be documented properly.

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.