E/flutter (15189): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MongoDart Error: Db is in the wrong state: State.INIT error pls help me
Thank you, before finding this tutorial i've been working on nodejs...for using mongodb and flutterbut here seems unnecessary, so what this nodejs is used for if we can make our models in flutter...?
So the reason I have a node backend system is that in the future if you want to scale your app or a service, then it helps in having a separate service.
@@codewithkavit2581 the first reason should be the security. Not a good security practice to store any kind of credential into a mobile app as it can be easily reverse engineered
@@JoanCaron you are totally correct Joan, I didn’t mean to show that this is the correct way, I just wanted to show how we can interact with Mongodb, when building my own app I would either use a backend or environment variables. But just for demo purposes, I have done it like this.
I didn’t get your question, so u will never hardcode id and password in the flutter code, so it won’t be seen to other engineers working on the same codebase.
@@9tontruck ohh yes there is, so you can have a backend service which directly interacts with the db and then you don’t have to worry about storing credentials on the flutter end, also u can add the credentials file to gitignore, so no other engineer can view it.
@@9tontruckor this reason I’m using Appwrite. Even though it doesn’t support MongoDB yet. But it’s in their roadmap. Oh it comes with Authentication and Authorization.
Hi, Thanks for the video. But when connecting to MongoDB, i'm getting this exception. Unhandled Exception: MongoDB ConnectionException: Socket error: 2.718281828459045.
That’s because you need to check what permissions you have set for the admin user who can access Mongodb. Just check that and try again. I think I have covered that in a video.
E/flutter (15189): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MongoDart Error: Db is in the wrong state: State.INIT
error pls help me
thanks your explanation is easy to understand
Error: MongoDB ConnectionException: Could not connect to ac-x2lueh4-shard-00-00.vxyr9nh.mongodb.net:27017
how to solve this exception
getting same exception
inform me have any solution
Thank you,
before finding this tutorial i've been working on nodejs...for using mongodb and flutterbut here seems unnecessary, so what this nodejs is used for if we can make our models in flutter...?
So the reason I have a node backend system is that in the future if you want to scale your app or a service, then it helps in having a separate service.
@@codewithkavit2581 like authentication for login? So will you cover this one too with mongodb ?
@@speedtnt7591 so not in this series but I will make a full app video one day for full end to end flow.
@@codewithkavit2581 the first reason should be the security. Not a good security practice to store any kind of credential into a mobile app as it can be easily reverse engineered
@@JoanCaron you are totally correct Joan, I didn’t mean to show that this is the correct way, I just wanted to show how we can interact with Mongodb, when building my own app I would either use a backend or environment variables. But just for demo purposes, I have done it like this.
How can we secure the access id/password? I don't want them to be visible to other code-editors in the code
I didn’t get your question, so u will never hardcode id and password in the flutter code, so it won’t be seen to other engineers working on the same codebase.
@@codewithkavit2581 So is there a way to access the DB endpoint without hard-coding it? It's my question
@@9tontruck ohh yes there is, so you can have a backend service which directly interacts with the db and then you don’t have to worry about storing credentials on the flutter end, also u can add the credentials file to gitignore, so no other engineer can view it.
@@9tontruckor this reason I’m using Appwrite. Even though it doesn’t support MongoDB yet. But it’s in their roadmap.
Oh it comes with Authentication and Authorization.
Hi, Thanks for the video. But when connecting to MongoDB, i'm getting this exception. Unhandled Exception: MongoDB ConnectionException: Socket error: 2.718281828459045.
That’s because you need to check what permissions you have set for the admin user who can access Mongodb. Just check that and try again. I think I have covered that in a video.
Goto Network Access from the dashboard, click edit and select allow from all addresses. That will solve it
@@akinbamitaofeek1315 thank you so much🥺
Stopped watching @8:16 because you’re not calling an outside server for your CRUD operations.
Why does that pub package even exist?