38
Views
10
Comments
Solved
[MongoDB] MongoDB Timeout Error
Question
mongodb
Web icon
Forge asset by OutSystems Lab
Application Type
Mobile

I am following MongoDB tutorial: https://www.youtube.com/watch?v=QSO4vIePxqs  and i am getting an Timeout error while i run app. 

while i used this connection string i.e: mongodb+srv://<username>:<password>@cluster0.qlyqjcs.mongodb.net/?retryWrites=true&w=majority

it gives invalid String Error but when i use above String without +srv  its give timeout Error.

am i using correct string ?

Note: i am using username and password correctly.

Please help me.

UserImage.jpg
Anjali Choudhary
Solution

Hi @Muhammad Bilal ,

The solution is to encode the colon : using %3A . Similarly, 
if you used @ symbol in Password so you should replace it with %40 .

Real Password : Testing@123

In Connection String Password : Testing%40123

"mongodb://Usernag111:Testing%40123@cluster0.rxc1bef.mongodb.net/"

"mongodb://Usernag111%3ATesting%40123@cluster0.rxc1bef.mongodb.net/"

Both are working fine ,


 Note: Only encode the password. The : and @ are also used in the connection string as delimiters which should go untouched. 


Thanks


UserImage.jpg
Muhammad Bilal

This Error occurrs when i used %3A insted of :

i am not using @ in password.


Screenshot (522).png
UserImage.jpg
Anjali Choudhary

Hi @Muhammad Bilal ,

This is not for Mobile 

Please use this one 

Thanks

UserImage.jpg
Anjali Choudhary
Solution

Hi @Muhammad Bilal ,

Try to use this Forge this is for Mobile and Reactive.


OR


When you copy connection string

Follow the step .


In my case it is working in both 

connection string Driver and Compass 


UserImage.jpg
Muhammad Bilal

let me try. 

Thanks a lot.

UserImage.jpg
Muhammad Bilal

Hi @Harshit Nag 

it not working for me.

bye the way Thanks.

UserImage.jpg
Anjali Choudhary
UserImage.jpg
Muhammad Bilal

yes, i am using MongoDB Connector now.

UserImage.jpg
Muhammad Bilal
Solution

i install MogoDB connector below snap (and unistall MongoDB using before).

i refreshed dependencies in my app. 

use connection String as advise by you. but it didnot work.

UserImage.jpg
Anjali Choudhary
CustomSplashScreen.oml
UserImage.jpg
Muhammad Bilal
Solution

i install MogoDB connector below snap (and unistall MongoDB using before).

i refreshed dependencies in my app. 

use connection String as advise by you. but it didnot work.

UserImage.jpg
Anjali Choudhary
Solution

Hi @Muhammad Bilal ,

The solution is to encode the colon : using %3A . Similarly, 
if you used @ symbol in Password so you should replace it with %40 .

Real Password : Testing@123

In Connection String Password : Testing%40123

"mongodb://Usernag111:Testing%40123@cluster0.rxc1bef.mongodb.net/"

"mongodb://Usernag111%3ATesting%40123@cluster0.rxc1bef.mongodb.net/"

Both are working fine ,


 Note: Only encode the password. The : and @ are also used in the connection string as delimiters which should go untouched. 


Thanks


UserImage.jpg
Muhammad Bilal

This Error occurrs when i used %3A insted of :

i am not using @ in password.


Screenshot (522).png
UserImage.jpg
Anjali Choudhary

Hi @Muhammad Bilal ,

This is not for Mobile 

Please use this one 

Thanks

UserImage.jpg
Anjali Choudhary
Solution

Hi @Muhammad Bilal ,

Try to use this Forge this is for Mobile and Reactive.


OR


When you copy connection string

Follow the step .


In my case it is working in both 

connection string Driver and Compass 


UserImage.jpg
Muhammad Bilal

let me try. 

Thanks a lot.

UserImage.jpg
Muhammad Bilal

Hi @Harshit Nag 

it not working for me.

bye the way Thanks.

UserImage.jpg
Anjali Choudhary
UserImage.jpg
Muhammad Bilal

yes, i am using MongoDB Connector now.

UserImage.jpg
Muhammad Bilal
Solution

i install MogoDB connector below snap (and unistall MongoDB using before).

i refreshed dependencies in my app. 

use connection String as advise by you. but it didnot work.

UserImage.jpg
Anjali Choudhary
CustomSplashScreen.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.