adrianhajdin/project_ai_mern_image_generation

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

akashmali23 opened this issue · 5 comments

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

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.

can you describe more how you solved it @gabsdovz

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.

Image still not visible in the home page

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