android-play-safetynet icon indicating copy to clipboard operation
android-play-safetynet copied to clipboard

Invalid JWS

Open phileo opened this issue 7 years ago • 4 comments

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?

phileo avatar Nov 17 '17 21:11 phileo

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.

VarunVats9 avatar May 07 '18 17:05 VarunVats9

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

moulanaaidi avatar Dec 18 '18 03:12 moulanaaidi

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 avatar Feb 13 '19 13:02 KaisNeffati

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

KaisNeffati avatar Feb 14 '19 09:02 KaisNeffati