React-native-firebase: [RemoteConfig] The operation couldn't be completed. (com.google.remoteconfig.ErrorDomain error 8002.)

Created on 9 Mar 2018  路  9Comments  路  Source: invertase/react-native-firebase

Issue

The operation couldn't be completed. (com.google.remoteconfig.ErrorDomain error 8002.)

simulator screen shot - iphone 8 - 2018-03-09 at 10 53 59

Podfile.lock

  - Firebase/Core (4.9.0):
    - FirebaseAnalytics (= 4.0.9)
    - FirebaseCore (= 4.0.15)
  - Firebase/RemoteConfig (4.9.0):
    - Firebase/Core
    - FirebaseRemoteConfig (= 2.1.2)
  - FirebaseRemoteConfig (2.1.2):
    - FirebaseABTesting (~> 1.0)
    - FirebaseAnalytics (~> 4.0)
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
    - Protobuf (~> 3.1)

Environment

iOS 11.1
RN 0.53.3
RN Firebase 3.2.7
Mac OS X 10.12.6

JavaScript iOS Remote Config Waiting for User Response

Most helpful comment

@maggialejandro is that red box getting triggered by your own console.error or is it happening internally?

P.S. You don't need to wrap a new Promise around your logic, as it already returns a promise :)

All 9 comments

It only happens with the remote debugger enabled

@maggialejandro can you provide your Remote Config JS code that you're running?

I call fetch when app starts

// @flow
/* eslint-disable flowtype/no-weak-types */
import firebase from 'react-native-firebase';

const config = firebase.config();

export default class RemoteConfig {
  constructor() {
    // eslint-disable-next-line
    if (__DEV__) {
      config.enableDeveloperMode();
    }
  }

  static fetch(): Promise<*> {
    return new Promise((resolve: Function, reject: Function) => {
      config.fetch(0)
        .then((): Promise<*> => config.activateFetched())
        .then((activated: boolean): Promise<*> => {
          if (!activated) {
            return reject(new Error('Fetched data not activated'));
          }

          return config.getKeysByPrefix();
        })
        .then((keys: Array<string>): Promise<*> => config.getValues(keys))
        .then((objects: Object): Object => {
          const configurations = {};
          Object.keys(objects).forEach((key: string) => {
            configurations[key] = objects[key].val();
          });

          return resolve(configurations);
        })
        .catch((e: Error) => {
          console.error(e);
          reject(e);
        });
    });
  }
}

@maggialejandro is that red box getting triggered by your own console.error or is it happening internally?

P.S. You don't need to wrap a new Promise around your logic, as it already returns a promise :)

@maggialejandro what was the solution?

@Ehesp I misspelled the log function, the error remains but the red window isn't triggered anymore

I got this error when i try to change remote config value on firebase
My firebase version is 5.3.1
2018-11-08 20:46:12.454328+0700 test[2495:545746] ERROR: Remote Config: Fetch encountered an error: The operation couldn鈥毭劽磘 be completed. (com.google.remoteconfig.ErrorDomain error 8002.)
Remote Config: Fetch encountered an error: The operation couldn鈥檛 be completed. (com.google.remoteconfig.ErrorDomain error 8002.)

started getting this error now.

How often do you call the service and what cache are you using?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joecaraccio picture joecaraccio  路  3Comments

callmejm picture callmejm  路  3Comments

Damnum picture Damnum  路  3Comments

mahyarr picture mahyarr  路  3Comments

ODelibalta picture ODelibalta  路  3Comments