You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have forked this repository at this version (e7b75dc), followed the steps to setup on Optimizely SAAS instance. We have taken the necessary secret keys and configured on vercel and deployed the app. The home page was showing 500 internal error. I was seeing in the vercel log that the middleware was erroring out with the following error:
"Error running the exported Web Handler: [Error: No fetch event listeners found]".
The CMS was showing the site in visual builder however without editing capabilities.
Since seeing this middleware error, I commented the middleware chain and put in dummy middleware.
// export const middleware = withEditFallback((request: NextRequest) =>
// {
// // Make sure we have a known Visitor ID
// const visitorId = Session.getOrCreateVisitorId(request)
// const requestHeaders = new Headers(request.headers)
// requestHeaders.set('x-visitorid', visitorId)
export const middleware = (request: NextRequest) =>
{
// Make sure we have a known Visitor ID
const requestHeaders = new Headers(request.headers)
const response = NextResponse.next({
request: {
headers: requestHeaders
}
})
return response
}
With this change, the vercel app showed up without 500 error. The home page now showed with navigation and 404 screen. When I visited the site/en it showed the moseybank site. The CMS was showing in visual editor the site, but without editing capabilities as before.
No editing boxes in Visual Editor as shown in the above image
Are you able to deploy this version (e7b75dc) to new Optimizely SAAS instance and deploy to vercel and see the site properly working?
Can you please let us know what the issue with middleware is.
What do we need to do fix this issue in the correct way?
What do we need to do to fix the editing capability on Visual Editor on SAAS CMS.
Any help in this regard is appreciated!
The text was updated successfully, but these errors were encountered:
pnittala
changed the title
Site errors with 500 Internal Error status on Vercel when deployed on vercel with Optimizely SAAS CMS
Site errors with 500 Internal Error status when deployed on vercel with Optimizely SAAS CMS
Jan 10, 2025
Hi,
I have forked this repository at this version (e7b75dc), followed the steps to setup on Optimizely SAAS instance. We have taken the necessary secret keys and configured on vercel and deployed the app. The home page was showing 500 internal error. I was seeing in the vercel log that the middleware was erroring out with the following error:
"Error running the exported Web Handler: [Error: No fetch event listeners found]".
The CMS was showing the site in visual builder however without editing capabilities.
Since seeing this middleware error, I commented the middleware chain and put in dummy middleware.
// export const middleware = withEditFallback((request: NextRequest) =>
// {
// // Make sure we have a known Visitor ID
// const visitorId = Session.getOrCreateVisitorId(request)
// const requestHeaders = new Headers(request.headers)
// requestHeaders.set('x-visitorid', visitorId)
// const response = NextResponse.next({
// request: {
// headers: requestHeaders
// }
// })
// Session.addVisitorId(response, visitorId)
// return response
// })
export const middleware = (request: NextRequest) =>
{
// Make sure we have a known Visitor ID
const requestHeaders = new Headers(request.headers)
const response = NextResponse.next({
request: {
headers: requestHeaders
}
})
}
With this change, the vercel app showed up without 500 error. The home page now showed with navigation and 404 screen. When I visited the site/en it showed the moseybank site. The CMS was showing in visual editor the site, but without editing capabilities as before.
No editing boxes in Visual Editor as shown in the above image
Any help in this regard is appreciated!
The text was updated successfully, but these errors were encountered: