adrianhajdin / project_ai_mern_image_generation

Build and Deploy a Full Stack MERN AI Image Generation App MidJourney & DALL E Clone
https://jsmastery.pro
1.11k stars 308 forks source link

Photo is not add to home/community #4

Closed codewithnadeem14502 closed 1 year ago

codewithnadeem14502 commented 1 year ago

I got stuck at share with community point . JSM sir I follow this whole tutorial but after click surprise me then generating photo but when I click on share it community button then I am come back to home page with a only loading not photo is add to the community. And that loader is continues loading and loading .pls help me sir .

AnukratiMehta commented 1 year ago

I'm facing the same issue.

joelhkbn commented 1 year ago

same issue here...

the photo already generated, but when share, this error shows up.

image

and then no photo display on home

image

codewithnadeem14502 commented 1 year ago

Bro please check the links ( https://localhost8080 ).

TidbitsJS commented 1 year ago

@codewithnadeem14502, did you create and use your MongoDB account? In order to make the photos appear on your home page, you need both Cloudinary API keys & MongoDB URL.

chantalvannuland commented 1 year ago

@codewithnadeem14502 @joelhkbn @AnukratiMehta I've faced the same issue for a while. @joelhkbn you have the same errors as I did in the https://url.../api/v1/post.

I've solved it by setting up MongoDB again and changed my password without any punctuations like /@\? etc, if you use a password with punctuations you have to use the encoding reference. (Don't forget to change the URL in the .env file and also in your Render project)

As shown in the video, he had created a password of 123123123a (without any punctuations).

Hopes this helps for you too

joelhkbn commented 1 year ago

@NCMDdev Thank you. It turns out that the cause of the error was a typo in the link address that is in home.js and createPost.js that is not in accordance with the one in index.js on my server 😑

image

image Everything ran perfectly when I fixed it. 😑

buddhiashen commented 1 year ago

same issue here.

"Fetching posts failed, please try again" any idea how to resolve it

buddhiashen commented 1 year ago

@NCMDdev Thank you. It turns out that the cause of the error was a typo in the link address that is in home.js and createPost.js that is not in accordance with the one in index.js on my server 😑

image

image Everything ran perfectly when I fixed it. 😑

do you have the code?

joelhkbn commented 1 year ago

The error that appears can be very specific depending on the error you receive. Can you provide a view of the error in the browser console or the error in the VSCode terminal?

filiptrifunovic-mile commented 1 year ago

I got error also when trying to post on home page, in console i get POST http://localhost:8080/api/v1/post 500 (Internal Server Error), and in network tab in console i get {success: false, message: {error: {errno: -4064, code: "ENAMETOOLONG", syscall: "open",…}}} message : {error: {errno: -4064, code: "ENAMETOOLONG", syscall: "open",…}} success : false

filiptrifunovic-mile commented 1 year ago

CreatePost.jsx:15 POST http://localhost:8080/api/v1/post 500 (Internal Server Error) CreatePost.jsx:24 Response {type: 'cors', url: 'http://localhost:8080/api/v1/post', redirected: false, status: 500, ok: false, …} body : ReadableStream bodyUsed : true headers : Headers [[Prototype]] : Headers ok : false redirected : false status : 500 statusText : "Internal Server Error" type : "cors" url : "http://localhost:8080/api/v1/post" [[Prototype]] : Response

nepail commented 1 year ago

@filiptrifunovic-mile I have same issue But i found the solution setForm({ ...form, photo: data:image/jpeg;base64,${data.photo} }); becare for the property of photo, do not input any space

akashmali23 commented 1 year ago

i have the same issue but still it's not resolved tried every fix here