Back

Facing issue with the nextjs integration

  • 0
  • Databases
  • Web
thisizvipin
18 Jul, 2024, 07:12

Facing issues with Next.js integration

 

I've a project in which i'm fetching a list of products from the appwrite collection. I'm using web-sdk and Next.js on the frontend for this, I fetched the data successfully by creating a free account but recently client shared us the invite to his account there i gott a custom apiEndpoint, projectId, databaseId and collectionId when i try to fetch data from his project I get this error(ss shared below)

appwrite.ts home/page.tsx(server component) products.ts

TL;DR
Developers facing issues with Next.js integration while fetching data from an Appwrite collection using a client's custom apiEndpoint. Ensure to check if the cloud endpoint works, SSL certificate is valid, and inspect errors if accessing shared endpoint in the browser without `/v1`. Successful data fetching confirmed using Postman.
darShan
18 Jul, 2024, 07:16

If you navigate to the shared endpoint on the browser (without /v1), does it open the console?

thisizvipin
18 Jul, 2024, 07:19

Yes it does

thisizvipin
18 Jul, 2024, 07:21

I tried getting data from postman using api it works in postman too.

darShan
18 Jul, 2024, 07:33

does it have a self-signed cert or a valid ssl?

darShan
18 Jul, 2024, 07:34

if you use the cloud endpoint, does that work?

thisizvipin
18 Jul, 2024, 07:56

How to check this?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more