Project

General

Profile

Development #56572

SystemError: <built-in function login_process_response_msg> returned a result with an error set

Added by sentry io about 2 months ago. Updated about 1 month ago.

Status:
Résolu (à déployer)
Priority:
Normal
Category:
-
Target version:
-
Start date:
01 Sep 2021
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/51913/

SystemError: <class 'RuntimeWarning'> returned a result with an error set
SystemError: <built-in function login_process_response_msg> returned a result with an error set
(5 additional frame(s) were not displayed)
...
  File "mellon/views.py", line 141, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "mellon/views.py", line 471, in get
    return self.continue_sso_artifact(request, lasso.HTTP_METHOD_ARTIFACT_GET)
  File "mellon/views.py", line 410, in continue_sso_artifact
    login.processResponseMsg(result.text)
  File "lasso.py", line 2640, in processResponseMsg
    rc = _lasso.login_process_response_msg(self._cptr, str2lasso(response_msg))
response_msg : 

'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"><s:Body><samlp:ArtifactResponse ID="_4579549C1A4B8C36BA42628B55A416A9" InResponseTo="_C951AEC152B640FE503F6304B3E9C2B3" Version="2.0" IssueInstant="2021-09-01T09:44:33Z"><saml:Issuer>https://connexiondemarches.fontenay-sous-bois.fr/idp/saml2/metadata</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<Canonical...'

Files

Associated revisions

Revision 23035115 (diff)
Added by Benjamin Dauvergne about 1 month ago

Clear Python error indicator after logging (#56572)

Lasso log using the GLib logging API and the Python binding install a
hook to delegate logging to a Python logger named "lasso".

During the logging call the error indicator can be set to signal an
exception. The indicator will still be set when we return from the Lasso
API call, and is not handled by the Python wrapping of the C functions.
If our function returns a non-NULL value, the Python interpreter will
raise because this situation is forbidden.

To prevent it, if we detect that an exception occurred during logging
calls, we print it to stderr, clear the error indicator and return
immediately.

History

#1

Updated by Frédéric Péters about 2 months ago

  • Project changed from Suivi des traces to Lasso
#2

Updated by Benjamin Dauvergne about 2 months ago

  • Assignee set to Benjamin Dauvergne

Le logger Lasso ne semble pas initialisé correctement (AttributeError: 'Logger' object has no attribute '_cache') mais surtout je dois soit remonté les erreurs soit au moins les logger dans lasso_python_log.

#3

Updated by Benjamin Dauvergne about 2 months ago

#4

Updated by Benjamin Dauvergne about 1 month ago

  • Status changed from Solution proposée to Résolu (à déployer)
commit 23035115a3cdb3b54e0027e3742974e071d32ed3
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Sep 4 10:44:39 2021 +0200

    Clear Python error indicator after logging (#56572)

    Lasso log using the GLib logging API and the Python binding install a
    hook to delegate logging to a Python logger named "lasso".

    During the logging call the error indicator can be set to signal an
    exception. The indicator will still be set when we return from the Lasso
    API call, and is not handled by the Python wrapping of the C functions.
    If our function returns a non-NULL value, the Python interpreter will
    raise because this situation is forbidden.

    To prevent it, if we detect that an exception occurred during logging
    calls, we print it to stderr, clear the error indicator and return
    immediately.

Also available in: Atom PDF