Realm PermissionRequest.applyPermission() not returning


#1

Hello, my app was working fine until last night, it’s just infinitely loading. Upon debugging, managementRealm and permissionRealm are both null and goes to the code below:

private RealmAsyncTask addTask(PermissionManagerTask task) {
        if (isReady()) {
            activateTask(task);
        } else {
            delayTask(task);
            openRealms();
        }

        return task;
    }

// Open all underlying Realms asynchronously. Once they are all ready, all tasks added in the meantime are
    // started. Any error will be reported through the `Callback.onError` callback if the Realms failed to open
    // correctly.
    private void openRealms() {
        if (!openInProgress) {
            openInProgress = true;
            managementRealmOpenTask = Realm.getInstanceAsync(managementRealmConfig, new Realm.Callback() {
                @Override
                public void onSuccess(Realm realm) {
                    managementRealm = realm;
                    managementRealmOpenTask = null;
                    checkIfRealmsAreOpenedAndRunDelayedTasks();
                }

                @Override
                public void onError(Throwable exception) {
                    synchronized (errorLock) {
                        managementRealmError = new ObjectServerError(ErrorCode.UNKNOWN, exception);
                        managementRealmOpenTask = null;
                        checkIfRealmsAreOpenedAndRunDelayedTasks();
                    }
                }
            });
            permissionRealmOpenTask = Realm.getInstanceAsync(permissionRealmConfig, new Realm.Callback() {
                @Override
                public void onSuccess(Realm realm) {
                    permissionRealm = realm;
                    permissionRealmOpenTask = null;
                    checkIfRealmsAreOpenedAndRunDelayedTasks();
                }

                @Override
                public void onError(Throwable exception) {
                    synchronized (errorLock) {
                        permissionRealmError = new ObjectServerError(ErrorCode.UNKNOWN, exception);
                        permissionRealmOpenTask = null;
                        checkIfRealmsAreOpenedAndRunDelayedTasks();
                    }
                }
            });
            defaultPermissionRealmOpenTask = Realm.getInstanceAsync(defaultPermissionRealmConfig, new Realm.Callback() {
                @Override
                public void onSuccess(Realm realm) {
                    defaultPermissionRealm = realm;
                    defaultPermissionRealmOpenTask = null;
                    checkIfRealmsAreOpenedAndRunDelayedTasks();
                }

                @Override
                public void onError(Throwable exception) {
                    synchronized (errorLock) {
                        defaultPermissionRealmError = new ObjectServerError(ErrorCode.UNKNOWN, exception);
                        defaultPermissionRealmOpenTask = null;
                        checkIfRealmsAreOpenedAndRunDelayedTasks();
                    }
                }
            });
        }
    }

Never returns the callback, and im getting no error message. I tried my ios version and the same thing’s happening. Could this be a problem on my realm? How do we fix this