-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registration failed: premature end of stream (expected to read 1 bytes, got 0 instead) #107
Comments
Help me help you. Please provide any details, there's nothing here for me to begin debugging. |
Here is full response which webauthn gets:
|
Thank you, we're almost there.
The full stack trace you're seeing from Python will be helpful as well, try to include the Python code that causes this too if you can. |
Currently I can't run repo locally, can you debug without it? |
Oh, I see, this is an issue you're having with the live website. Aright, I'll see if this is enough to work with. |
Is there any update here? |
I was at a conference all week so I didn't have a chance to dig into this. I'll let you know how things go when I can. |
Any update? @MasterKale |
Okay, I recreated in a simple call to from webauthn import verify_registration_response
from webauthn.helpers import base64url_to_bytes
def verify():
resp = verify_registration_response(
credential="""{
"id": "6MpN9tzIRZGkout3Roum5Q",
"rawId": "6MpN9tzIRZGkout3Roum5Q",
"response": {
"attestationObject": "o2NmbXRmcGFja2VkaGF1dGhEYXRhWJR0puqSE8mcL3SyJJKzIM9AJiqUwalQoDl_KSULYIQe8MUAAAAROaVkfhhTRGyh9qebrp9bxwAQ6MpN9tzIRZGkout3Roum5aUBAgMmIAEhWCBjfryIzwhCLOZ6AkIcU_5kHzblft9yFn0AtKB3NiqqOyJYIGZqt2I3Sd6JmXsC76BBgWKN_5_3K8BhThW7crlFe1NQZ2F0dFN0bXSjY2FsZyZjc2lnWEYwRAIgXBHqbGYvMjS0UxcB0c_2X3E7jX-GHgIlQ_syxg59iXYCIHEG1jeNFZGrsA-2Vt0KAUJYCCyUlezAuHZXnKvMBeioY3g1Y4FZAfIwggHuMIIBlKADAgECAgkA5pSqn2hxl74wCgYIKoZIzj0EAwIwQTEkMCIGA1UECgwbVmFuY29zeXMgRGF0YSBTZWN1cml0eSBJbmMuMRkwFwYDVQQDDBBWYW5jb3N5cyBSb290IENBMCAXDTE4MTIyMjE3MTQzNloYDzIwNjgxMjA5MTcxNDM2WjCBgDELMAkGA1UEBhMCQ0ExJDAiBgNVBAoMG1ZhbmNvc3lzIERhdGEgU2VjdXJpdHkgSW5jLjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEnMCUGA1UEAwweVmFuY29zeXMgQW5kcm9pZCBBdXRoZW50aWNhdG9yMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEf-qpRvI9l6DkSl0VUwaRnggahsN8QWm2C9x7K5sJmHo2qZyYS-pMJjeJM-fnMF3f2nMlosITZJhC83uDt-8pkqMzMDEwDAYDVR0TAQH_BAIwADAhBgsrBgEEAYLlHAEBBAQSBBA5pWR-GFNEbKH2p5uun1vHMAoGCCqGSM49BAMCA0gAMEUCIQDzjysauABP9632mu8CJ_7TwPBb2YhDYoHOClsGPaHbMgIgFDVHo8TeC2Lrp_wObk62e6CEd-vb-QHgbqNCa49nCFo",
"clientDataJSON": "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiaTQwTHdoc2h5MHhyTjhDakY4N2U3d1RHdWljR2ZERG5yZ19nWnlOOU1zZ0M4YkRBZEdlVHdqUGpfRTlUb1JNNDhoY0pJdHg1b0I4RnhVSm9DU0c3elEiLCJvcmlnaW4iOiJodHRwczovL3dlYmF1dGhuLmlvIn0",
"transports": [
"internal",
"hybrid"
],
"publicKeyAlgorithm": -7,
"publicKey": "BGN-vIjPCEIs5noCQhxT_mQfNuV-33IWfQC0oHc2Kqo7Zmq3YjdJ3omZewLvoEGBYo3_n_crwGFOFbtyuUV7U1A",
"authenticatorData": "dKbqkhPJnC90siSSsyDPQCYqlMGpUKA5fyklC2CEHvDFAAAAETmlZH4YU0Rsofanm66fW8cAEOjKTfbcyEWRpKLrd0aLpuWlAQIDJiABIVggY368iM8IQizmegJCHFP-ZB825X7fchZ9ALSgdzYqqjsiWCBmardiN0neiZl7Au-gQYFijf-f9yvAYU4Vu3K5RXtTUA"
},
"type": "public-key",
"clientExtensionResults": {}
}""",
expected_challenge=base64url_to_bytes("i40Lwhshy0xrN8CjF87e7wTGuicGfDDnrg_gZyN9MsgC8bDAdGeTwjPj_E9ToRM48hcJItx5oB8FxUJoCSG7zQ"),
expected_origin="https://webauthn.io",
expected_rp_id="webauthn.io",
)
print(resp)
verify() The error happens when attempting to read extensions in authenticator data:
Investigating... |
Hi there,
I'm developing an authenticator. When I generate create credential response, I get this error in webauthn.io :
Registration failed: premature end of stream (expected to read 1 bytes, got 0 instead)
But, when I'm testing with https://webauthnsample.azurewebsites.net/ or https://webauthntest.identitystandards.io/ everything work well.
What is exact problem?
The text was updated successfully, but these errors were encountered: