Hello.
I’m using MongoDB Realm Sync in a production environment.
Recently, some users fail to log in.
Looking at the server log at that time, the status of the login request is OK and it looks like there is no problem.
However, the client SDK is returning an error and the user is unable to log in.
Client code:
app.login(credentials: Credentials.emailPassword(email: email, password: password)) { [weak self](result) in
DispatchQueue.main.async {
// self!.setLoading();
switch result {
case .failure(let error):
Logger.shared.log("Login failed: \(error)");
failCallback(error, nil)
return
case .success(let user):
print("Login succeeded!");
guard let `self` = self else { return }
// some code....
}
Client log:
Login failed: Error Domain=realm::app::HttpError Code=431 "http error code considered fatal" UserInfo={realm::app::HttpError=Client Error: 431, NSLocalizedDescription=http error code considered fatal}
#Failed to login: http error code considered fatal
http error code considered fatal
I looked up the error code and it seems that the header of the request is too long.
Does anyone have any knowledge about this?
RealmSwift Version : 10.19.0
Mongo DB Atlas Version : 4.4.10