PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
263 stars 182 forks source link

Bug with 404 returns on frontend routing due to the backend thinking they are endpoints #877

Open srimanachanta opened 1 year ago

srimanachanta commented 1 year ago

The backend checks if any route is a backend endpoint before giving it to the frontend, this was found as a bug following #856 when HTML5 History was swapped to. This needs to be fixed by defining each Vue component as per Javalin's guide found here.

srimanachanta commented 1 year ago

With the change to the HTML5 history, Javalin treats the new URL routes as HTTP requests before it routes them to the UI. This causes 404 errors to be thrown cause the endpoint isn't defined. If we revert back to hash URLs (http://photonvision.local/#/whatever) it should fix our issue but that is a temporary solution.

I think we should do that because doing the Javalin-recommended way with VueComponent means that we can no longer use the vue-router component which makes development much simpler.

mdurrani808 commented 11 months ago

@srimanachanta good to close?

srimanachanta commented 11 months ago

@srimanachanta good to close?

No, still need to resolve with the VueComponent API. Current fix is only temporary for this year's beta.