This is a basic electron application meant to be used with the official flatpak tutorial
flathub / electron-sample-app Goto Github PK
View Code? Open in Web Editor NEWSample application based on electron
License: GNU General Public License v3.0
Sample application based on electron
License: GNU General Public License v3.0
This is a basic electron application meant to be used with the official flatpak tutorial
I am trying to build and export to a local repository instead of installing it directly with the --install option as described in the guide, but I'm getting an error:
error: Refspec 'app/org.flathub.electron-sample-app/x86_64/master' not found
How can I export to to a local repo and create a single-bundle file out of it?
Here is some more of the output:
Not exporting share/icons/HighContrast/32x32/categories/applications-science.png, non-allowed export filename
Not exporting share/icons/HighContrast/32x32/categories/applications-engineering.png, non-allowed export filename
Not exporting share/icons/HighContrast/32x32/categories/applications-utilities.png, non-allowed export filename
Please review the exported files and the metadata
Committing stage finish to cache
Exporting org.flathub.electron-sample-app to repo
Commit: 4a1d4533463bd0406c82dca55ce1a4d4523a5bd97f5038a27841980d352d66e4
Metadata Total: 3171
Metadata Written: 1472
Content Total: 9869
Content Written: 7912
Content Bytes Written: 210154487 (210.2 MB)
Exporting org.flathub.electron_sample_app.Debug to repo
Commit: 01e50c9c2b9d54a74bb5646c084ad63e1d429dfbc5a258c92fb1e4040eb804ef
Metadata Total: 299
Metadata Written: 150
Content Total: 2615
Content Written: 2611
Content Bytes Written: 261400060 (261.4 MB)
Pruning cache
tom@merbil:~/Projects/electron-sample-app/flatpak$ flatpak build-bundle myrepo electron.flatpak org.flathub.electron-sample-app
error: Refspec 'app/org.flathub.electron-sample-app/x86_64/master' not found
I tried to run sample when I tried to open electron-sample-app-1.0.1.AppImage this error happened, I'm using fedora 35 with nvidia gpu
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[866834:1209/233428.951966:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
I am following this guide to setup my flatpak manifest for my electron app. Documentation suggest to compile and install this app locally with:
$ flatpak-builder build org.flathub.electron-sample-app.yml --install --force-clean --user
$ flatpak run org.flathub.electron-sample-app
But After do that and run the app, it does not work, instead is throwing a Segmentation fault error.
❯ flatpak run org.flathub.electron-sample-app
[3 zypak-helper] Wait found events, but sd-event found none
/app/bin/run.sh: line 2: 3 Segmentation fault zypak-wrapper.sh /app/main/electron-sample-app "$@"
This is my machine
.',;::::;,'. andirsun@andirsun-macbook
.';:cccccccccccc:;,. -------------------------
.;cccccccccccccccccccccc;. OS: Fedora Linux Asahi Remix 39 (Thirty Nine) aarch64
.:cccccccccccccccccccccccccc:. Host: Apple MacBook Pro (16-inch, M1 Pro, 2021)
.;ccccccccccccc;.:dddl:.;ccccccc;. Kernel: 6.6.3-414.asahi.fc39.aarch64+16k
.:ccccccccccccc;OWMKOOXMWd;ccccccc:. Uptime: 1 day, 13 hours, 28 mins
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:. Packages: 2158 (rpm), 48 (flatpak)
,cccccccccccccc;MMM.;cc;;WW::cccccccc, Shell: bash 5.2.26
:cccccccccccccc;MMM.;cccccccccccccccc: Resolution: 3456x2160
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc: DE: GNOME 45.5
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc; WM: Mutter
ccccc:XM0';cccc;MMM.;cccccccccccccccc' WM Theme: Adwaita
ccccc;MMo;ccccc;MMW.;ccccccccccccccc; Theme: Adwaita [GTK2/3]
ccccc;0MNc.ccc.xMMd:ccccccccccccccc; Icons: Adwaita [GTK2/3]
cccccc;dNMWXXXWM0::cccccccccccccc:, Terminal: kgx
cccccccc;.:odl:.;cccccccccccccc:,. CPU: (10) @ 2.064GHz
:cccccccccccccccccccccccccccc:'. Memory: 12197MiB / 15520MiB
.:cccccccccccccccccccccc:;,..
'::cccccccccccccc::;,.
Hello, some of my dependencies in package.json are using node-gyp. I'm not sure how to cache these files. Could I do an impure build and allow downloading/breaking the sandbox? Or is there another way?
Thanks :-)
Running: npm install
npm info using [email protected]
npm info using [email protected]
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm info run [email protected] install node_modules/synchronous-socket node-gyp rebuild
npm info run [email protected] install { code: 1, signal: null }
npm ERR! code 1
npm ERR! path /run/build/cl-electron-server/main/node_modules/synchronous-socket
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.11.9 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.18.1/node-v18.18.1-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v18.18.1/node-v18.18.1-headers.tar.gz failed, reason: getaddrinfo EAI_AGAIN nodejs.org
npm ERR! gyp ERR! stack at ClientRequest.<anonymous> (/run/build/cl-electron-server/main/node_modules/minipass-fetch/lib/index.js:130:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (node:events:517:28)
npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener (node:_http_client:501:9)
npm ERR! gyp ERR! stack at TLSSocket.emit (node:events:529:35)
npm ERR! gyp ERR! stack at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Linux 6.1.84
npm ERR! gyp ERR! command "/usr/lib/sdk/node18/bin/node" "/run/build/cl-electron-server/main/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /run/build/cl-electron-server/main/node_modules/synchronous-socket
npm ERR! gyp ERR! node -v v18.18.1
npm ERR! gyp ERR! node-gyp -v v9.4.1
npm ERR! gyp ERR! not ok
Hey, I am trying to upgrade this package-lock.json to the version 3 so I generate a new package-lock and then generate the generated-sources.json
but after try build the flatpak manifest I am facing this error
flatpak-builder build org.flathub.electron-sample-app.yml --install --force-clean --user
Downloading sources
Downloading https://registry.npmjs.org/@types/plist/-/plist-3.0.5.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1839 100 1839 0 0 2797 0 --:--:-- --:--:-- --:--:-- 2794
Downloading https://registry.npmjs.org/@types/verror/-/verror-1.10.10.tgz
100 2512 100 2512 0 0 4614 0 --:--:-- --:--:-- --:--:-- 817k
Downloading https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz
100 3943 100 3943 0 0 85422 0 --:--:-- --:--:-- --:--:-- 85422
Downloading https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz
100 1803 100 1803 0 0 49846 0 --:--:-- --:--:-- --:--:-- 49846
Downloading https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz
100 3513 100 3513 0 0 72683 0 --:--:-- --:--:-- --:--:-- 72683
Downloading https://registry.npmjs.org/crc/-/crc-3.8.0.tgz
100 19779 100 19779 0 0 518k 0 --:--:-- --:--:-- --:--:-- 518k
Downloading https://registry.npmjs.org/dmg-license/-/dmg-license-1.0.11.tgz
100 24561 100 24561 0 0 780k 0 --:--:-- --:--:-- --:--:-- 780k
Downloading https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz
100 10978 100 10978 0 0 270k 0 --:--:-- --:--:-- --:--:-- 270k
Downloading https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz
100 65652 100 65652 0 0 1636k 0 --:--:-- --:--:-- --:--:-- 1636k
Downloading https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz
100 140k 100 140k 0 0 3617k 0 --:--:-- --:--:-- --:--:-- 3617k
Downloading https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz
100 2915 100 2915 0 0 37491 0 --:--:-- --:--:-- --:--:-- 37491
Downloading https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz
100 21539 100 21539 0 0 569k 0 --:--:-- --:--:-- --:--:-- 569k
Downloading https://registry.npmjs.org/verror/-/verror-1.10.1.tgz
100 12165 100 12165 0 0 343k 0 --:--:-- --:--:-- --:--:-- 343k
Initializing build dir
Committing stage init to cache
Starting build of org.flathub.electron-sample-app
========================================================================
Building module electron-sample-app in /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/build/electron-sample-app-1
========================================================================
Running: npm install --offline
npm info using [email protected]
npm info using [email protected]
up to date, audited 305 packages in 627ms
48 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
npm info ok
Running: . ../flatpak-node/electron-builder-arch-args.sh
npm run dist -- $ELECTRON_BUILDER_ARCH_ARGS --linux --dir
/bin/sh: line 1: ../flatpak-node/electron-builder-arch-args.sh: No such file or directory
Error: module electron-sample-app: Child process exited with code 1
The README mentions the electron tutorial but doesn't link to it.
How to set an icon for the flatpak application generated from this sample electron app?
Hey!
I was following the official electron documentation for flatpak, I realize that this repo does not contain a link to that tutorial (#3 (comment)) So in order to make this repo more easy to follow for new users building flatpaks like me, we can add information which commands users can use to generate generated-sources.json
.
flatpak-node-generator npm package-lock.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.