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.08k stars 302 forks source link

server responded with 500 error when i generate post and try to add to home page but photo is not showing on home page #54

Open akashmali23 opened 1 year ago

akashmali23 commented 1 year ago

i have tried the fix available like setting up new cluster of mongodb and rechecking the code deeply please help cause it took me 4 hours to resolve this error but it isn't solved yet

gabsdovz commented 1 year ago

I had the same problem. Try changing your dns to google's public dns, maybe there's a problem connecting to MongoDB. That solved it for me.

akashshukla7458 commented 1 year ago

can you describe more how you solved it @gabsdovz

gabsdovz commented 1 year ago

can you describe more how you solved it @gabsdovz

You can find the walkthrough here(https://developers.google.com/speed/public-dns/docs/using).

In my case on Windows:

I followed the following steps.

Go to the Control Panel. Click Network and Internet > Network and Sharing Center > Change adapter settings.

And in my case: I replaced those addresses with the IP addresses of the Google DNS servers: For IPv4: 8.8.8.8 and 8.8.4.4.

By doing this the connection with MongoDB was established correctly and then the photo was displayed on the home page after being generated and shared.

AyushJiwatramani commented 1 year ago

Image still not visible in the home page

vaggelisdrak commented 1 year ago

I just added access from everywhere in the MongoDB cluster and it worked image