Skip to content

[🐛] Firebase Storage upload fails on iOS Production build (EAS) but works in Expo Dev Client and Android #8978

@AndrianarivoAlpha

Description

@AndrianarivoAlpha

I am experiencing a regression where @react-native-firebase/storage fails to upload files specifically on iOS production builds. The logic works perfectly in the following environments:

  • Expo Dev Client (iOS)
  • Android (Development & Production)

In production iOS builds (distributed via TestFlight), the putFile method or the subsequent getDownloadURL fails to resolve, whereas it functions as expected during local development.

`import {
getStorage,
ref,
putFile,
getDownloadURL,
} from "@react-native-firebase/storage";
import * as Crypto from "expo-crypto";
import { getCurrentDate } from "./functions";
export const uploadFileFromUriIntoFirebaseAsync = async (uri) => {
const currentUserData = useStore.getState().currentUserData;
const UUID = Crypto.randomUUID();
const date = getCurrentDate();
const userName = currentUserData?.username?.toLowerCase() || "user";
const storageRef = ref(getStorage(), image-${userName}-${date}-${UUID});
await putFile(storageRef, uri);
return await getDownloadURL(storageRef);
};

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