flathub / com.vscodium.codium

https://flathub.org/apps/details/com.vscodium.codium
94 stars 19 forks source link

SDK (node14) not working suddenly, but up-to-date runtime/org.freedesktop.Sdk.Extension.node18/x86_64/23.08 also fails #264

Closed rugk closed 7 months ago

rugk commented 7 months ago

STR

I had Node14 SDK extension installed and VSCodium.

Suddenly it sopped working. Without a terminal you see nothing. (IMHO kind of bad UX, but okay.)

With one, you see the error, however:

$ flatpak run com.vscodium.codium             
codium-wrapper: Requested SDK extension "node14" is not installed
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages

I assume, this happened, because Node14 uses and outdated SDK or so.

To be exact I seem to have runtime/org.freedesktop.Sdk.Extension.node14/x86_64/21.08 installed and it is pinned (which is useful), so it could not be removed by flatpak remove --outdated.

So I removed that:

$ flatpak remove org.freedesktop.Sdk.Extension.node14 

        KENNUNG                                       Zweig          Op
 1. [-] org.freedesktop.Sdk.Extension.node14          21.08          r

Deinstallation abgeschlossen.

And decided to update my Node version in one step, so installed (using the latest v23.08 whatever that is – freedesktop version probably? – anyway it seems to match what VSCodium uses):

flatpak install org.freedesktop.Sdk.Extension.node18
Suchen nach Übereinstimmungen …
Remotes found with refs similar to ‘org.freedesktop.Sdk.Extension.node18’:

   1) ‘flathub’ (system)
   2) ‘flathub-beta’ (system)

Which do you want to use (0 to abort)? [0-2]: 1
Similar refs found for ‘org.freedesktop.Sdk.Extension.node18’ in remote ‘flathub’ (system):

   1) runtime/org.freedesktop.Sdk.Extension.node18/x86_64/21.08
   2) runtime/org.freedesktop.Sdk.Extension.node18/x86_64/22.08
   3) runtime/org.freedesktop.Sdk.Extension.node18/x86_64/23.08

Which do you want to use (0 to abort)? [0-3]: 3

        KENNUNG                                         Zweig            Op            Gegenstelle            Herunterladen
 1. [✓] org.freedesktop.Sdk.Extension.node18            23.08            i             flathub                16,6 MB / 19,6 MB

Installation abgeschlossen.

Now adjusted, the env variable via Flatseal (GUI) to FLATPAK_ENABLE_SDK_EXT=node18, and tried starting it;

flatpak run com.vscodium.codium
codium-wrapper: Evaluating /usr/lib/sdk/node18/enable.sh
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages

~ …
➜ flatpak run com.vscodium.codium
codium-wrapper: Evaluating /usr/lib/sdk/node18/enable.sh
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages
[2 zypak-helper] Wait found events, but sd-event found none

Every try starting afterwards, continues to fail with the same error from [2 zypak-helper].

System

$flatpak info com.vscodium.codium 

VSCodium - Code editing. Redefined. Telemetry less.

         Kennung: com.vscodium.codium
             Ref: app/com.vscodium.codium/x86_64/stable
     Architektur: x86_64
           Zweig: stable
         Version: 1.84.0.23306
          Lizenz: MIT
        Ursprung: flathub
        Sammlung: org.flathub.Stable
    Installation: system
     Installiert: 342,5 MB
Laufzeitumgebung: org.freedesktop.Sdk/x86_64/23.08
             Sdk: org.freedesktop.Sdk/x86_64/23.08

          Commit: 2876e43350a4f116ba258858374ea844c184bcb5398e923723cf10de6b3d1d0b
          Parent: 2a733c96c2103c081c538b0ba16b99d836e94db9faed981368dc99c17692de54
         Betreff: :fire: Remove old flathub.json (c8aa39cf)
           Datum: 2023-11-16 03:00:48 +0000

Previously installed:

flatpak info org.freedesktop.Sdk.Extension.node14 

Node.js 14.x - JavaScript runtime built on V8 JavaScript engine

     Kennung: org.freedesktop.Sdk.Extension.node14
         Ref: runtime/org.freedesktop.Sdk.Extension.node14/x86_64/21.08
 Architektur: x86_64
       Zweig: 21.08
     Version: 14.21.1
      Lizenz: MIT
    Ursprung: flathub
    Sammlung: org.flathub.Stable
Installation: system
 Installiert: 62,1 MB

      Commit: 94fcce6981a965bff9adcf1d07481ffe98669ebb8c0e836897a0ff0b3dd1bb53
      Parent: 5b3562769e6d2384c18a4ab59b4943ccd7729d942cb0398c006887e3a54ff261
     Betreff: Update node-v14.21.0.tar.xz to 14.21.1 (d9674280)
       Datum: 2022-11-04 19:54:12 +0000

Now installed:

$ flatpak info org.freedesktop.Sdk.Extension.node18                                 

Node.js 18.x - JavaScript runtime built on V8 JavaScript engine

     Kennung: org.freedesktop.Sdk.Extension.node18
         Ref: runtime/org.freedesktop.Sdk.Extension.node18/x86_64/23.08
 Architektur: x86_64
       Zweig: 23.08
     Version: 18.18.1
      Lizenz: MIT
    Ursprung: flathub
    Sammlung: org.flathub.Stable
Installation: system
 Installiert: 62,8 MB

      Commit: 4b6d7082b77dd176896b0e693a718c8cddea92c7a695ca63f6adcbd403ad69db
      Parent: 09be50e8df7deb720e9e5d5de8b88131f66e8c7b48405cd0edcc792b3622383d
     Betreff: Update node-v18.18.0.tar.xz to 18.18.1 (445617f0)
       Datum: 2023-10-11 11:40:17 +0000

OS: Fedora SIlverblue 39

$ rpm-ostree
fedora:fedora/39/x86_64/silverblue (index: 1)
                  Version: 39.20231118.0 (2023-11-18T00:53:13Z)
               BaseCommit: c0eeb50f3209a496013e6b88e689f36e8e9a15fa23fcabb0f61d3c50282e0755
                           ├─ repo-0 (2023-11-01T00:12:39Z)
                           ├─ repo-1 (2023-11-18T00:17:31Z)
                           └─ repo-2 (2023-11-18T00:22:28Z)
$ flatpak --version              
Flatpak 1.15.4
rugk commented 7 months ago

Tried again, still failing:

$ flatpak override --user com.vscodium.codium --show
[Context]
sockets=!x11;fallback-x11;

[Session Bus Policy]
org.freedesktop.Flatpak=none

[Environment]
VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items
FLATPAK_PREFER_USER_PACKAGES=1
FLATPAK_ENABLE_SDK_EXT=node18
VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery

$ flatpak run com.vscodium.codium                   
codium-wrapper: Evaluating /usr/lib/sdk/node18/enable.sh
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages
rugk commented 7 months ago

Also for whatever reason, if I remove the SDK .env variable, I also cannot start it, because it still tried to search for the Node14 SDK? I am sorry, but what?

$ flatpak override --user com.vscodium.codium --show
[Context]
sockets=fallback-x11;!x11

[Environment]
VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items
FLATPAK_PREFER_USER_PACKAGES=1
VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery

[Session Bus Policy]
org.freedesktop.Flatpak=none

$ flatpak run com.vscodium.codium                   
codium-wrapper: Requested SDK extension "nodejs14" is not installed
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages
ghost commented 7 months ago

Probably unrelated, but could you change filesystem=host to filesystem=home ? image

From All System Files to All User Files

noonsleeper commented 7 months ago

Also for whatever reason, if I remove the SDK .env variable, I also cannot start it, because it still tried to search for the Node14 SDK? I am sorry, but what?

$ flatpak override --user com.vscodium.codium --show
[Context]
sockets=fallback-x11;!x11

[Environment]
VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items
FLATPAK_PREFER_USER_PACKAGES=1
VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery

[Session Bus Policy]
org.freedesktop.Flatpak=none

$ flatpak run com.vscodium.codium                   
codium-wrapper: Requested SDK extension "nodejs14" is not installed
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages

Hi @rugk, sorry for the delay. Can you try this with the latest com.vscodium.codium 1.84.2?

flatpak override --user --reset com.vscodium.codium
flatpak override --reset com.vscodium.codium
flatpak override --user --env="FLATPAK_ENABLE_SDK_EXT=node18" com.vscodium.codium
flatpak override --user --env="VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items" com.vscodium.codium
flatpak override --user --env="FLATPAK_PREFER_USER_PACKAGES=1" com.vscodium.codium
flatpak override --user --env="VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery" com.vscodium.codium
flatpak run com.vscodium.codium
noonsleeper commented 7 months ago

Like you, I'm on silverblue 39

image image

rugk commented 7 months ago

Fails (also what is overlay? My flatpak does not know this.)

flatpak overlay --override --user --reset com.vscodium.codium
flatpak overlay --override --reset com.vscodium.codium
error: 'overlay' is not a flatpak command. Did you mean 'override'?

See 'flatpak --help'
error: 'overlay' is not a flatpak command. Did you mean 'override'?

See 'flatpak --help'

~ …
✘1 ➜ flatpak override --user --env="FLATPAK_ENABLE_SDK_EXT=node18" com.vscodium.codium

~ …
➜ flatpak override --user --env="VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items" com.vscodium.codium 
flatpak override --user --env="FLATPAK_PREFER_USER_PACKAGES=1" com.vscodium.codium
flatpak override --user --env="VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery" com.vscodium.codium

~ …
➜ flatpak run com.vscodium.codium
codium-wrapper: Evaluating /usr/lib/sdk/node18/enable.sh
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages

Also it has not changed a lot, has it?

$ flatpak override --user com.vscodium.codium --show                               
[Context]
sockets=!x11;fallback-x11;

[Session Bus Policy]
org.freedesktop.Flatpak=none

[Environment]
VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items
FLATPAK_PREFER_USER_PACKAGES=1
FLATPAK_ENABLE_SDK_EXT=node18
VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery
noonsleeper commented 7 months ago

Fails (also what is overlay? My flatpak does not know this.)

Sorry, I mean override

rugk commented 7 months ago

And you likely meant it without --override prefix. But yeah, this has worked:

flatpak override --user --reset com.vscodium.codium           
flatpak override --reset com.vscodium.codium 
flatpak override --user --env="FLATPAK_ENABLE_SDK_EXT=node18" com.vscodium.codium
flatpak override --user --env="VSCODE_GALLERY_ITEM_URL=https://marketplace.visualstudio.com/items" com.vscodium.codium
flatpak override --user --env="FLATPAK_PREFER_USER_PACKAGES=1" com.vscodium.codium
flatpak override --user --env="VSCODE_GALLERY_SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery" com.vscodium.codium
flatpak run com.vscodium.codium
codium-wrapper: Evaluating /usr/lib/sdk/node18/enable.sh
codium-wrapper: Setting up NPM packages
codium-wrapper: Setting up Cargo packages
codium-wrapper: Setting up Python packages
codium-wrapper: Setting up Ruby packages

(GUI starts afterwards.)

BTW same issue happens with Code - OSS:

$ flatpak run com.visualstudio.code-oss                   
code-oss-wrapper: Setting up NPM packages
code-oss-wrapper: Setting up Cargo packages
code-oss-wrapper: Setting up Python packages
noonsleeper commented 7 months ago

BTW same issue happens with Code - OSS:

I see the similar problems on other apps when flatpak changes of version, but dunno about the cause and since flatpak override --reset fix the problem I don't debug this more in depth.

Since your issue was resolved I will close this, If you have another problem don't hesitate and open a new issue

rugk commented 7 months ago

Well I can still reproduce this with one flatpak, so I have opened an upstream issue at https://github.com/flatpak/flatpak/issues/5625 for this now.