skip to Main Content

I’m trying by following the docs to register and then login with realm.
Unfortunatly I got an error RealmException : non-zero custom status code considered fatal when trying to do :
authProvider.registerUser(email, password)
or :
app.logIn(emailCred);

I created a repo to reproduce here (look for the _handleSubmitted function inside register_view or login_view files) :
https://github.com/geosebas/flutter_realm_auth

You will just need a mongodb free tier account with an empty app and email/password auth enabled (with no confirm email and default reset function)

I’m new to both flutter and realm so the solution may be very simple, please help me !

Thanks

2

Answers


  1. Chosen as BEST ANSWER

    I just finally got the solution !

    By reading in details the doc, I saw that you cannot choose the GCP as a deployment region for app service, but my atlas cluster is in GCP, so by default when you create an app on app service, it will be on GCP and nothing (or at least user auth) will work.

    IMHO, it’s a very annoying bug as you cannot debug anything and the error you will get mean nothing.

    Have a nice day :slight_smile:

    PS : Here the post on mongodb forum with a bit more details : https://www.mongodb.com/community/forums/t/flutter-realm-auth-not-working/176195


  2. I ran into the same error when running in the iOS debugger, and the issue was that I needed to add client network entitlements.

    I added the following code to the files DebugProfile.entitlements and Release.entitlements:

    <key>com.apple.security.network.client</key>
    <true/>
    

    This solution was inspired by a similar user issue with flutter firebase.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search