You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
fatal error: Optional(Error Domain=io.realm.sync.auth Code=611 "The provided credentials are invalid or a user does not exist." UserInfo={NSLocalizedDescription=The provided credentials are invalid or a user does not exist.
Steps to Reproduce
`SyncUser.logIn(with: SyncCredentials.usernamePassword(username: username, password: password), server: URL(string: "http://**********:9080")!) { (user, error) in
guard let user = user else {
fatalError(String(describing: error))
}
let permissions = SyncPermissionValue(realmPath: "", userID: "", accessLevel: .write)
user.applyPermission(permissions) { error in
if error != nil { return }
}
user.retrievePermissions { permissions, error in
if error != nil { return }
}
DispatchQueue.main.async {
let configuration = Realm.Configuration(
syncConfiguration: SyncConfiguration(user: user, realmURL: URL(string: "realm://************:9080/~/listRealm")!))
let realm = try! Realm(configuration: configuration)
self.items = realm.objects(Item.self).sorted(byKeyPath: "created", ascending: false)
self.notificationToken = self.item.addNotificationBlock { [weak self] (changes: RealmCollectionChange) in
guard (self?.collectionView) != nil else { return }
switch changes {
case .initial:
self?.collectionView.reloadData()
break
case .update(_, let deletions, let insertions, let modifications):
self?.collectionView.performBatchUpdates({
self?.collectionView.insertItems(at: insertions.map({ IndexPath(row: $0, section: 0)}))
self?.collectionView.deleteItems(at: deletions.map({ IndexPath(row: $0, section: 0)}))
self?.collectionView.reloadItems(at: modifications.map({ IndexPath(row: $0, section: 0)}))
}, completion: nil)
break
case .error(let error):
print(error.localizedDescription)
break
}
}
}
}`
Version of Realm and Tooling
Realm Object Server Version: 2.1.12
Flavor:
Developer
Professional
Enterprise
Server OS & Version: macOS
Client SDK Version: RealmSwift 3.1
Client OS & Version: Swift 3.1
Logs
The text was updated successfully, but these errors were encountered:
I canConnect to Object Server and Open Realm URL, the latter with a token and with credentials. So I am certain it is something in my code client side. But just in case there was something else I missed... 😀
Goals
Log into Realm Object Server from iOS app
Expected Results
Success
Actual Results
fatal error: Optional(Error Domain=io.realm.sync.auth Code=611 "The provided credentials are invalid or a user does not exist." UserInfo={NSLocalizedDescription=The provided credentials are invalid or a user does not exist.
Steps to Reproduce
`SyncUser.logIn(with: SyncCredentials.usernamePassword(username: username, password: password), server: URL(string: "http://**********:9080")!) { (user, error) in
guard let user = user else {
fatalError(String(describing: error))
}
let permissions = SyncPermissionValue(realmPath: "", userID: "", accessLevel: .write)
user.applyPermission(permissions) { error in
if error != nil { return }
}
user.retrievePermissions { permissions, error in
if error != nil { return }
}
Version of Realm and Tooling
Logs
The text was updated successfully, but these errors were encountered: