EAS build Android not able to reach Firestore database error message after 10s

Viewed 116

I hope your application projects are going better than mine ! I am looking for someone who could help me out with implementing EAS build the right way. Because I want to send custom sounds notifications which aren't working with classic expo build environment. (ref doc expo : "Custom notification sounds are only supported when using EAS Build, or in the bare workflow.") I have followed the guidelines to set up EAS build system successfully. However, after installing the app using expo apk file Url, It looks like my app is not able to reach out Firestore database anymore!!! Firebase Auth still working though. I founds several similar issues solved on GitHub and Stackoverflow which recommend using solution bellow. But it isn't working with my app yet.
Please contact me if you have any idea I might try. Thank you!

a)initialize firestore with :

 const db = initializeFirestore(app, experimentalAutoDetectLongPolling: true,});

//or

const app = initializeApp(firebaseConfig);
const firestoreDB = initializeFirestore(app,{experimentalForceLongPolling: true,  useFetchStreams: false,})
export const dbFs = getFirestore(app);
   

eas.json

 {
"cli": {
    "version": ">= 0.55.1"
},
"build": {
    "development": {
        "developmentClient": true,
        "distribution": "internal"
    },
    "emulatorTest": {
        "android": {
            "buildType": "apk"
        },

        "distribution": "internal"
    },
    "production": {}
},
"submit": {
    "production": {}
}

}

app.json

{
"expo": {
    "name": "appName",
    "slug": "slug",
    "version": "0.0.1",
    "orientation": "portrait",
    "icon": "./assets/images/app_logo_square.png",
    "splash": {
        "image": "./assets/images/app_logo.png",
        "resizeMode": "contain",
        "backgroundColor": "#ffffff"
    },
    "updates": {
        "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
        "supportsTablet": true
    },
    "android": {
        "adaptiveIcon": {
            "foregroundImage": "./assets/images/app_logo_square.png",
            "backgroundColor": "#FFFFFF"
        },
        "package": "com.packgage.appname"
    },
    "plugins": [
        [
            "expo-notifications",
            {
                "icon": "./assets/images/app_logo.png",
                "color": "#ffffff",
                "sounds": ["./assets/sounds.wav", "./assets/sounds/sound_2.mp3"]
            }
        ]
    ]
}

}

1 Answers

Hi I have not been able to solve the issue directly. Therefore I have decided to uninstall "firebase" package from my app and replace it with "@react-native-firebase/app", "@react-native-firebase/firestore" and "@react-native-firebase/auth" library. Now Firestore Database looks working correctly. I still need to make custom sounds notifications working though...

Related