Skip to content

🔥 [🐛] RNFBConfigModule getConstantsForApp Crash on iOS #7515

@TaylorDale

Description

@TaylorDale

Issue

This line has always caused a small subset of crashes for me in my apps but it's been gaining momentum as of late. Across all versions of iOS and devices.

Crashed: com.apple.root.utility-qos
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000020

Occurs in RNFBConfigModule.m - Line 325
-[RNFBConfigModule getConstantsForApp:] + 325

image

[RCTConvert double:@([remoteConfig configSettings].minimumFetchInterval)];

This is how I'm using this function call in my hooks:

/// useFirebaseConfigString.ts
import remoteConfig from '@react-native-firebase/remote-config';
import { useEffect, useState } from 'react';

export default (key: string): string | undefined => {
  const [value, setValue] = useState<string | undefined>(remoteConfig().getString(key));

  useEffect(() => {
    remoteConfig()
      .ensureInitialized()
      .then(() => {
        setValue(remoteConfig().getString(key));
      });
  }, [key]);

  return value;
};

package.json:

"@react-native-firebase/remote-config": "^18.5.0",
"react": "18.2.0",
"react-native": "0.71.13",
  • Platform that you're experiencing the issue on:
    - [x] iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions