Closed MarcusNotheis closed 1 month ago
Hi colleagues, For me it was not possible to reproduce the issue, running the application locally. It runs smoothly and the server doesn't crash. Can you, please, take a look at the remarks inside the issue?
Best regards, Petya Markova. (UI5 Web Components Dispatcher)
Bug Description
When statically importing a UI5 Web Component in a Next.js application with server side rendering, the first load of the component is working fine, a refresh of the page is then crashing the dev server.
I think the issue is caused by the
getAllRuntimes
returning an empty array which is not foreseen in thedisplayFailedRegistrationMethod
in theCustomElementsRegistry
: https://github.com/SAP/ui5-webcomponents/blob/b64d76f7b425feeab61e93a9e452cd127b2cfb4d/packages/base/src/CustomElementsRegistry.ts#L47Affected Component
UI5Element
Expected Behaviour
Dev server should not be crashing
Isolated Example
https://stackblitz.com/edit/github-kehu81?file=app%2Fpage.tsx
Steps to Reproduce
npm install
npm run dev
http://localhost:3000
, you can see the buttonLog Output, Stack Trace or Screenshots
Priority
High
UI5 Web Components Version
1.24.0
Browser
Chrome, Edge, Firefox, Safari
Operating System
Chrome
Additional Context
In UI5 Web Components for React, we've worked around that issue by having dedicated builds for server-side and client-side rendering, but when generating React wrappers for custom UI5 Web Components libraries with our UI5 Web Components for React script, this is not feasible.
In addition, after https://github.com/SAP/ui5-webcomponents/pull/8184 has already been merged I would expect that I can just import all UI5 Web Components directly on the server as the DOM environment is shimmed and UI5 Web Components for React can remove the dedicated SSR build again.
Organization
UI5 Web Components for React / SIX Technologies
Declaration