gardencmp / jazz

A new way to build apps with distributed state.
https://jazz.tools
MIT License
359 stars 18 forks source link

sync.js:442 Uncaught (in promise) (FiberFailure) Error #231

Closed Aslam97 closed 1 month ago

Aslam97 commented 1 month ago

Getting this error after login using the DemoAuth

App is using Nextjs 14.

Screenshot 2024-07-16 at 09 54 05

Step reproduce

  1. Nextjs 14 installation
  2. Setting up client provider
"use client"

import { createJazzReactContext, DemoAuth } from "jazz-react"

const Jazz = createJazzReactContext({
  auth: DemoAuth({ appName: "My App" }),
  peer: "wss://mesh.jazz.tools/?key=example@gmail.com" // <- put your email here to get a proper API key later
})

export const { useAccount, useCoState } = Jazz

export function JazzProvider({ children }: { children: React.ReactNode }) {
  return <Jazz.Provider>{children}</Jazz.Provider>
}
  1. Use the provider in layout
export default function RootLayout({
  children
}: Readonly<{
  children: React.ReactNode
}>) {
  return (
    <html lang="en">
      <body className={cn("font-sans antialiased", fontSans.variable)}>
        <JazzProvider>{children}</JazzProvider>
      </body>
    </html>
  )
}
aeplay commented 1 month ago

Thank you for the detailed repro, will have a look!

aeplay commented 1 month ago

This is caused by #232 - closing in favour of the more descriptive goal