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

DNM Add flatpak manifest: offline theia build not working #390

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

LorbusChris
Copy link

This change adds a flatpak manifest.

It is not meant for inclusion here but rather meant to help fix remaining issues with this way of building theia-ide in an offline-manner.

Eventually, my plan is to create a dedicated repo for this on Flathub.

Related to: #360


I'm running into two distinct issues with the offline building of theia-ide as required for flatpaks.
I'll focus on the building of the electron app for now as that's what's going to be needed for the flatpak container.

This specific issues arises here when theia build --app-target="electron" is invoked (the yarn -s rebuild beforehand finishes successfully).

theia build is trying to call out to github and we can't have that in an offline build. If anyone could help solve this I'd highly appreciate it.

$ flatpak run org.flatpak.Builder build-init org.eclipse.theia-ide.yaml --force-clean --install-deps-from=flathub --user --install
[snip]
theia-ide-electron-app: ✔ Rebuild Complete
theia-ide-electron-app: npm http fetch GET https://registry.yarnpkg.com/npm attempt 2 failed with EAI_AGAIN
theia-ide-electron-app: npm info ok
theia-ide-electron-app: RequestError: getaddrinfo EAI_AGAIN github.com
theia-ide-electron-app:     at ClientRequest.<anonymous> (/run/build/theia-ide/node_modules/got/dist/source/core/index.js:970:111)
theia-ide-electron-app:     at Object.onceWrapper (node:events:632:26)
theia-ide-electron-app:     at ClientRequest.emit (node:events:529:35)
theia-ide-electron-app:     at origin.emit (/run/build/theia-ide/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
theia-ide-electron-app:     at TLSSocket.socketErrorListener (node:_http_client:501:9)
theia-ide-electron-app:     at TLSSocket.emit (node:events:517:28)
theia-ide-electron-app:     at emitErrorNT (node:internal/streams/destroy:151:8)
theia-ide-electron-app:     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
theia-ide-electron-app:     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
theia-ide-electron-app:     at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
theia-ide-electron-app:   code: 'EAI_AGAIN',
theia-ide-electron-app:   timings: {
theia-ide-electron-app:     start: 1725423186506,
theia-ide-electron-app:     socket: 1725423186509,
theia-ide-electron-app:     lookup: 1725423186510,
theia-ide-electron-app:     connect: undefined,
theia-ide-electron-app:     secureConnect: undefined,
theia-ide-electron-app:     upload: undefined,
theia-ide-electron-app:     response: undefined,
theia-ide-electron-app:     end: undefined,
theia-ide-electron-app:     error: 1725423186510,
theia-ide-electron-app:     abort: undefined,
theia-ide-electron-app:     phases: {
theia-ide-electron-app:       wait: 3,
theia-ide-electron-app:       dns: 1,
theia-ide-electron-app:       tcp: undefined,
theia-ide-electron-app:       tls: undefined,
theia-ide-electron-app:       request: undefined,
theia-ide-electron-app:       firstByte: undefined,
theia-ide-electron-app:       download: undefined,
theia-ide-electron-app:       total: 4
theia-ide-electron-app:     }
theia-ide-electron-app:   }
theia-ide-electron-app: }
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Running target build:prod for project theia-ide-electron-app failed

   Failed tasks:
   
   - theia-ide-electron-app:build:prod
   
   Hint: run the command with --verbose for more details.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: module theia-ide: Child process exited with code 1

Required for generating offline-installable sources with `flatpak-node-generator`
@LorbusChris LorbusChris marked this pull request as draft September 4, 2024 04:25
@LorbusChris LorbusChris changed the title Draft: DNM Add flatpak manifest: offline theia build not working DNM Add flatpak manifest: offline theia build not working Sep 4, 2024
@LorbusChris LorbusChris mentioned this pull request Sep 4, 2024
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

Successfully merging this pull request may close these issues.

1 participant