Kresus can't import ofx (SSOwat : CORS ?)

:uk: My YunoHost server

Hardware: VM @ home
YunoHost version: 11.2.10.3
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: ynh.app on raidz ZFS / wireguard for an IP facing the world
If your request is related to an app, specify its name and version: Kresus 0.20.1~ynh3

Description of my issue

Hi :slight_smile:
Fresh install of Kresus, trying to import on OFX file fail with Invalid OFX file. Veuillez vous référer à la console développeurs pour plus d’informations. error message.
The dev console says :

[HTTP/2 500 Internal Server Error 52ms]
A request has failed with the following information:
- code: null
- short message: Invalid OFX file.
- stack: no stack
- message: Invalid OFX file.
- stringified: {"code":null,"message":"Invalid OFX file.","shortMessage":"Invalid OFX file."}

The HTTP answer is :

HTTP/2 500 Internal Server Error
server: nginx
date: Thu, 25 Apr 2024 13:48:34 GMT
content-type: application/json; charset=utf-8
content-length: 63
x-sso-wat: You've just been SSOed
x-powered-by: Express
etag: W/"3f-Dwh+AR1IqAx2nPi3ma5xHvkJSZ8"
content-security-policy: upgrade-insecure-requests
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
x-frame-options: SAMEORIGIN
permissions-policy: interest-cohort=()
strict-transport-security: max-age=63072000; includeSubDomains; preload
X-Firefox-Spdy: h2

I tried to add

{"skipped_urls": [                                                                                                                                  [0/3564]
                "domain.tld/kresus/api/all/import/ofx",
                "/ofx"
            ],
}

in /etc/ssowat/conf.json.persistent without success (run yunohost app ssowhatconf et restart nginx)

My OFX file import well in other clients, an other OFX file produce same results.

How can I import an OFX file in Kresus ? Any advice ?


:fr: Mon serveur YunoHost

Matériel: VVM @ home
Version de YunoHost: 11.2.10.3
J’ai accès à mon serveur : En SSH | Par la webadmin | En direct avec un clavier/écran | …
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer: ynh.app sur point de montage / IP publique par tunnel Wireguard
Si votre requête est liée à une application, précisez son nom et sa version: Kresus 0.20.1~ynh3

Description du problème

Bonjour :slightly_smiling_face:
Sur une installation toute neuve de Kresus, l’importer un fichier OFX échoue avec pour message d’erreur : Invalid OFX file. Veuillez vous référer à la console développeurs pour plus d’informations.
Dans la console de développement de Firefox :

[HTTP/2 500 Internal Server Error 52ms]
A request has failed with the following information:
- code: null
- short message: Invalid OFX file.
- stack: no stack
- message: Invalid OFX file.
- stringified: {"code":null,"message":"Invalid OFX file.","shortMessage":"Invalid OFX file."}

La réponse HTTP :

HTTP/2 500 Internal Server Error
server: nginx
date: Thu, 25 Apr 2024 13:48:34 GMT
content-type: application/json; charset=utf-8
content-length: 63
x-sso-wat: You've just been SSOed
x-powered-by: Express
etag: W/"3f-Dwh+AR1IqAx2nPi3ma5xHvkJSZ8"
content-security-policy: upgrade-insecure-requests
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
x-frame-options: SAMEORIGIN
permissions-policy: interest-cohort=()
strict-transport-security: max-age=63072000; includeSubDomains; preload
X-Firefox-Spdy: h2

J’ai essayé d’ajouter :

{"skipped_urls": [                                                                                                                                  [0/3564]
                "domain.tld/kresus/api/all/import/ofx",
                "/ofx"
            ],
}

dans /etc/ssowat/conf.json.persistent sans que ça ne change rien. (lancer yunohost app ssowhatconf et restart nginx)

Mon fichier OF s’importe correctement dans d’autres logiciels, un autre fichier OFX donne la même erreur.

Comment faire pour importer un fichier OFX ? Avez-vous des conseils ?

I have just tried importing the OFX file used to test the feature for Kresus development, and it works fine:

(sharing the screenshot, 'cause I’ve just had a good laugh. There’s something buggy with my own bank data parsing, I am definitely not a billionaire)

Can you try importing that file?

Damned you went rich ! :laughing:

Well, the OFX you shared imports well, I’ll investigate more on the OFX of my bank then…

How big is your file? Maybe you reached an upload limit for NGINX, though I think the error would have been different.

Otherwise, you may need to reach for Kresus support. Keep us in touch with what you find.