Ticket: User Report error Cannot validate user token [Solved]

Chapter 3 Ticket: User Report

  1. Passes the unit tests
  2. Passes the validation

But, I see an error on the console after the validation passes. Is there anything I need or can to do about this?

2019-03-23 18:16:01.239 ERROR 6132 --- [nio-5000-exec-4] 
Service$$EnhancerBySpringCGLIB$$63e33e16 : Cannot validate user token Bearer 
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MjIxNzI... d3KC6giI:
error thrown - JWT signature does not match locally computed signature.
JWT validity cannot be asserted and should not be trusted.
2019-03-23 18:16:01.242 ERROR 6132 --- [nio-5000-exec-4] mflix.api.security.JWTAuthEntryPoint:
Unauthorized error: Full authentication is required to access this resource

Hi @Prasad_45636

If you are able to continue through the lab session and you have gotten the validation code, then there is no need to worry about this console output.

Hope this helps!
Eoin

Thanks for replying (I have the right validation code and got thru the session).

1 Like

Hi @brazileoin,

I also getting the same error in console, but in my case i dont get the validation code too.
(User Report: Invalid response to good user report request)

It seems that the problem occurs before even calling the method mostActiveCommenters(). I have realized that because i have put a breakpoint at the start of the method and never stops there.

2019-07-01 00:20:31.905 ERROR 11712 — [nio-5000-exec-8] Service$$EnhancerBySpringCGLIB$$191325c0 : Cannot validate user token Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1MjIxNzI3NzMsIm5iZiI6MTUyMjE3Mjc3MywianRpIjoiYjFlYmI0ZDQtNjZlZS00MTY4LTg0MWQtZGNhODJkMThmN2NhIiwiZXhwIjoxNTIyMTczNjczLCJpZGVudGl0eSI6eyJlbWFpbCI6ImZvb2JhekBiYXIuY29tIiwibmFtZSI6ImZvbyBiYXIiLCJwYXNzd29yZCI6bnVsbCwicHJlZmVyZW5jZXMiOnsiZmF2b3JpdGVfY2FzdCI6Ik1lZyBSeWFuIiwicHJlZmVycmVkX2xhbmd1YWdlIjoiRW5nbGlzaCJ9fSwiZnJlc2giOmZhbHNlLCJ0eXBlIjoiYWNjZXNzIiwidXNlcl9jbGFpbXMiOnsidXNlciI6eyJlbWFpbCI6ImZvb2JhekBiYXIuY29tIiwibmFtZSI6ImZvbyBiYXIiLCJwYXNzd29yZCI6bnVsbCwicHJlZmVyZW5jZXMiOnsiZmF2b3JpdGVfY2FzdCI6Ik1lZyBSeWFuIiwicHJlZmVycmVkX2xhbmd1YWdlIjoiRW5nbGlzaCJ9fX19.q9z_tG7gEqaRMfrbTpj9Jz52vocqOBWgEpCd3KC6giI: error thrown - JWT signature does not match locally computed signature. JWT validity cannot be asserted and should not be trusted.
2019-07-01 00:20:31.907 ERROR 11712 — [nio-5000-exec-8] mflix.api.security.JWTAuthEntryPoint : Unauthorized error: Full authentication is required to access this resource

Hi @Yiannis_27989,

Does your unit tests are passing? If yes, please share the implementation of the code.

If not, please run the unit tests before to check anything which has been missed.

Kanika

Hi,
I get this jwt error too. Unit test pass but I can’t get validation code

Hi @Gery_00469,

Please try visiting http://localhost:5000 page first and then click on STATUS.

Kanika

Hi @kanikasingla,
Unfortunately, this is already how I proceed and every other tests pass.

I was using Edge, switching to Chrome solve the issue

1 Like