Ticket: User Report

List mostActive = new ArrayList<>();
ArrayList pipeline = new ArrayList<>();

Bson userGroup = Aggregates.group(“email”, userSum);

I get this error when running the unit test:
UserReportTest.testMostActiveUserComments:41 mostActiveComments() should return 20 results expected:<20> but was:<1>
What am I doing wrong??

Is the query you are running returning results in Compass as you expected? I would recommend doing it before and still if you need help, I would be happy to do so. :slight_smile:


I discovered my mistake:
This code snippet Aggregates.group(“email”, userSum);
Should be like this Aggregates.group(“$email”, userSum);

I now get this error in the status page when I try to retrieve the validation code:
User Report: Invalid response to good user report request

Did the unit tests passed? First we always run unit tests, if they are passing, then check console when you are testing for integration tests.


Yes the unit tests passed

2019-10-18 13:52:01.507 ERROR 39876 — [nio-5000-exec-9] Service$$EnhancerBySpringCGLIB$$cf6d2cfb : Cannot validate user token ‘xxxx’: error thrown - JWT signature does not match locally computed signature. JWT validity cannot be asserted and should not be trusted.
2019-10-18 13:52:01.508 ERROR 39876 — [nio-5000-exec-9] mflix.api.security.JWTAuthEntryPoint : Unauthorized error: Full authentication is required to access this resource

Got it! This is because you may be trying to run http://localhost:5000/status directly.

Instead, go to http://localhost:5000 first, then click on Status Button. Then try getting the validator code.


That’s how I always do it. The issue remains!

Okay. And you are able to get the validation code for previous tickets, right?

If yes, please share the full code here that you have updated for this ticket. Lets see what we can do more to debug it. :slight_smile:


Yes, that’s right.
Here it comes:

Thank you so much for sharing the information. I have sent you a message with the code that we have working. Please let me know if that worked for you.


I still get the same error.

I think I had something like that before, but with other ticket. Try to add in pom.xml this dependency.

Probably it would help you.

Thanks, I already use this dependency so the issue is because of something else.