Error: async/await is not yet supported in Client Components, only Server Components. This error is
Unanswered
Fork-tailed Storm-Petrel posted this in #help-forum
Fork-tailed Storm-PetrelOP
Hey Guys! I have these pages which are:
Layout.tsx, Page.tsx, and Providers.tsx.
The problem is that i am trying to access Session in my page.tsx components where it is a client component, but although i already access the session from the layout.tsx file using getServerSession and passing it to the page.tsx file and accessed using useSession(), i still get this error and the components within the web suddenly showing something went wrong!
Layout.tsx, Page.tsx, and Providers.tsx.
The problem is that i am trying to access Session in my page.tsx components where it is a client component, but although i already access the session from the layout.tsx file using getServerSession and passing it to the page.tsx file and accessed using useSession(), i still get this error and the components within the web suddenly showing something went wrong!
1 Reply
West African Lion
you can only use async/await in server components.