Comments (11)
Does it fail if you pass the cookieName? The guard statement should be fine as it is the json object for the SessionAuthenticator and should be {"method": "session", "sessionId": "yoursessionid", "cookieName": "yourcookiename or nil"}. Maybe you created a guest session and you don't allow guest login from sync gateway.
from couchbase_lite.
No, it doesn't fail when I pass the cookieName, e.g. "SyncGatewaySession". But it fails when the cookieName is omitted. Since cookieName in SessionAuthenticator is declared as a named parameter; in other words it is supposed to be optional. And I believe its counterpart in Swift is optional too. I am afraid it is a little bug. By the way, I think BasicAuthenticator would have the same issue for those accounts without passwords.
from couchbase_lite.
One more thing - when the cookieName was omitted, the json map in my debugger was shown as Dictionary<String, Any> since the cookieName was set as NSNull. Hope this would help.
from couchbase_lite.
That's definitely what is happening. Good catch!
from couchbase_lite.
For now pass the cookieName, I don't have time to spend on this at the moment but you're welcome to make the changes and do a pull request with the fix in place. If you do this it won't take long for me to push the changes to flutter pub but you can use your code with the fix in place until that is live.
from couchbase_lite.
No problem. ActuallyI am thinking about making a fix and do a pull request. Hopefully, it will be available sometime next week. In the meantime, I've worked around the issue by setting the cookieName to SyncGatewaySession. Thanks for your quick response.
from couchbase_lite.
This was merged, I just need to push a new release and then I will close the issue.
from couchbase_lite.
with basicauthenticator everything works fine ,but with sessionauthentication automatic sync dosent working. Is this issue related the same you mentioned above?
from couchbase_lite.
It could be related. Please try to call the SessionAuthenticator constructor with the cookieName specified.
from couchbase_lite.
It could be related. Please try to call the SessionAuthenticator constructor with the cookieName specified.
I haven't released the change to the plugin on pub.dev yet so you can reference this repo instead and it should solve your issue.
from couchbase_lite.
v2.7.1+1 has this fix in it
from couchbase_lite.
Related Issues (20)
- Desktop support HOT 1
- Crash on query with predicate using long attributes.
- Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.5.1 compiler HOT 6
- windows support? HOT 1
- [Replicator Error: Permanent Redirect] Sync not working in iOS
- `lower` function support for Expression HOT 3
- ReplicatorType.pushAndPull data push performs but pull not performing
- GroupBy not work
- And Query is not working returning empty result. HOT 1
- Database encryption HOT 2
- Hi
- Long Problem in pullAttributeFilters
- Please consider supporting nullsafety (at least in beta channel) HOT 2
- Replicator looses connection after 2 1/2 Minutes with error 'Error: Websocket connection closed by peer' HOT 5
- How to enable verbose log HOT 1
- Unable to install HOT 2
- Out of date dependencies HOT 5
- Flutter Web Support HOT 2
- Failed to build the example app on v3.0.0-nullsafety.1 HOT 1
- null-safety migrated app crash on document change (listener) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchbase_lite.