reactjsfacebookinappbrowser

React app does not render in Facebook in app browser In IOS, showing blank white screen


I have got a React app which uses Redux and Firebase. Everything loads ok in every desktop and mobile browser except Facebook's in app browser in IOS. When I open it through my phone their browser fires and gets the title,but shows the blank page.In android and every other browser it working perfectly but in Facebook in-app browser in IOS creates issue.

I have tried to add meta tags, If i render simple html then it is rendered. I have generated the app with create-react-app.

If someone have any suggestions, that would be helpful!


Solution

  • I discovered that Firebase configuration and the service worker have limitations in in-app browsers. To address this, I wrapped the Firebase app initialization in a try-catch block.

    let firebaseApp;
    let messaging;
    try {
      firebaseApp = initializeApp(firebaseConfig);
      messaging = getMessaging(firebaseApp);
    } catch (err) {
      console.error("Failed to initialize Firebase Messaging", err);
    }