The backend developers are having trouble working on the API because they cannot localhost or deploy the backend. Whenever someone tries to localhost, they get a jwt error and postman does not receive any data.
What we tried
We mostly focused on the jwt error which we now know was not the problem. I tried:
Disconnecting the person from the rest of the backend
Removing all the security
Removing all instances of jwt
This did not work, however, it did give us a different 404 error which confused me more.
After consulting with Mr. Mort
We learned that the jwt error is not a problem. It simply happens because the requests from postman are not associated with the jwt cookies so requests to the person api can't be verified.
Mr. Mort told me that the problem may have come from the newest version of Spring. We recloned the repository so that is why other teams did not have this issue.
Using GitLens to fix it
Mr. Mort also showed me how to use GitLens to investigate this further. GitLens is an extension in vscode which allows you to easily back up to previous commits. We used this to find that going back a couple of weeks allows the backend to run correctly.
How I will avoid mistakes like this in the future
I wasted a lot of time investigating the jwt error, but it turned out it was not important to the overall problem. In the future, I will be more careful not to blindly follow the error but read it carefully and take a more direct approach to the problem, rather than just look for anything related to the error in the code. I will also not be afraid to ask for help if I get stuck on something like this.
The Problem
The backend developers are having trouble working on the API because they cannot localhost or deploy the backend. Whenever someone tries to localhost, they get a jwt error and postman does not receive any data.
What we tried
We mostly focused on the jwt error which we now know was not the problem. I tried:
This did not work, however, it did give us a different 404 error which confused me more.
After consulting with Mr. Mort
We learned that the jwt error is not a problem. It simply happens because the requests from postman are not associated with the jwt cookies so requests to the person api can't be verified.
Mr. Mort told me that the problem may have come from the newest version of Spring. We recloned the repository so that is why other teams did not have this issue.
Using GitLens to fix it
Mr. Mort also showed me how to use GitLens to investigate this further. GitLens is an extension in vscode which allows you to easily back up to previous commits. We used this to find that going back a couple of weeks allows the backend to run correctly.
How I will avoid mistakes like this in the future
I wasted a lot of time investigating the jwt error, but it turned out it was not important to the overall problem. In the future, I will be more careful not to blindly follow the error but read it carefully and take a more direct approach to the problem, rather than just look for anything related to the error in the code. I will also not be afraid to ask for help if I get stuck on something like this.