flathub / io.dbeaver.DBeaverCommunity

https://flathub.org/apps/details/io.dbeaver.DBeaverCommunity
19 stars 10 forks source link

Unable to launch from the desktop icon in Fedora #173

Open harunorimurata opened 1 year ago

harunorimurata commented 1 year ago

I got an error log in ~/.local/share/DBeaverData/workspace6/.metadata/.log. "そのようなファイルやディレクトリはありません" means "No such file or directory" in English.

!ENTRY org.eclipse.ui 2 2 2023-05-17 15:41:55.123
!MESSAGE Invalid preference category path: org.eclipse.debug.ui.ConsolePreferencePage (bundle: org.eclipse.ui.console, page: org.eclipse.ui.internal.console.ansi.preferences.AnsiConsolePreferencePage)
!SESSION 2023-05-17 15:42:32.465 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.6
java.vendor=Flathub
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=ja_JP
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.urischeme 4 0 2023-05-17 15:42:35.185
!MESSAGE Cannot run program "xdg-mime": error=2, そのようなファイルやディレクトリはありません
!STACK 0
java.io.IOException: Cannot run program "xdg-mime": error=2, そのようなファイルやディレクトリはありません
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.eclipse.urischeme.internal.registration.ProcessExecutor.execute(ProcessExecutor.java:36)
    at org.eclipse.urischeme.internal.registration.RegistrationLinux.getRegisteredDesktopFileForScheme(RegistrationLinux.java:145)
    at org.eclipse.urischeme.internal.registration.RegistrationLinux.determineHandlerLocation(RegistrationLinux.java:87)
    at org.eclipse.urischeme.internal.registration.RegistrationLinux.getSchemesInformation(RegistrationLinux.java:76)
    at org.eclipse.urischeme.AutoRegisterSchemeHandlersJob.run(AutoRegisterSchemeHandlersJob.java:87)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: error=2, そのようなファイルやディレクトリはありません
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 7 more

!ENTRY org.eclipse.ui 2 2 2023-05-17 15:42:36.463
!MESSAGE Invalid preference category path: org.eclipse.debug.ui.ConsolePreferencePage (bundle: org.eclipse.ui.console, page: org.eclipse.ui.internal.console.ansi.preferences.AnsiConsolePreferencePage)

Somehow, it's able to launch via CLI.

flatpak run io.dbeaver.DBeaverCommunity

My PC Spec:

DBeaver Version: 23.0.4

Eonfge commented 1 year ago

I'm not sure what happened here. It could be a localization issue with DBeaver itself. It seems it has problems with loading the xdg-mime directory.

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=DBeaver CE
Comment=Universal Database Manager and SQL Client.
Icon=io.dbeaver.DBeaverCommunity
StartupWMClass=DBeaver
StartupNotify=true
X-Desktop-File-Install-Version=0.26
Categories=IDE;Development;
Keywords=Database;SQL;IDE;JDBC;ODBC;MySQL;PostgreSQL;
GenericName=Database Manager
MimeType=application/sql;
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/dbeaver/dbeaver io.dbeaver.DBeaverCommunity
X-Flatpak=io.dbeaver.DBeaverCommunity

Question, just to be sure... what happens when you do

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/dbeaver/dbeaver io.dbeaver.DBeaverCommunity ?

serious-angel commented 1 month ago

Question, just to be sure... what happens when you do

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/dbeaver/dbeaver io.dbeaver.DBeaverCommunity ?

This would result in the following error:

bwrap: execvp /app/dbeaver/dbeaver: No such file or directory

The location of the executable is different, and the Exec directive value should be:

/usr/bin/flatpak run \
    --branch=stable \
    --arch=x86_64 \
    --command=/app/bin/dbeaver `# The actual executable location` \
    io.dbeaver.DBeaverCommunity
Eonfge commented 1 month ago

A few months, I changed the default directly path and I also updated the PATH accordingly.

Does this bug still occur or did I fix or by accident?

serious-angel commented 1 month ago

A few months, I changed the default directly path and I also updated the PATH accordingly.

Does this bug still occur or did I fix or by accident?

An installation of DBeaver via KDE Discover results in a shortcut created shown in KDE Plasma desktop Kickoff Application Launcher menu.

The shortcut, in turn, contains /app/dbeaver/dbeaver. A manual modification of the shortcut command setting to contain /app/bin/dbeaver solves the issue.

The same issue happens with the DBeaver user-settings purged using Discover prompt, and a fresh reinstall (remove and install).

Meanwhile, it's worth to mention that the .desktop file Flatpak located in /var/lib/flatpak/app/io.dbeaver.DBeaverCommunity/current/active/files/share/applications/io.dbeaver.DBeaverCommunity.desktop contains an actually valid command mentioned in all the cases: flatpak run io.dbeaver.DBeaverCommunity.

Eonfge commented 1 month ago

What I got:

/var/lib/flatpak/app/io.dbeaver.DBeaverCommunity/current/active/export/share/applications/io.dbeaver.DBeaverCommunity.desktop

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=DBeaver CE
Comment=Universal Database Manager and SQL Client.
Icon=io.dbeaver.DBeaverCommunity
StartupWMClass=DBeaver
StartupNotify=true
X-Desktop-File-Install-Version=0.27
Categories=IDE;Development;
Keywords=Database;SQL;IDE;JDBC;ODBC;MySQL;PostgreSQL;
GenericName=Database Manager
MimeType=application/sql;
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/dbeaver io.dbeaver.DBeaverCommunity
X-Flatpak=io.dbeaver.DBeaverCommunity

I'm unsure why KDE Discover messes up the app path. Let me see if I can reproduce it

Eonfge commented 1 month ago

Screenshot from 2024-10-23 10-19-30

Still no clue