I am new to Flutter and Couchbase, trying to connect to a sample bucket travel-sample using fluttercouch plugin, but getting error "unable to set target endpoint to ws//10.0.2.2:8091/travel-sample"
for setting endpoint as ws//10.0.2.2:8091/travel-sample
. Could some one explain to me what will be the endpoint for me and are there any changes needed else where. I am trying to test the server on the master repository of fluttercouch plugin. Here is the main.dart and bucket overview.

- 25,181
- 9
- 71
- 121

- 70
- 2
- 11
2 Answers
Couchbase Lite (the library underlying FlutterCouch implementation) cannot directly sync with Couchbase Server. A Couchbase Sync Gateway has to be deployed with the next instructions to allow syncing between the server and the mobile database:
"enable_shared_bucket_access": true,
"import_docs": "continuous",
You can find further documentation about Couchbase Sync Gateway in the Couchbase Documentation.

- 53
- 1
- 4
-
Thanks for replying, I have successfully connected to the Couchbase server. – Vishal Dhudum Nov 10 '18 at 07:07
-
1@VishalDhudum please provide a link and/or further information on how you accomplished that - just saying "I got it to work" does not solve your question on here and certainly does not help others, so please provide as much info as possible, ideally with source code or link to it on github. – MaxZ Feb 05 '21 at 17:07
The primary point of confusion is you're trying to connect your fluttercouch plugin directly to Couchbase Server, and it's designed for Couchbase Lite, which is what runs on on a mobile device. I don't have enough experience with flutter to tell you what that endpoint should be, but it looks like you're targeting the wrong thing at the moment.

- 1,894
- 14
- 14