JoCls / location

0 stars 0 forks source link

Error encounter tracking #15

Open JoCls opened 1 month ago

JoCls commented 1 month ago

Add to this ticket all errors crossed during implementing the project

JoCls commented 1 month ago

Regarding MySQL & Flyway configuration :

JoCls commented 1 month ago

Added Lombok anotation @Builder for easier testing. It was causing an issue by forcing to use the AllArgs Constructor with the "id" field in our test cases for DB integration.

JoCls commented 1 month ago

Adding Spring security module made all my tests failed, constantly throwing error 401 or 403. This was due to the fact that no MockUser were defined and that my POST method calls were not specified with method "?with(crsf())"

JoCls commented 1 month ago

I had issue with Spring using the default UserDetailsService resulting in unexpected behaviour regarding user rights in my application. Issue was fixed by specifying a custom UserDetailsService in the http configuration of SecurityFilterChain

JoCls commented 1 month ago

I encountered A LOT of issues with trying to make use of Spring Session mangement but there were too much conflicts and weird behaviour with the React part. I decided to swap to a JWT token implementation, easier and more reliable

JoCls commented 1 month ago

Had a bug that would allow users to manually pass by the login page and still have access to everything. I Added a context handler that made sure user would be redirected to the login page if they were not authenticated

JoCls commented 1 month ago

The table rendering in my "Show My Reservation Pages" was horrible due to some typo in the styles.css file. After review, everything was corrected and the table was correctly displaying information Also had some conflict between the fields used in the frontend and the fields define in the JSON Body by the backend, had to align everything

JoCls commented 1 month ago

Removed incorrect anotation in Item with a @OneToMany that caused a recursive call on reservation, making my JSON body infinite, dumb mistake

JoCls commented 1 month ago

Forgot to define default starting page of my application to /login, so user would start the app and wait on a full blank page on "/" I added an auto redirect in my ProtectedRoute and AuthContext logic to avoid this

JoCls commented 1 month ago

Removed some useless css files but forgot to remove the import in some page definition, causing compilation error in the frontend. Easy quick fix after reviewing :)

JoCls commented 1 month ago

Had issues trying to run the full app on the backend side with included frontend ressources under /static/ but didn't work out. Had to deal with lot of conflict access so I guess it was a bad design call. Went back to the back running on port :8080 and front on :3000, now everything is smooth

JoCls commented 1 month ago

Had issues trying to delete users via the admin panel caused by the fact that the DELETE CASCADE was not configured. Making it impossible to delete users with existing reservation due to the use of the foreign key from table Reservation

JoCls commented 1 month ago

Had conflict in my backend call with frontend because the JSON payload had an incorrect field "type" instead of "itemType" Corrected it by respecting my DTO/Entities definition