[Caisse d'Epargne] Erreurs (woob ?) de SNID

Bonjour à la communauté,

J’ai essayé de relancer Kresus récemment (ça faisait quelques semaines qu’il était arrêté), or je constate un paquet d’erreur que je ne comprends pas. Il me semble que ces erreurs sont principalement liées à woob, mais je viens chercher un peu d’aide ici.

A l’initialisation de Kresus, il essaye de récupérer une première fois des infos d’un compte Caisse d’Epargne, et là premier jet d’erreur :

[2024-07-07T16:06:29.329] [INFO] accounts-manager - Retrieve all accounts from access caissedepargne with login ********
[2024-07-07T16:06:29.338] [INFO] providers/woob - Calling woob: command accounts...
[2024-07-07T16:06:29.339] [INFO] providers/woob - Woob will be updated prior to command "accounts"
[2024-07-07T16:06:34.286] [INFO] providers/woob - exited with code 1.
[2024-07-07T16:06:34.286] [WARN] providers/woob - stderr: 2024-07-07 16:06:33,173:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,173:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,176:DEBUG:urllib3.connectionpool:connectionpool.py:1019:_new_conn Starting new HTTPS connection (1): updates.woob.tech:443
2024-07-07 16:06:33,417:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://updates.woob.tech:443 "GET /3/main/modules.list HTTP/1.1" 200 71958
2024-07-07 16:06:33,471:DEBUG:charset_normalizer:api.py:439:from_bytes Encoding detection: utf_8 is most likely the one.
2024-07-07 16:06:33,510:DEBUG:woob.core.repositories.repository:repositories.py:297:build_index Rebuild index
2024-07-07 16:06:33,925:DEBUG:woob.core.modules.loader:modules.py:250:load_module Loaded module "caissedepargne" from /home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne
2024-07-07 16:06:33,926:DEBUG:woob.backend:modules.py:160:create_instance Created backend "caissedepargne" for module "caissedepargne"
2024-07-07 16:06:33,926:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,927:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,930:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,930:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,930:INFO:woob.caissedepargne.browser:switch.py:88:set_browser using 'main' browser
2024-07-07 16:06:33,930:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,931:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,933:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,933:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:06:33,934:INFO:woob.caissedepargne.browser:switch.py:88:set_browser using 'main' browser
2024-07-07 16:06:33,935:DEBUG:urllib3.connectionpool:connectionpool.py:1019:_new_conn Starting new HTTPS connection (1): www.caisse-epargne.fr:443
2024-07-07 16:06:34,080:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/sso?service=dei HTTP/1.1" 200 1532
2024-07-07 16:06:34,082:DEBUG:woob.caissedepargne.browser:browsers.py:1004:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/sso?service=dei with LoginPage
2024-07-07 16:06:34,097:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/main.9ade9f2a72d62aba.js HTTP/1.1" 200 None
2024-07-07 16:06:34,141:DEBUG:woob.caissedepargne.browser:browsers.py:1004:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/main.9ade9f2a72d62aba.js with JsFilePage
2024-07-07 16:06:34,165:DEBUG:charset_normalizer:api.py:439:from_bytes Encoding detection: utf_8 is most likely the one.
[2024-07-07T16:06:34.286] [INFO] providers/woob - Command returned an error code.
[2024-07-07T16:06:34.287] [INFO] providers/woob - Checking that woob is installed and can actually be called…
[2024-07-07T16:06:34.287] [INFO] providers/woob - Calling woob: command test...
[2024-07-07T16:06:34.674] [INFO] providers/woob - exited with code 0.
[2024-07-07T16:06:34.674] [INFO] providers/woob - OK: woob exited normally with non-empty JSON content.
[2024-07-07T16:06:34.675] [ERROR] providers/woob - Got error while running command "3": Unknown error: Could not find SNIDs in main JS, check if it has been updated.
Traceback (most recent call last):
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 702, in fetch
    results['values'] = self.get_accounts()
                        ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 552, in get_accounts
    for account in list(self.backend.iter_accounts()):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/module.py", line 81, in iter_accounts
    return self.browser.iter_accounts()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/switch.py", line 98, in wrapper
    return val(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/browsers.py", line 1118, in inner
    browser.do_login()
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/mfa.py", line 201, in do_double_authentication
    self.init_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 201, in init_login
    self.do_api_pre_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 227, in do_api_pre_login
    self.snid = self.page.get_snid(self.enseigne.upper())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/pages.py", line 106, in get_snid
    assert snid_dict, 'Could not find SNIDs in main JS, check if it has been updated'
AssertionError: Could not find SNIDs in main JS, check if it has been updated

[2024-07-07T16:06:34.675] [ERROR] providers/woob - 	(error code: GENERIC_EXCEPTION)
[2024-07-07T16:06:34.854] [ERROR] poller - Error when polling accounts: Unknown error: Could not find SNIDs in main JS, check if it has been updated.
Traceback (most recent call last):
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 702, in fetch
    results['values'] = self.get_accounts()
                        ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 552, in get_accounts
    for account in list(self.backend.iter_accounts()):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/module.py", line 81, in iter_accounts
    return self.browser.iter_accounts()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/switch.py", line 98, in wrapper
    return val(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/browsers.py", line 1118, in inner
    browser.do_login()
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/mfa.py", line 201, in do_double_authentication
    self.init_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 201, in init_login
    self.do_api_pre_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 227, in do_api_pre_login
    self.snid = self.page.get_snid(self.enseigne.upper())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/pages.py", line 106, in get_snid
    assert snid_dict, 'Could not find SNIDs in main JS, check if it has been updated'
AssertionError: Could not find SNIDs in main JS, check if it has been updated

 Error
    at new KError (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/helpers.js:62:22)
    at callWoob (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:234:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _fetchHelper (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:291:16)
    at async Object.fetchAccounts (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:305:12)
    at async /usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:136:20
    at async retryCallProvider (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:95:20)
    at async pollAccounts (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:135:34)
    at async AccountManager.syncAccounts (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:323:24)
    at async fullPoll (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/poller.js:54:41)

De ce que je comprends, une erreur de SNID (?). Cette erreur se répète plusieurs fois, j’imagine pour les différents comptes CE présents.

Une fois Kresus démarré, j’ai essayé de faire une synchronisation manuelle, et là j’ai l’impression d’avoir une erreur différente :

[2024-07-07T16:09:23.392] [INFO] HTTP - GET / - 304 (36 ms)
[2024-07-07T16:09:23.428] [INFO] HTTP - GET /assets/index.993f04e7.css - 304 (17 ms)
[2024-07-07T16:09:23.429] [INFO] HTTP - GET /assets/index.7ae1d892.js - 304 (21 ms)
[2024-07-07T16:09:23.691] [INFO] providers/woob - Calling woob: command version...
[2024-07-07T16:09:24.097] [INFO] providers/woob - exited with code 0.
[2024-07-07T16:09:24.097] [INFO] providers/woob - OK: woob exited normally with non-empty JSON content.
[2024-07-07T16:09:24.195] [INFO] HTTP - GET /api/all/ - 200 (714 ms)
[2024-07-07T16:09:24.268] [INFO] HTTP - GET /assets/bank-sprite.png - 304 (1 ms)
[2024-07-07T16:09:24.291] [INFO] HTTP - GET /assets/OpenSans-Regular.2e158738.woff - 304 (2 ms)
[2024-07-07T16:09:24.292] [INFO] HTTP - GET /assets/OpenSans-Semibold.b0390aa3.woff - 304 (2 ms)
[2024-07-07T16:09:24.296] [INFO] HTTP - GET /assets/fontawesome-webfont.2adefcbc.woff2?v=4.7.0 - 304 (1 ms)
[2024-07-07T16:09:24.297] [INFO] HTTP - GET /assets/OpenSans-Bold.7d7a1a8e.woff - 304 (2 ms)
[2024-07-07T16:09:26.732] [INFO] providers/woob - Calling woob: command transactions...
[2024-07-07T16:09:27.869] [INFO] providers/woob - exited with code 1.
[2024-07-07T16:09:27.869] [WARN] providers/woob - stderr: 2024-07-07 16:09:27,210:DEBUG:woob.core.modules.loader:modules.py:250:load_module Loaded module "caissedepargne" from /home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne
2024-07-07 16:09:27,210:DEBUG:woob.backend:modules.py:160:create_instance Created backend "caissedepargne" for module "caissedepargne"
2024-07-07 16:09:27,211:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,213:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,215:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,215:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,216:INFO:woob.caissedepargne.browser:switch.py:88:set_browser using 'main' browser
2024-07-07 16:09:27,216:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,217:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,219:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,219:DEBUG:urllib3.util.retry:retry.py:351:from_int Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None)
2024-07-07 16:09:27,219:INFO:woob.caissedepargne.browser:switch.py:88:set_browser using 'main' browser
2024-07-07 16:09:27,220:DEBUG:woob.caissedepargne.browser:browsers.py:1195:_load_cookies Reloaded cookies from storage
2024-07-07 16:09:27,222:DEBUG:urllib3.connectionpool:connectionpool.py:1019:_new_conn Starting new HTTPS connection (1): www.rs-ex-ath-groupe.caisse-epargne.fr:443
2024-07-07 16:09:27,485:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://www.rs-ex-ath-groupe.caisse-epargne.fr:443 "GET /bapi/contract/v2/augmentedSynthesisViews?productFamilyPFM=1%2C2%2C3%2C4%2C6%2C7%2C17&pfmCharacteristicsIndicator=true HTTP/1.1" 403 0
2024-07-07 16:09:27,487:DEBUG:urllib3.connectionpool:connectionpool.py:1019:_new_conn Starting new HTTPS connection (1): www.caisse-epargne.fr:443
2024-07-07 16:09:27,637:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/sso?service=dei HTTP/1.1" 200 1532
2024-07-07 16:09:27,639:DEBUG:woob.caissedepargne.browser:browsers.py:1004:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/sso?service=dei with LoginPage
2024-07-07 16:09:27,654:DEBUG:urllib3.connectionpool:connectionpool.py:474:_make_request https://www.caisse-epargne.fr:443 "GET /se-connecter/main.9ade9f2a72d62aba.js HTTP/1.1" 200 None
2024-07-07 16:09:27,713:DEBUG:woob.caissedepargne.browser:browsers.py:1004:internal_callback Handle https://www.caisse-epargne.fr/se-connecter/main.9ade9f2a72d62aba.js with JsFilePage
2024-07-07 16:09:27,752:DEBUG:charset_normalizer:api.py:439:from_bytes Encoding detection: utf_8 is most likely the one.
[2024-07-07T16:09:27.869] [INFO] providers/woob - Command returned an error code.
[2024-07-07T16:09:27.870] [INFO] providers/woob - Checking that woob is installed and can actually be called…
[2024-07-07T16:09:27.870] [INFO] providers/woob - Calling woob: command test...
[2024-07-07T16:09:28.283] [INFO] providers/woob - exited with code 0.
[2024-07-07T16:09:28.284] [INFO] providers/woob - OK: woob exited normally with non-empty JSON content.
[2024-07-07T16:09:28.291] [ERROR] providers/woob - Got error while running command "2": Unknown error: Unable to find 1st anonymous:{clientId:\"(.*?)\" in '(self.webpackChunkaccessecurite=self.webpackChunkaccessecurite||[]).push([[179],{317:(Oe,ee,o)=>{"use strict";o.d(ee,{b:()=>ht});var e=o(6814),t=o(9862),c=o(7065),v=o(76),y=o(8017),l=o(7667),d=o(3295),g=o(7457),p=o(175),m=o(4197),E=o(3040),M=o(213),w=o(219),I=o(5879);let U=(()=>{class He{static createIfNotExists(jt,Ct){if(!jt.get("NAVIGATOR_COMPATIBILITY")){const Ve=window.navigator.userAgent;let Pe;switch(Ct.compatibilityLevel){case v.L.LEVEL_0:Pe=this.addDays(new Date,21);break;case v.L.LEVEL_1:Pe=this.addDays(new Date,7);break;case v.L.LEVEL_2:case v.L.LEVEL_3:Pe=this.addDays(new Date,1)}const je=-2,nt=window.location.hostname.split(".").slice(je).join(".");jt.set("NAVIGATOR_COMPATIBILITY",JSON.stringify({userAgent:Ve,status:Ct.compatibilityLevel}),Pe,"/",nt,!0,"None")}}static addDays(jt,Ct){return jt.setDate(jt.getDate()+Ct),jt}static#e=this.\\u0275fac=function(Ct){return new(Ct||He)};static#t=this.\\u0275prov=I.Yz7({token:He,factory:He.\\u0275fac,providedIn:"root"})}return He})();var O=o(4009),B=o(362),_...'.
Traceback (most recent call last):
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 704, in fetch
    results['values'] = self.get_transactions(from_date)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 587, in get_transactions
    for account in list(self.backend.iter_accounts()):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/module.py", line 81, in iter_accounts
    return self.browser.iter_accounts()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/switch.py", line 98, in wrapper
    return val(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/browsers.py", line 1118, in inner
    browser.do_login()
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/mfa.py", line 201, in do_double_authentication
    self.init_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 201, in init_login
    self.do_api_pre_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 229, in do_api_pre_login
    self.first_client_id = self.page.get_first_client_id()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/pages.py", line 85, in get_first_client_id
    return Regexp(pattern=r'anonymous:{clientId:\"(.*?)\"').filter(self.text)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/base.py", line 136, in wrapper
    res = function(self, value)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/standard.py", line 646, in filter
    return self.default_or_raise(RegexpError(msg))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/base.py", line 71, in default_or_raise
    raise exception
woob.browser.filters.standard.RegexpError: Unable to find 1st anonymous:{clientId:\"(.*?)\" in '(self.webpackChunkaccessecurite=self.webpackChunkaccessecurite||[]).push([[179],{317:(Oe,ee,o)=>{"use strict";o.d(ee,{b:()=>ht});var e=o(6814),t=o(9862),c=o(7065),v=o(76),y=o(8017),l=o(7667),d=o(3295),g=o(7457),p=o(175),m=o(4197),E=o(3040),M=o(213),w=o(219),I=o(5879);let U=(()=>{class He{static createIfNotExists(jt,Ct){if(!jt.get("NAVIGATOR_COMPATIBILITY")){const Ve=window.navigator.userAgent;let Pe;switch(Ct.compatibilityLevel){case v.L.LEVEL_0:Pe=this.addDays(new Date,21);break;case v.L.LEVEL_1:Pe=this.addDays(new Date,7);break;case v.L.LEVEL_2:case v.L.LEVEL_3:Pe=this.addDays(new Date,1)}const je=-2,nt=window.location.hostname.split(".").slice(je).join(".");jt.set("NAVIGATOR_COMPATIBILITY",JSON.stringify({userAgent:Ve,status:Ct.compatibilityLevel}),Pe,"/",nt,!0,"None")}}static addDays(jt,Ct){return jt.setDate(jt.getDate()+Ct),jt}static#e=this.\\u0275fac=function(Ct){return new(Ct||He)};static#t=this.\\u0275prov=I.Yz7({token:He,factory:He.\\u0275fac,providedIn:"root"})}return He})();var O=o(4009),B=o(362),_...'

[2024-07-07T16:09:28.291] [ERROR] providers/woob - 	(error code: GENERIC_EXCEPTION)
[2024-07-07T16:09:28.354] [ERROR] helpers - when fetching transactions: Unknown error: Unable to find 1st anonymous:{clientId:\"(.*?)\" in '(self.webpackChunkaccessecurite=self.webpackChunkaccessecurite||[]).push([[179],{317:(Oe,ee,o)=>{"use strict";o.d(ee,{b:()=>ht});var e=o(6814),t=o(9862),c=o(7065),v=o(76),y=o(8017),l=o(7667),d=o(3295),g=o(7457),p=o(175),m=o(4197),E=o(3040),M=o(213),w=o(219),I=o(5879);let U=(()=>{class He{static createIfNotExists(jt,Ct){if(!jt.get("NAVIGATOR_COMPATIBILITY")){const Ve=window.navigator.userAgent;let Pe;switch(Ct.compatibilityLevel){case v.L.LEVEL_0:Pe=this.addDays(new Date,21);break;case v.L.LEVEL_1:Pe=this.addDays(new Date,7);break;case v.L.LEVEL_2:case v.L.LEVEL_3:Pe=this.addDays(new Date,1)}const je=-2,nt=window.location.hostname.split(".").slice(je).join(".");jt.set("NAVIGATOR_COMPATIBILITY",JSON.stringify({userAgent:Ve,status:Ct.compatibilityLevel}),Pe,"/",nt,!0,"None")}}static addDays(jt,Ct){return jt.setDate(jt.getDate()+Ct),jt}static#e=this.\\u0275fac=function(Ct){return new(Ct||He)};static#t=this.\\u0275prov=I.Yz7({token:He,factory:He.\\u0275fac,providedIn:"root"})}return He})();var O=o(4009),B=o(362),_...'.
Traceback (most recent call last):
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 704, in fetch
    results['values'] = self.get_transactions(from_date)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/py/main.py", line 587, in get_transactions
    for account in list(self.backend.iter_accounts()):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/module.py", line 81, in iter_accounts
    return self.browser.iter_accounts()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/switch.py", line 98, in wrapper
    return val(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/browsers.py", line 1118, in inner
    browser.do_login()
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/mfa.py", line 201, in do_double_authentication
    self.init_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 201, in init_login
    self.do_api_pre_login()
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/browser.py", line 229, in do_api_pre_login
    self.first_client_id = self.page.get_first_client_id()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/data/woob-data/modules/3.6/woob_modules/caissedepargne/pages.py", line 85, in get_first_client_id
    return Regexp(pattern=r'anonymous:{clientId:\"(.*?)\"').filter(self.text)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/base.py", line 136, in wrapper
    res = function(self, value)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/standard.py", line 646, in filter
    return self.default_or_raise(RegexpError(msg))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/woob/browser/filters/base.py", line 71, in default_or_raise
    raise exception
woob.browser.filters.standard.RegexpError: Unable to find 1st anonymous:{clientId:\"(.*?)\" in '(self.webpackChunkaccessecurite=self.webpackChunkaccessecurite||[]).push([[179],{317:(Oe,ee,o)=>{"use strict";o.d(ee,{b:()=>ht});var e=o(6814),t=o(9862),c=o(7065),v=o(76),y=o(8017),l=o(7667),d=o(3295),g=o(7457),p=o(175),m=o(4197),E=o(3040),M=o(213),w=o(219),I=o(5879);let U=(()=>{class He{static createIfNotExists(jt,Ct){if(!jt.get("NAVIGATOR_COMPATIBILITY")){const Ve=window.navigator.userAgent;let Pe;switch(Ct.compatibilityLevel){case v.L.LEVEL_0:Pe=this.addDays(new Date,21);break;case v.L.LEVEL_1:Pe=this.addDays(new Date,7);break;case v.L.LEVEL_2:case v.L.LEVEL_3:Pe=this.addDays(new Date,1)}const je=-2,nt=window.location.hostname.split(".").slice(je).join(".");jt.set("NAVIGATOR_COMPATIBILITY",JSON.stringify({userAgent:Ve,status:Ct.compatibilityLevel}),Pe,"/",nt,!0,"None")}}static addDays(jt,Ct){return jt.setDate(jt.getDate()+Ct),jt}static#e=this.\\u0275fac=function(Ct){return new(Ct||He)};static#t=this.\\u0275prov=I.Yz7({token:He,factory:He.\\u0275fac,providedIn:"root"})}return He})();var O=o(4009),B=o(362),_...'

[2024-07-07T16:09:28.355] [INFO] helpers - Error
    at new KError (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/helpers.js:62:22)
    at callWoob (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:234:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _fetchHelper (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:291:16)
    at async Object.fetchTransactions (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/providers/woob/index.js:315:12)
    at async /usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:258:20
    at async retryCallProvider (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:95:20)
    at async pollTransactions (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:257:34)
    at async AccountManager.syncTransactions (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/lib/accounts-manager.js:393:24)
    at async fetchTransactions (/usr/local/share/.config/yarn/global/node_modules/kresus/build/server/controllers/accesses.js:209:37)
[2024-07-07T16:09:28.357] [ERROR] HTTP - POST /api/accesses/3/fetch/transactions - 500 (1641 ms)

Donc là une erreur du style « Unable to find 1st anonymous:{clientId… ». J’imagine bien que les deux erreurs sont liées (du style y’a un ID mal défini qq part, d’où son erreur à la fonction « self.page.get_first_client_id » ?), mais je ne sais pas trop où chercher. A noter que :

  • pas de problème avec un compte Banque Postale
  • j’ai essayé de re-définir un nouvel accès bancaire CE et j’ai la même erreur de SNID.

J’ai jeté un œil sur le GitLab de Woob mais je n’ai rien vu qui s’en rapproche. Des suggestions de piste à creuser ?
En vous remerciant par avance,
Bonne soirée
Max

Bonjour,

Il y a une correction côté woob : [caissedepargne] Trying to fix : woob bank not working anymore with caissedepargne module (!914) · Merge requests · woob / woob · GitLab

Est-ce que tu sais comment la tester ?

Bonsoir,
Merci pour le retour rapide ! Je n’avais pas vu passer cette MR, ça m’intéresse de tester en effet. Mais effectivement j’aurais probablement besoin d’un peu d’aide…

Ce que j’aurais fait intuitivement c’est de switcher woob sur la branche 666-caissedepargne mais je n’ai pas réussi. Pour info tout est installé sur un NAS Synology via docker. Le souci est que je n’ai pas réussi à trouver le répertoire racine de woob :

  • Dans ma config de docker je map le chemin « /docker/kresus/woob » sur « /woob » dans le conteneur, mais ces dossiers sont vides (aussi bien en local que sur le conteneur, en même temps normal puisqu’il s’agit du même dossier)
  • Je suis rentré dans le conteneur et j’ai fait des recherches avec find / -name XX pour essayer de localiser le dossier woob mais je n’ai rien trouvé. La seule chose qui se rapproche de ça c’est dans /home/user/data/woob-data mais ça ne ressemble pas au dépôt GitLab, donc pas de git dispo.

Bref un petit coup de pouce sur la suite me serait bien utile…

Merci encore et bonne soirée
Max

Tu peux déjà tester la MR directement, sans passer par Kresus.

Avec ces commandes, ça va installer et lancer woob sans impacter ton système (il te faut python 3 et pip) :

cd /tmp
git clone https://gitlab.com/woob/woob.git
cd woob
./tools/local_run.sh bank list --debug

Sinon dans /home/user/data/woob-data tu devrais avoir un dossier modules, ou la version de woob puis un dossier modules, dans lequel tu trouveras ensuite celui de ta banque, et il te faudrait copier toi-même les fichiers (et il faut aussi installer la nouvelle dépendance pip chompjs).

Dans Kresus on va revenir à une installation de woob via git pour avoir des modules + à jour mais ça va prendre un peu de temps.

Nickel, merci pour les indications, ça a fonctionné !
Pour info et archivage, voici ce que j’ai fait :

  • j’ai arrêté le conteneur Kresus
  • j’ai téléchargé le code source de la branche 666 de woob
  • j’ai écrasé l’ensemble des fichiers dans « woob_modules/caissedepargne » sur le NAS par les fichiers justement téléchargés
  • j’ai relancé le conteneur Kresus : il a râlé un coup car il manquait chompjs
  • je me suis connecté au conteneur et j’ai fait un pip install chompjs. Il a encore râlé pcq l’environnement est « externally managed ». J’ai dû plutôt faire pip install chompjs --break-system-packages

Et là j’ai pu récupérer les dernières transations :partying_face:

Du coup j’aurais quand même une question : tant que le conteneur tourne y’a pas de souci, mais s’il était amené à être redémarré j’imagine qu’il n’y aura plus chompjs, et que je devrai le re-installer à la mano non ?

Encore merci pour le coup de main !
Bonne soirée,
Max

Du coup j’aurais quand même une question : tant que le conteneur tourne y’a pas de souci, mais s’il était amené à être redémarré j’imagine qu’il n’y aura plus chompjs, et que je devrai le re-installer à la mano non ?

C’est exact. Je suis en train de me renseigner pour voir si nous devons l’ajouter manuellement à nos dépendances Docker.