Bug 473556 - After Snap install, unable to run any of the supplied scripts
Summary: After Snap install, unable to run any of the supplied scripts
Status: RESOLVED FIXED
Alias: None
Product: kid3
Classification: Applications
Component: general (show other bugs)
Version: 3.9.x
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Scarlett Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-20 09:31 UTC by liamdutton
Modified: 2023-11-03 15:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liamdutton 2023-08-20 09:31:09 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.   Select Media file and open
2.   (example). Right click file and select ReplayGain2SoundCheck.

OBSERVED RESULT
QML Console appears with following message : "file:///usr/share/kid3/qml/script/ReplayGain2SoundCheck.qml: No such file or directory"

EXPECTED RESULT
I'm assuming Replay2GainSoundCheck should run.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.04.3 LTS
OS Type: 64-Bit
Gnome Version: 42.9
Windowing System: Wayland.

ADDITIONAL INFORMATION
I have found the scripts within the snap install directory, but it appears that the application is pointing to the wrong location.
Comment 1 Urs Fleisch 2023-08-30 13:23:16 UTC
Thanks for the report. Since I am not creating the snap package, it is probably better if you report this bug to the people responsible for the snap. There seems to be an error report form on https://snapcraft.io/kid3. I will nevertheless try to give some hints for fixing the compilation or a workaround at runtime.

Fixing the compilation:
The bundled QML scripts have a prefix of %{qmlpath}/ in the "User Actions" tab of the settings. This is done because the self contained Kid3 package is freely relocatable, so this can be used to have the path relative to the program directory. The %{qmlpath} is taken from the CMake variable CFG_QMLDIR, so if snap is using a constant absolute path, it should be set to this path when configuring CMake (cmake ... -DCFG_QMLDIR=/path/to/qmldir ...). If an absolute path is used, it is not taken relative to the program directory.

Workaround:
You could replace all the %{qmlpath} occurrences in the "User Actions" tab of the settings with the path where you found the QML files within the snap install directory. Or you could do it directly in the configuration file which is named kid3rc for the KDE version and Kid3.conf for the Qt-only version.
If you find the configuration file used by the snap (the file is Kid3.conf
Comment 2 Scarlett Moore 2023-10-31 09:01:15 UTC
I will fix this in the next build. Thanks!
Comment 3 Scarlett Moore 2023-11-03 15:10:20 UTC
Please test the latest snap in the snap store. If it still persists reopen this bug. Thanks