Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the <Video/> component throws Suspense boundary Unhandled Runtime Error #234

Open
GorvGoyl opened this issue Apr 12, 2024 · 5 comments

Comments

@GorvGoyl
Copy link

GorvGoyl commented Apr 12, 2024

This is the error I get when I use the component. I followed https://next-video.dev/docs to set it up. If I remove the component then error is gone.

Error: This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.

screenshot 2024-04-12 at 19 06 31@2x

here's how I'm using it:

"next": "14.1.4" & pages router

screenshot 2024-04-12 at 19 06 46@2x

screenshot 2024-04-12 at 19 12 00@2x

Let me know if you need more details.

@GorvGoyl
Copy link
Author

ps: react strict mode is enabled

@luwes
Copy link
Collaborator

luwes commented Apr 12, 2024

thanks for reporting. could you provide an online demo or codesandbox?
that would help a lot in debugging.

Here you can fork
https://codesandbox.io/p/devbox/next-video-mux-j9nn73?file=%2F.codesandbox%2Ftasks.json
or
https://github.com/muxinc/next-video/tree/main/examples/default-provider
https://next-video-demo.vercel.app/

@GorvGoyl
Copy link
Author

GorvGoyl commented Apr 13, 2024

It's causing the issue in my production app and I can't share the source code. Happy to help in other ways.

@GorvGoyl
Copy link
Author

It seems like suspense is not handled correctly in your library. I found a workaround (https://chat.openai.com/share/c75ba523-8567-4800-ae97-0a8674f9330e), but this is not ideal for library users since the underlying library is supposed to handle this. Looking forward to the fix from the library side.

@coderInwind
Copy link

I found a way to fix the error:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants