luisiturrios1 / python-cfdiclient

Cliente Python Web Service del SAT para la descarga masiva de xml
GNU General Public License v3.0
101 stars 50 forks source link

Error de autenticación #17

Closed luisdiegov closed 3 years ago

luisdiegov commented 3 years ago

Al correr ejemplo_autenticacion.py obtengo el siguiente error:

Traceback (most recent call last): File ".\ejemplo_autenticacion.py", line 19, in <module> token = auth.obtener_token() File "D:\Documentos\repos\python-cfdiclient\cfdiclient\autenticacion.py", line 124, in obtener_token raise Exception(ex) Exception: The message with Action 'http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Solo cloné el repositorio e instalé los requeriments.

luisiturrios1 commented 3 years ago

Si estás utilizando una e firma vigente ?

On Tue, Mar 23, 2021 at 6:01 PM Luis Diego @.***> wrote:

Al correr ejemplo_autenticacion.py obtengo el siguiente error:

Traceback (most recent call last): File ".\ejemplo_autenticacion.py", line 19, in token = auth.obtener_token() File "D:\Documentos\repos\python-cfdiclient\cfdiclient\autenticacion.py", line 124, in obtener_token raise Exception(ex) Exception: The message with Action 'http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Solo cloné el repositorio e instalé los requeriments.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/luisiturrios/python-cfdiclient/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCF7WF7KJULRPMOOKKB5YTTFE2XJANCNFSM4ZWIIEFA .

-- ING. TIC. Luis Jesus Iturrios @. @.> +52 (55) 4090 1106*

luisdiegov commented 3 years ago

Sí. Es una e firma que utilizo seguido. Además intenté con otros archivos y firmas de prueba que provee el SAT y tampoco me funcionó. Intenté correr esto desde Windows y Mac sin éxito.

On Tue, Mar 23, 2021, 20:03 Luis Jesus Iturrios @.***> wrote:

Si estás utilizando una e firma vigente ?

On Tue, Mar 23, 2021 at 6:01 PM Luis Diego @.***> wrote:

Al correr ejemplo_autenticacion.py obtengo el siguiente error:

Traceback (most recent call last): File ".\ejemplo_autenticacion.py", line 19, in token = auth.obtener_token() File "D:\Documentos\repos\python-cfdiclient\cfdiclient\autenticacion.py", line 124, in obtener_token raise Exception(ex) Exception: The message with Action ' http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Solo cloné el repositorio e instalé los requeriments.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/luisiturrios/python-cfdiclient/issues/17, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACCF7WF7KJULRPMOOKKB5YTTFE2XJANCNFSM4ZWIIEFA

.

-- ING. TIC. Luis Jesus Iturrios @. @.> +52 (55) 4090 1106*

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/luisiturrios/python-cfdiclient/issues/17#issuecomment-805416656, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQHQMM54332RMWKGNU5DETTFFB7NANCNFSM4ZWIIEFA .

luisiturrios1 commented 3 years ago

Puedes intentar desactivar el firewall de Windows para ver si no te está bloqueando.

Saludos

On Tue, Mar 23, 2021 at 7:13 PM Luis Diego @.***> wrote:

Sí. Es una e firma que utilizo seguido. Además intenté con otros archivos y firmas de prueba que provee el SAT y tampoco me funcionó. Intenté correr esto desde Windows y Mac sin éxito.

On Tue, Mar 23, 2021, 20:03 Luis Jesus Iturrios @.***> wrote:

Si estás utilizando una e firma vigente ?

On Tue, Mar 23, 2021 at 6:01 PM Luis Diego @.***> wrote:

Al correr ejemplo_autenticacion.py obtengo el siguiente error:

Traceback (most recent call last): File ".\ejemplo_autenticacion.py", line 19, in token = auth.obtener_token() File "D:\Documentos\repos\python-cfdiclient\cfdiclient\autenticacion.py", line 124, in obtener_token raise Exception(ex) Exception: The message with Action ' http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Solo cloné el repositorio e instalé los requeriments.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/luisiturrios/python-cfdiclient/issues/17, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ACCF7WF7KJULRPMOOKKB5YTTFE2XJANCNFSM4ZWIIEFA

.

-- ING. TIC. Luis Jesus Iturrios @. @.> +52 (55) 4090 1106*

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/luisiturrios/python-cfdiclient/issues/17#issuecomment-805416656 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACQHQMM54332RMWKGNU5DETTFFB7NANCNFSM4ZWIIEFA

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/luisiturrios/python-cfdiclient/issues/17#issuecomment-805419906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCF7WDE5T2VTSCW4IQSKB3TFFDGLANCNFSM4ZWIIEFA .

-- ING. TIC. Luis Jesus Iturrios @. @.> +52 (55) 4090 1106*

luisiturrios1 commented 3 years ago

@luisdiegov ¿Aun tienes problemas?

luisdiegov commented 3 years ago

Hola. Un compañero retomó el proyecto y no tuvo problema. Él lo realizó desde macOS. Posiblemente el problema son las dependencias en Windows. Ya le pasé el issue a ver si nos puede ayudar con algunos comentarios

jhugomh commented 3 years ago

Hola buenas tardes, a mí me está marcando el mismos error, quise probar igualmente ejemplo_autenticacion.py No saben que lo origina? Saludos y muchas gracias

The message with Action 'http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). File "C:\Users\hmh\Python\python-cfdiclient-master\cfdiclient\autenticacion.py", line 124, in obtener_token raise Exception(ex) File "C:\Users\hmh\Python\python-cfdiclient-master\ejemplo_autenticacion.py", line 19, in token = auth.obtener_token()

jhugomh commented 3 years ago

Hola, ya pude encontrar el problema en la autenticación. El autenticacion.py hace referencia al SOAP_ACTION = 'http://DescargaMasivaTerceros.sat.gob.mx/IAutenticacion/Autentica' y debe ser SOAP_ACTION = 'http://DescargaMasivaTerceros.gob.mx/IAutenticacion/Autentica' . También hay que cambiarlo en el nsmap por 'http://DescargaMasivaTerceros.gob.mx' Ya con eso el ejemplo_autenticacion.py funciona perfecto.

luisiturrios1 commented 3 years ago

Podrías subir un pull request con la contribución ?

luisiturrios1 commented 3 years ago

@Interconectando hay alguna razón de cambiar este SOAP_ACTION tu lo cambiaste el 12 Dec 2020

luisiturrios1 commented 3 years ago

Solucionado v1.4.1

pueden actualizar con

pip install -U cfdiclient

https://pypi.org/project/cfdiclient/1.4.1/

esau436 commented 6 months ago

Hola Tengo el mismo problema, en cualquier maquina personal funciona sin problemas, pero quiero subir al servidor in token = auth.obtener_token() justo al optener el token

luisiturrios1 commented 6 months ago

Revisa la fecha y hora del servidor debe de están en zona de la CDMX