\r\n \u003C/NuxtLayout>\r\n\u003C/template>\r\n```\r\n### /pages/index.vue\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nconst route = useRoute();\r\nconsole.log(route.fullPath);\r\n\u003C/script>\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch1>Home page\u003C/h1>\r\n \u003CNuxtLink to=\"/about\">About Page\u003C/NuxtLink>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n### /pages/about.vue\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch1>About page\u003C/h1>\r\n \u003CNuxtLink to=\"/\">Home Page\u003C/NuxtLink>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n### /layouts/default.vue\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nconst route = useRoute();\r\nconsole.log(route.fullPath);\r\n\u003C/script>\r\n\u003Ctemplate>\r\n \u003Cmain>\r\n \u003Cslot />\r\n \u003C/main>\r\n\u003C/template>\r\n```\r\n## Steps to reproduce\r\n1. Land on the home page\r\n2. View your console and note the logs produced by `/pages/index.vue` and `/layout/default.vue`\r\n3. Press the NuxtLink to go to the about page\r\n4. Press the NuxtLink on the about page to go back to the home page\r\n5. View your console and note the logs produced by `/pages/index.vue` and `/layout/default.vue`\r\n## Behavior\r\n**Current:**\r\n- When first landing on the home page, the logs of the page and the layout are consistent (both show '/' for the `fullPath`)\r\n- Upon navigating to the about page and return to the home page, the logs are different:\r\n - the page logs correctly: `/`\r\n - the layout logs incorrectly: `/about`\r\n\r\n**Expected:**\r\n- Both the layout and the page should have consistent logs (i.e. retrieve the same value from `useRoute()`)\r\n- The layout should display the correct `fullpath`, even when navigating away and returning using the NuxtLink (i.e. it should have logged '/' instead of '/about/' since we are on the home page)\r\n\r\n### Describe the bug\r\n\r\nWhen calling `useRoute()` inside of a layout, it will retrieve the correct value on the initial load or when refreshing the page. Once navigating away using a NuxtLink, it appears to retrieve an incorrect/old value (possibly due to client-side rendering). Please see the reproduction section for details.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[1984],{"name":1985,"color":1986},"pending triage","E99695",21340,"nuxt","open","useRoute providing incorrect data when used in a layout","2025-02-14T19:34:24Z","https://github.com/nuxt/nuxt/issues/21340",0.68150383,{"labels":1995,"number":1996,"owner":1988,"repository":1988,"state":1997,"title":1998,"updated_at":1999,"url":2000,"score":2001},[],13114,"closed","Hydration error for redirect route plugin","2023-01-19T16:47:39Z","https://github.com/nuxt/nuxt/issues/13114",0.6403125,{"labels":2003,"number":2004,"owner":1988,"repository":1988,"state":1997,"title":1998,"updated_at":2005,"url":2006,"score":2001},[],13185,"2023-01-19T16:48:28Z","https://github.com/nuxt/nuxt/issues/13185",{"description":2008,"labels":2009,"number":2020,"owner":1988,"repository":1988,"state":1997,"title":2021,"updated_at":2022,"url":2023,"score":2024},"### Environment\n\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.4.3\r\n- Nitro Version: 2.3.3\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: runtimeConfig, css, alias, app, modules, i18n, vite\r\n- Runtime Modules: @nuxtjs/i18n@8.0.0-beta.12\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nIm try to lock routing if user is not auth:\r\n\r\nplugin: \r\n\r\n```\r\nasync function checkUser() {\r\n try {\r\n const fs = await useRequest('/v1/cabinet/profile');\r\n console.log(fs)\r\n } catch (error) {\r\n console.log(error)\r\n }\r\n}\r\n\r\nexport default defineNuxtPlugin(async (nuxtApp) => {\r\n const user = useState('user');\r\n // await checkUser();\r\n // if(!user.value) return navigateTo('/auth/sign-in')\r\n \r\n addRouteMiddleware(async (to, from) => {\r\n\r\n try {\r\n if(to.meta.requireAuth && to.meta.requireAuth !== 'guest') {\r\n await checkUser();\r\n if(!user.value) return navigateTo('/auth/sign-in')\r\n } else if(to.meta.requireAuth && to.meta.requireAuth === 'guest') {\r\n await checkUser();\r\n if(user.value) return navigateTo('/')\r\n }\r\n } catch (error) {\r\n\r\n }\r\n })\r\n})\r\n```\r\n\r\npage with user:\r\n```\r\n\u003Ctemplate lang=\"pug\">\r\n.cabinet\r\n .cabinet__box\r\n p 111\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\ndefinePageMeta({\r\n requireAuth: 'user',\r\n});\r\n\u003C/script>\r\n```\n\n### Describe the bug\n\nThe problem is that when I go to the page from where the redirect should happen, it does occur, but the layout of the page to which the redirect should happen does not load, and it throws an error:\r\n\r\n```\r\n[Vue warn]: Hydration node mismatch:\r\n- Client vnode: div \r\n- Server rendered DOM: \u003C!--[--> (start of fragment) \r\n at \u003CAuth > \r\n at \u003CLayoutLoader key=\"auth\" name=\"auth\" hasTransition=true > \r\n at \u003CBaseTransition mode=\"default\" appear=false persisted=false ... > \r\n at \u003CTransition name=\"layout\" mode=\"default\" > \r\n at \u003CNuxtLayout> \r\n at \u003CApp key=3 > \r\n at \u003CNuxtRoot>\r\n```\r\n\r\nThe route seems to be blocked, but the layout of the page does not load after the redirect.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2010,2013,2014,2017],{"name":2011,"color":2012},"3.x","29bc7f",{"name":1985,"color":1986},{"name":2015,"color":2016},"needs reproduction","FBCA04",{"name":2018,"color":2019},"closed-by-bot","ededed",21975,"Nuxt locking router error (Hydration node mismatch:)","2023-08-06T01:48:28Z","https://github.com/nuxt/nuxt/issues/21975",0.64131916,{"labels":2026,"number":2029,"owner":1988,"repository":1988,"state":1997,"title":2030,"updated_at":2031,"url":2032,"score":2033},[2027,2028],{"name":2011,"color":2012},{"name":1985,"color":1986},13822,"Using navigateTo() to redirect back to current url causes Failed to execute insertBefore on Node","2023-01-19T17:07:43Z","https://github.com/nuxt/nuxt/issues/13822",0.6456056,{"labels":2035,"number":2038,"owner":1988,"repository":1988,"state":1997,"title":1998,"updated_at":2039,"url":2040,"score":2041},[2036,2037],{"name":2011,"color":2012},{"name":1985,"color":1986},13054,"2023-01-19T16:57:31Z","https://github.com/nuxt/nuxt/issues/13054",0.64805466,{"description":2043,"labels":2044,"number":2047,"owner":1988,"repository":1988,"state":1997,"title":2048,"updated_at":2049,"url":2050,"score":2051},"### Environment\n\n- Operating System: Linux\r\n- Node Version: v16.20.0\r\n- Nuxt Version: 3.6.2\r\n- Nitro Version: 2.5.2\r\n- Package Manager: npm@9.4.2\r\n- Builder: vite\r\n- User Config: devtools, app\r\n- Runtime Modules: -\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-z3ajsx?file=pages%2Ffoo%2Findex.vue,pages%2Fbar%2Findex.vue,nuxt.config.ts,app.vue\n\n### Describe the bug\n\nWhen we turn on page transition, if we click on another link in the middle of the transition, we get an error and the page doesn't show anything. \n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nchunk-VWWL2I6E.js:9134 Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.\r\n at insert (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:9134:12)\r\n at move (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:7547:9)\r\n at move (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:7520:7)\r\n at move (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:7520:7)\r\n at activeBranch.transition.afterLeave (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:2779:15)\r\n at performRemove (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:7657:20)\r\n at el._leaveCb (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:3587:9)\r\n at finishLeave (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:9847:13)\r\n at resolve2 (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:9878:30)\r\n at whenTransitionEnds (http://localhost:3001/_nuxt/node_modules/.cache/vite/client/deps/chunk-VWWL2I6E.js?v=67f0dc20:9957:12)\r\n```\n```\n",[2045,2046],{"name":2011,"color":2012},{"name":1985,"color":1986},22093,"PageTransition: Clicking on another link while animating will report an error","2023-07-11T14:48:31Z","https://github.com/nuxt/nuxt/issues/22093",0.6616138,{"labels":2053,"number":2064,"owner":1988,"repository":1988,"state":1997,"title":2065,"updated_at":2066,"url":2067,"score":2068},[2054,2055,2058,2061],{"name":2011,"color":2012},{"name":2056,"color":2057},"upstream","E8A36D",{"name":2059,"color":2060},"❗ p4-important","D93F0B",{"name":2062,"color":2063},"upstream-bug","B60205",13350,"Error When Fast Navigating \"Failed to execute 'insertBefore' on 'Node'\"","2024-02-26T16:26:32Z","https://github.com/nuxt/nuxt/issues/13350",0.6620042,{"labels":2070,"number":2073,"owner":1988,"repository":1988,"state":1997,"title":2074,"updated_at":2075,"url":2076,"score":2077},[2071,2072],{"name":2011,"color":2012},{"name":1985,"color":1986},14349,"Hydration error when using middleware to guard page","2023-01-19T17:34:21Z","https://github.com/nuxt/nuxt/issues/14349",0.66428244,{"description":2079,"labels":2080,"number":2081,"owner":1988,"repository":1988,"state":1997,"title":2082,"updated_at":2083,"url":2084,"score":2085},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v14.17.1`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@8.5.4`\r\n- Builder: `vite`\r\n- User Config: `app`, `modules`, `tailwindcss`, `build`, `vite`, `alias`\r\n- Runtime Modules: `@nuxtjs/tailwindcss@6.1.3`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\nGo to: [test Nuxt application](https://testing-page-transition-error.vercel.app/app)?\r\n\r\nToggle between App and Profile routes multiple times, the error will happen if you changed quickly enough, the problem isnt the error it self, but the application breaks all content after that...\n\n### Describe the bug\n\nDOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node\n\n### Additional context\n\n\r\n\r\nhttps://www.loom.com/share/2c285d6b5050426aaccf3e278bb96f5f\n\n### Logs\n\n```shell\nUncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.\n```\n",[],15810,"Page transition throw error and break application when changing page before ending current transition:","2023-01-19T18:29:36Z","https://github.com/nuxt/nuxt/issues/15810",0.66835904,["Reactive",2087],{},["Set"],["ShallowReactive",2090],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"w64b6ytiDb376H3ObeLvLqzQfW1oZTCUHSO5WGgIKUs":-1},"/nuxt/nuxt/14524"]