Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Invalid JWS #11

Open
phileo opened this issue Nov 17, 2017 · 4 comments
Open

Invalid JWS #11

phileo opened this issue Nov 17, 2017 · 4 comments

Comments

@phileo
Copy link

phileo commented Nov 17, 2017

in the SafetyNetApi.AttestationResponse.getJWSResult() jws string, it is supposed to contain 2 periods according to the JWS spec. However, when I run the sample app, I only see one single period. On the server side, this causes an IllegalArgumentException with OfflineVerify::JsonWebSignature.parser.parse()

Any ideas as to why the generated JWS string does not contain 2 periods?

@VarunVats9
Copy link

For me it worked only after installing the apk on real device, instead of emulator. On emulator it was showing invalid JWS without any period.

@moulanaaidi
Copy link

moulanaaidi commented Dec 18, 2018

hi @phileo , did you solve this issue? I'm facing the same issue IllegalArgumentException.

@KaisNeffati
Copy link

Hello there, Is there any news considering this issue ? Facing the same problem ! @orodrig-google
Exception in thread "main" java.lang.IllegalArgumentException
at com.google.api.client.repackaged.com.google.common.base.Preconditions
.checkArgument(Preconditions.java:111)
at com.google.api.client.util.Preconditions.checkArgument(Preconditions.
java:37)
at com.google.api.client.json.webtoken.JsonWebSignature$Parser.parse(Jso
nWebSignature.java:599)
at OfflineVerify.parseAndVerify(OfflineVerify.java:40)
at OfflineVerify.process(OfflineVerify.java:97)
at OfflineVerify.main(OfflineVerify.java:124)
:runOfflineVerify FAILED

FAILURE: Build failed with an exception.

@KaisNeffati
Copy link

I've found out the problem! The problem results in the logger which only log 4024 characters The real value could not be parsed by the logger Debug and inspect the element to get the real value

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants