Bug 418823 - Script based online quotes do not work in the AppImage version
Summary: Script based online quotes do not work in the AppImage version
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: 5.0.8
Platform: Other Linux
: NOR major (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-13 14:57 UTC by JAH
Modified: 2020-06-05 04:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JAH 2020-03-13 14:57:25 UTC
SUMMARY
Script based price updates with URLs in the form ‘file:/path/to/getquote.sh %1’ (or specifically in my case file:///path) no longer work in KMyMoney-5.0.8-efd5847-x86_64.AppImage although they still work in 5.0.0.

STEPS TO REPRODUCE
1. Upgrade to 5.0.8
2. Run Online price update
3. 

OBSERVED RESULT
Unable to launch: /home/admin/Kmymoney/GetPrices.sh XYZ.L
Unable to update price for XYZ.L (empty quote data)

EXPECTED RESULT
Price should update as it does in Vn5.0.0


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: OpenSuse Leap 15.0
(available in About System)
KDE Plasma Version: 5.12.8
KDE Frameworks Version: 5.45.0
Qt Version: 5.9.4

ADDITIONAL INFORMATION

I have checked permissions, tried moving the script, amended the online quote 
settings URL but without success although all still woks fine in 5.0.0
Comment 1 JAH 2020-03-13 15:52:16 UTC
I should add that I only use this to import a csv file of prices in the format:
Symbol, price, date

and that if the CSV importer were able to handle that as an update to kmm.prices it would be an ideal alternative to script based price updates for many users because such price csv files can be downloaded from a Yahoo finance portfolio (even though Yahoo finance no longer provides individual prices enquiries)
Comment 2 Thomas Baumgart 2020-03-14 05:49:39 UTC
I am not able to duplicate this problem with a locally build and installed KMyMoney but using the AppImage version (same git sha). So it seems this is a problem of the AppImage version only. Not sure if https://github.com/AppImage/AppImageKit/issues/396 is relevant here.
Comment 3 Thomas Baumgart 2020-03-14 07:06:11 UTC
I was able to figure out what the cause to this problem is:

execve("/home/thb/bin/kmm_price.sh", ["/home/thb/bin/kmm_price.sh", "NYCB"], 0x7ffc20c18f08 /* 113 vars */) = -1 ENOEXEC (Exec format error)
Comment 4 Thomas Baumgart 2020-03-14 07:39:57 UTC
Git commit 8024818f811c74bb6e1578db0f9a64787c6f65d8 by Thomas Baumgart.
Committed on 14/03/2020 at 07:39.
Pushed by tbaumgart into branch '5.0'.

Allow local script files as price update sources in AppImage

The price update service in KMyMoney allows to start local scripts to
fetch price information. This did not work when started as AppImage.
This change brings that functionality to the AppImage version.

Within the AppImage version a configured URL such as

 "file:///home/user/bin/price.sh %1"

is called as "/bin/sh" "-c" "/home/user/bin/price.sh %1" where %1 will
be replaced with the actual investment symbol.
FIXED-IN: 5.0.9

M  +7    -0    kmymoney/converter/webpricequote.cpp

https://commits.kde.org/kmymoney/8024818f811c74bb6e1578db0f9a64787c6f65d8
Comment 5 JAH 2020-03-14 10:47:00 UTC
Thank you for addressing this issue. The Appimage version is a great way to access the updated version prior to distro updates and this will return it to full functionality for me. Many thanks.