0

I deployed my flutter app on a custom domain but when I try to acces the domain I get the firebase site not found page this is what I get when I put in my url

when I go to the domain firebase gives you the page loads just like normal and also when I turn on a vpn the page loads on the custom domain. the page also loads like normal if I put something behind the / of the url so I will do "app.domain.com/(any random word works so home or random etc.)" and it will redirect me to the homepage. when I enter the url with something behind the /

I have tried loading the page on multiple devices and browsers, deleting the cookies and cache of used browsers, used incognito mode. but nothing seems to work. I've also tried loading the page on different locations but I still get the Site not found pop up. I have also tried cleaning my project getting my packages again and upgrading them with flutter clean , flutter pub get and flutter pub upgrade.

Deleted my firebase host file and ran firebase init again. It's just so wierd that the page can't be found while it can when connected to a vpn or given a random string after the url. I also contacted google with my problem but they also can't seem to find it out because the page loads correctly when the support employee and his team tried it

Can someone help me out?

my firebase.json file

{
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "hosting": {
    "public": "build/web",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}
jai012
  • 1
  • 1

1 Answers1

0

Your firestore config should be included within the hosting object because firestore is used in conjunction with hosting, not independently. Your configs should be:

{
  "hosting": {
    "public": "build/web",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ],
    "firestore": {
      "rules": "firestore.rules",
      "indexes": "firestore.indexes.json"
    }
  }
}

Jishan Shaikh
  • 1,572
  • 2
  • 13
  • 31