navigation guard
When i refresh a product page, an error is thrown of navigation guard.
This error is getting triggered either i land from home page to product page or even perform a simple refresh on homepage.
Vuestorefront version = 1.11.0
vue= 2.6.6
vue-router=3.0.1
i did lookedup over internet that this could be issue with vue-router, i updated the vue-router version but still this error i am facing. I am still trying to debug it, but the reason is not known that why even on refresh getting this following error.
Due to this the PM2 on server is populated with these errors, and we are assuming this is also causing issue for server downtimes.
If anyone direct me for how can i resolve this issue on VSF1.
![No description](https://cdn.answeroverflow.com/1199303607384805456/image.png)
5 Replies
Issue seems to be generated from this adapter file.
it loads the product data from elastic search ,
this same code run ok for all other indexes of elastic search but for product it throw error.
![No description](https://cdn.answeroverflow.com/1199304673602052196/6660d5b7-3a9e-461a-abf9-6f626c98960f.png)
Hi @haiderpk 👋 I'll see if I can get an Engineer familiar with VSF1 to have a look. Please let me know if you solve it in the meantime.
Thankyou @rohrig , Yes sure i will update my findings here as well as i am also currently working on this.
I got a response from our engineers. They suggested you find the Route URL Resolver code and debug it line be line.
seems like if i remove /p/ from the product routes in router file.
the navigation guard error goes away.
but in Product.vue file from pages.
we loose parentSku from params.
`
the commented out line is where i tried to give static sku to make sure if product page gets loaded and there is no navigation guard error.
and seems like there was no error.
but when i continue with p as default, it first hits page-not-found, then hits back to real product page.
![No description](https://cdn.answeroverflow.com/1199359849683763341/image.png)