I am experiencing an issue while embedding a Wix site into my ASP.NET Core application. The problem occurs when loading the Wix site inside my app, where the following error is thrown in the browser console:
Uncaught (in promise) Error: did not find the pageId for the requested url /
Issue Details:
- The error originates from
pageJsonFileNameMiddleware.ts
, indicating that Wix cannot resolve a validpageId
for the requested URL. - I am dynamically fetching the Wix page using an HTTP client in ASP.NET and rendering it inside my application.
- I manually appended the
pageId
to the request URL, but the issue persists. - Wix scripts (
thunderbolt.js
,wix-router.js
) are properly loading, yet the error still occurs.
Steps I Have Tried:
Ensured Wix scripts are loading correctly by checking
window.__WIX__
in DevTools.
Manually forced Wix to navigate to a valid page using
WixRouter.navigate("/home")
.
Checked CORS & CSP policies to ensure Wix scripts are not blocked.
Appended
pageId
manually in the request URL, but Wix still fails to detect it.