appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🐛 Bug Report: Issue with Image Loading on Vercel Deployment

Open anuragino opened this issue 1 year ago • 3 comments

👟 Reproduction steps

I've been working on my React app locally using Appwrite storage to store images and generate previews, and everything has been functioning smoothly on local host. However, upon deploying the app to Vercel, I encountered an issue where the images are not loading. I've taken steps to troubleshoot the problem, including attempting to add a custom domain, but the issue persists. Here, is the link of my website BlogHub.

👍 Expected behavior

image

👎 Actual Behavior

Screenshot 2024-03-12 130159

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Something else

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

anuragino avatar Mar 12 '24 07:03 anuragino

@anuragino, you might be running into a 3rd party cookie problem and will need to set up a custom domain. To confirm, you can try to enable 3rd party cookies in your browser and test.

stnguyen90 avatar Mar 13 '24 15:03 stnguyen90

I have tried enabling 3rd party cookies but it didn't worked for me.

anuragino avatar Mar 13 '24 16:03 anuragino

I am trying to add a custom domain, but it is showing that the domain is verified. The certificate generation will begin after domain verification.

Screenshot 2024-03-13 222827

anuragino avatar Mar 13 '24 17:03 anuragino

I have tried enabling 3rd party cookies but it didn't worked for me.

How did you enable 3rd party cookies? Would you please share the network logs from the browser for the request for the image? There should be a tab for the cookies included in the request.

I am trying to add a custom domain, but it is showing that the domain is verified.

The domain should be an endpoint you're using in client.setEndpoint() that is a sub-domain of your app. Please make sure you thoroughly read the custom domain docs.

stnguyen90 avatar Mar 20 '24 16:03 stnguyen90

These are the network log of the site. Screenshot 2024-03-21 155228

anuragino avatar Mar 21 '24 10:03 anuragino

@anuragino, please double check your project ID does not have any additional characters before it (like a plus or space).

stnguyen90 avatar Mar 21 '24 20:03 stnguyen90

Yes, there was a space at the beginning of the project ID.

anuragino avatar Mar 22 '24 08:03 anuragino

Thank you very much for your assistance! The problem has been resolved, and the site is now working perfectly.

anuragino avatar Mar 22 '24 08:03 anuragino