Bug 416621

Summary: Import a QFX file fails on MacOS
Product: [Applications] kmymoney Reporter: chuckf <cfossen>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: me
Priority: NOR    
Version: 5.0.7   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In: 5.1.0
Sentry Crash Report:

Description chuckf 2020-01-22 18:44:40 UTC
SUMMARY
Import a QFX file fails on MacOS.

STEPS TO REPRODUCE
1. Open import > OFX

OBSERVED RESULT
Console output:
OfxImporterPlugin::slotImportFile
setup callback routines
process data
LibOFX INFO: libofx_proc_file(): File format not specified, autodetecting...
LibOFX INFO: libofx_proc_file(): Detected file format: OFX (Open Financial eXchange (OFX or QFX))
LibOFX INFO: sanitize_proprietary_tags() removed: <INTU.BID>7492</INTU.BID>
LibOFX ERROR: find_dtd():Unable to find the DTD named opensp.dcl
LibOFX ERROR: find_dtd():Unable to find the DTD named ofx160.dtd
LibOFX ERROR: ofx_proc_file(): FATAL: Missing DTD, aborting
process data done

EXPECTED RESULT
Import file without errors.

SOFTWARE/OS VERSIONS
Version 5.0.7-f5b86b78d
macOS: 10.14.6

ADDITIONAL INFORMATION
I see opensp.dcl and ofx160.dtd in the kmymoney package.
Does the importer know where to find the files on MacOS?
Comment 1 chuckf 2020-01-24 03:17:52 UTC
I have a workaround by adding the /Applications/kmymoney.app/Contents/Resources/libofx/dtd
dir to the search path that libofx expects.

> ln -s /Applications/kmymoney.app/Contents/Resources/libofx/ /usr/local/share/libofx
Am I the only one who uses kmymoney on MacOS?
Comment 2 Thomas Baumgart 2020-01-25 08:23:07 UTC
Glad you found a workaround. In order to try to fix it, we need to know from where (URL) you obtained the package you installed?
Comment 4 Thomas Baumgart 2020-01-31 20:05:26 UTC
Can you find out where the file

....libofx/dtd/ofx160.dtd

is installed on your system? I am interested in the absolute path. Is this path somehow relative to the installation directory? Did you choose one when installing or does this happen automatically? Sorry, if these are stupid questions, but I have no idea about MacOS.
Comment 5 Thomas Baumgart 2020-01-31 21:20:41 UTC
Git commit c737397b2924166b6a419110640794e115112ca2 by Thomas Baumgart.
Committed on 31/01/2020 at 21:20.
Pushed by tbaumgart into branch '5.0'.

Add path to load OFX DTDs on MacOS
FIXED-IN: 5.0.9

M  +8    -0    kmymoney/plugins/ofx/import/ofximporter.cpp

https://commits.kde.org/kmymoney/c737397b2924166b6a419110640794e115112ca2
Comment 6 Thomas Baumgart 2020-01-31 21:21:22 UTC
Git commit fb1f9ab3b5bd14006f9885cdd87d048437aeef8f by Thomas Baumgart.
Committed on 31/01/2020 at 21:21.
Pushed by tbaumgart into branch 'master'.

Add path to load OFX DTDs on MacOS
FIXED-IN: 5.0.9
(cherry picked from commit c737397b2924166b6a419110640794e115112ca2)

M  +8    -0    kmymoney/plugins/ofx/import/ofximporter.cpp

https://commits.kde.org/kmymoney/fb1f9ab3b5bd14006f9885cdd87d048437aeef8f
Comment 7 chuckf 2020-02-01 04:27:05 UTC
Thank you for adding the search path for MacOS. However, the builds for MacOS have been failing since mid December. How do we get a build working? Should a bug be opened?
Comment 8 Thomas Baumgart 2020-02-01 09:09:26 UTC
I know, and KMyMoney is not alone with that problem. See https://binary-factory.kde.org/view/MacOS/. Not sure, to whom you want to assign this bug. Also not sure, what the cause to this problem is. My MAC knowledge equals zero at this point.
Comment 9 Jack 2020-02-10 17:52:50 UTC
Would it be appropriate to open a SysAdmin ticket?  Many of the failing apps started failing 27 or 28 days ago, so it looks like something in the CI system might have changed then.