Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Auto-install" SDK doesn't seem to work #22

Open
jacobq opened this issue Jul 2, 2018 · 3 comments
Open

"Auto-install" SDK doesn't seem to work #22

jacobq opened this issue Jul 2, 2018 · 3 comments

Comments

@jacobq
Copy link

jacobq commented Jul 2, 2018

What version of electron-installer-flatpak are you using?
0.99.2

What version of node and npm are you using?
node: 8.11.3
npm: 6.1.0

What operating system are you using?
Linux

Can you compile the example app successfully?

If I manually install the base images / SDKs / runtimes / whatever, then I can build the example as well as my app.

What did you do? Please include the configuration you are using for electron-installer-flatpak.
I am trying to build an ember-electron app on AppVeyor CI (default/empty electronInstallerFlatpak options) but recently started seeing failures building the flatpak outputs. A closer look suggests that part of the flatpak toolchain is prompting the user to confirm installation with y/n but then defaulting to n (since there is no user; this is running non-interactively). See below output snippet:

flatpak-bundler Using options...
  flatpak-bundler {
  flatpak-bundler   "arch": "x86_64",
  flatpak-bundler   "bundle-path": "/home/appveyor/projects/my-app/electron-out/make/io.atom.electron.my-app_master_x86_64.flatpak",
  flatpak-bundler   "working-dir": "/var/tmp/tmp-20645adiqn00B9iPb",
  flatpak-bundler   "build-dir": "/var/tmp/tmp-20645adiqn00B9iPb/build",
  flatpak-bundler   "repo-dir": "/var/tmp/tmp-20645adiqn00B9iPb/repo",
  flatpak-bundler   "manifest-path": "/var/tmp/tmp-20645adiqn00B9iPb/manifest.json",
  flatpak-bundler   "extra-flatpak-builder-args": [],
  flatpak-bundler   "extra-flatpak-build-bundle-args": [],
  flatpak-bundler   "extra-flatpak-build-export-args": [],
  flatpak-bundler   "clean-tmpdirs": true,
  flatpak-bundler   "auto-install-runtime": true,
  flatpak-bundler   "auto-install-sdk": true,
  flatpak-bundler   "auto-install-base": true
  flatpak-bundler } +6ms
  flatpak-bundler Ensuring runtime is up to date +1ms
  flatpak-bundler Checking for install of org.freedesktop.Platform +0ms
  flatpak-bundler $ flatpak info --show-commit --user org.freedesktop.Platform/x86_64/1.4 +1ms
  flatpak-bundler $ flatpak info --show-commit --system org.freedesktop.Platform/x86_64/1.4 +18ms
  flatpak-bundler 2> error: org.freedesktop.Platform/x86_64/1.4 not installed
  flatpak-bundler  +26ms
  flatpak-bundler 2> error: org.freedesktop.Platform/x86_64/1.4 not installed
  flatpak-bundler  +1ms
  flatpak-bundler No install of org.freedesktop.Platform found, trying to install from https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-runtime-1.4.flatpakref +1ms
  flatpak-bundler $ flatpak install --user --no-deps --arch x86_64 --from https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-runtime-1.4.flatpakref +0ms
  flatpak-bundler 1> Installing: org.freedesktop.Platform/x86_64/1.4
  flatpak-bundler  +155ms
  flatpak-bundler 1> Installing in user:
  flatpak-bundler org.freedesktop.Platform/x86_64/1.4	org.freedesktop.Platform-1-origin	45ba501d99df
  flatpak-bundler org.freedesktop.Platform.Locale/x86_64/1.4	org.freedesktop.Platform-1-origin	7e3738c90e1d
  flatpak-bundler  +4s
  flatpak-bundler 1> Is this ok [y/n]: n
  flatpak-bundler  +1ms
  flatpak-bundler Ensuring sdk is up to date +1ms
  flatpak-bundler Checking for install of org.freedesktop.Sdk +0ms
  flatpak-bundler $ flatpak info --show-commit --user org.freedesktop.Sdk/x86_64/ +1ms
  flatpak-bundler $ flatpak info --show-commit --system org.freedesktop.Sdk/x86_64/ +17ms
  flatpak-bundler 2> error: org.freedesktop.Sdk/x86_64/*unspecified* not installed
  flatpak-bundler  +26ms
  flatpak-bundler 2> error: org.freedesktop.Sdk/x86_64/*unspecified* not installed
  flatpak-bundler  +7ms
  flatpak-bundler No install of org.freedesktop.Sdk found, trying to install from https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-sdk-1.4.flatpakref +0ms
  flatpak-bundler $ flatpak install --user --no-deps --arch x86_64 --from https://raw.githubusercontent.com/endlessm/flatpak-bundler/master/refs/freedesktop-sdk-1.4.flatpakref +0ms
  flatpak-bundler 1> Installing: org.freedesktop.Sdk/x86_64/1.4
  flatpak-bundler  +94ms
  flatpak-bundler 1> Installing in user:
  flatpak-bundler org.freedesktop.Sdk/x86_64/1.4	org.freedesktop.Sdk-1-origin	d6a8c46e30e0
  flatpak-bundler org.freedesktop.Sdk.Locale/x86_64/1.4	org.freedesktop.Sdk-1-origin	3014dee891a9
  flatpak-bundler Is this ok [y/n]: n
  flatpak-bundler  +2s
  flatpak-bundler Ensuring base app is up to date +2ms
  flatpak-bundler Checking for install of io.atom.electron.BaseApp +0ms
  flatpak-bundler $ flatpak info --show-commit --user io.atom.electron.BaseApp/x86_64/master +0ms
  flatpak-bundler $ flatpak info --show-commit --system io.atom.electron.BaseApp/x86_64/master +18ms
  flatpak-bundler 2> error: io.atom.electron.BaseApp/x86_64/master not installed
  flatpak-bundler  +27ms
  flatpak-bundler 2> error: io.atom.electron.BaseApp/x86_64/master not installed
  flatpak-bundler  +6ms
  flatpak-bundler No install of io.atom.electron.BaseApp found, trying to install from https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref +0ms
  flatpak-bundler $ flatpak install --user --no-deps --arch x86_64 --from https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/electron-base-app-master.flatpakref +0ms
  flatpak-bundler 1> Installing: io.atom.electron.BaseApp/x86_64/master
  flatpak-bundler  +361ms
  flatpak-bundler 1> Installing in user:
  flatpak-bundler io.atom.electron.BaseApp/x86_64/master	io.atom.electron.BaseApp-1-origin	bb7a31318287
  flatpak-bundler io.atom.electron.BaseApp.Locale/x86_64/master	 +2s
  flatpak-bundler 1> io.atom.electron.BaseApp-1-origin	ce28e923d327
  flatpak-bundler Is this ok [y/n]: n
  flatpak-bundler  +0ms
  flatpak-bundler $ flatpak-builder --arch x86_64 --force-clean --build-only /var/tmp/tmp-20645adiqn00B9iPb/build /var/tmp/tmp-20645adiqn00B9iPb/manifest.json +3ms
  flatpak-bundler 2> 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property base-flatpakref for type BuilderManifest
  flatpak-bundler 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property runtime-flatpakref for type BuilderManifest
  flatpak-bundler 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property sdk-flatpakref for type BuilderManifest
  flatpak-bundler 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property files for type BuilderManifest
  flatpak-bundler 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property symlinks for type BuilderManifest
  flatpak-bundler  +29ms
  flatpak-bundler 2> 
  flatpak-bundler (flatpak-builder:23741): flatpak-builder-WARNING **: Unknown property extra-exports for type BuilderManifest
  flatpak-bundler  +1ms
  flatpak-bundler 2> error: org.freedesktop.Sdk/x86_64/1.4 not installed
  flatpak-bundler  +7ms
  flatpak-bundler 2> Failed to init: Unable to find sdk org.freedesktop.Sdk version 1.4
  flatpak-bundler  +0ms
  electron-installer-flatpak Error creating package: flatpak-builder failed with status code 1 +10s
An error occured while making for target: flatpak


=================================================================================

ENV Summary:

  TIME: Mon Jul 02 2018 09:18:08 GMT-0700 (PDT)
  TITLE: ember
  ARGV:
  - /home/appveyor/.nvm/versions/node/v8.11.3/bin/node
  - /home/appveyor/projects/my-app/node_modules/.bin/ember
  - electron:make
  EXEC_PATH: /home/appveyor/.nvm/versions/node/v8.11.3/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /usr/lib/jvm/java-9-openjdk-amd64/bin
  - /home/appveyor/.rvm/gems/ruby-2.0.0-p648/bin
  - /home/appveyor/.rvm/gems/ruby-2.0.0-p648@global/bin
  - /home/appveyor/.rvm/rubies/ruby-2.0.0-p648/bin
  - /home/appveyor/.gvm/bin
  - /home/appveyor/bin
  - /home/appveyor/.local/bin
  - /home/appveyor/.gvm/bin
  - /home/appveyor/.nvm/versions/node/v8.11.3/bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  - /usr/games
  - /usr/local/games
  - /snap/bin
  - /home/appveyor/.dotnet/tools
  - /home/appveyor/.rvm/bin
  - /home/appveyor/.rvm/bin
  - /opt/mssql-tools/bin
  - ./node_modules/.bin/
  PLATFORM: linux x64
  FREEMEM: 689606656
  TOTALMEM: 3633496064
  UPTIME: 2738
  LOADAVG: 1.00048828125,0.673828125,0.37451171875
  CPUS:
  - Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz - 2600
  - Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz - 2600
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.10.1-DEV
  - cldr: 32.0
  - http_parser: 2.8.0
  - icu: 60.1
  - modules: 57
  - napi: 3
  - nghttp2: 1.32.0
  - node: 8.11.3
  - openssl: 1.0.2o
  - tz: 2017c
  - unicode: 10.0
  - uv: 1.19.1
  - v8: 6.2.414.54
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - codeFrame: [undefined]
  - errorMessage: An error occured while making for target: flatpak
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: An error occured while making for target: flatpak
  - name: [undefined]
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: flatpak-builder failed with status code 1
Error: flatpak-builder failed with status code 1
    at ChildProcess.child.on (/home/appveyor/projects/my-app/node_modules/flatpak-bundler/index.js:74:16)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

=================================================================================

What did you expect to happen?
Based on this project's README and previous experience, I expected the needed assets to be automatically downloaded and the build to succeed.

Building an electron flatpak requires installing a "base" flatpak application with electron library dependencies. That base will be autoinstalled during an app build.

What actually happened?
Looking at debug output (e.g. DEBUG=flatpak-bundler ember electron:make) it appears that the needed files were not downloaded, and the build failed.

@nedrichards
Copy link

Just a quick drive by comment, will try and look closer into it later. Flatpak 0.99.1 added this y/n support: https://github.com/flatpak/flatpak/releases/tag/0.99.1

I believe if you pass -y or --assumeyes on the CLI it'll work. however I think there are some other issues with the support here. Work on the BaseApp has been advanced a lot more over at Flathub (there's even an Electron2 version, where you don't need GTK2 anymore). This module could certainly do with some work.

@jacobq
Copy link
Author

jacobq commented Jul 2, 2018

@nedrichards Thanks for taking a quick look. That sounds like it matches with the problem I had. It's not trivial for me to pass command line options since it's a bit buried: I run ember-electron, which runs electron-forge, which runs electron-installer-flatpak I believe, but will be on the look-out for changes in the future. To work around this for now I'm going to try explicitly installing the needed pieces beforehand using the flatpak binary.

@jacobq
Copy link
Author

jacobq commented Jul 18, 2018

Somewhat related to this....Is there a way to use the Flathub BaseApp image instead via configuration? (In other words, do these options get passed to here so that they can overwrite what's passed to flatpak-bundler?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants