简体   繁体   English

Flutter web 找不到自定义域站点错误

[英]Flutter web custom domain site not found error

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我在自定义域上部署了我的 flutter 应用程序,但是当我尝试访问该域时,我得到了 firebase 站点未找到页面,这是我放入 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.当我 go 到域 firebase 时,页面加载就像正常一样,当我打开 vpn 时,页面在自定义域上加载。 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.如果我在 url 的 / 后面放一些东西,页面也会像正常一样加载,所以我会做“app.domain.com/(任何随机词都有效,所以 home 或 random 等)”,它会将我重定向到主页。 when I enter the url with something behind the /当我在 / 后面输入 url 时

I have tried loading the page on multiple devices and browsers, deleting the cookies and cache of used browsers, used incognito mode.我尝试在多个设备和浏览器上加载页面,删除 cookies 和使用过的浏览器的缓存,使用隐身模式。 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 .我还尝试清理我的项目,再次获取我的包,并使用flutter cleanflutter pub getflutter pub upgrade它们。

Deleted my firebase host file and ran firebase init again.删除我的 firebase 主机文件并再次运行firebase init 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真是太奇怪了,当连接到 vpn 或在 url 后给定一个随机字符串时,找不到该页面。我也联系了谷歌解决我的问题,但他们似乎也找不到它,因为该页面当支持员工和他的团队尝试时正确加载

Can someone help me out?有人可以帮我吗?

my firebase.json file我的 firebase.json 文件

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

Your firestore config should be included within the hosting object because firestore is used in conjunction with hosting, not independently.您的 firestore 配置应包含在托管 object 中,因为 firestore 与托管结合使用,而不是独立使用。 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"
    }
  }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS API 网关自定义域 404 错误:未找到 - AWS API Gateway custom domain 404 error: Not found Flutter:cloud_firestore_web-3.1.1 错误:找不到方法:'FallThroughError' - Flutter: cloud_firestore_web-3.1.1 Error: Method not found: 'FallThroughError' 配置时出错 flutter web firebase。错误:找不到方法:'guardWebExceptions'。 返回 internals.guardWebExceptions( - Error when configure flutter web firebase. Error: Method not found: 'guardWebExceptions'. return internals.guardWebExceptions( 我的 Netlify 站点是否有一个 IP 地址(启用自定义域) - Is there a single IP address for my Netlify site (custom domain enabled) URL 未找到 - 添加自定义域 - GCP App Engine - URL Not Found - Adding a Custom Domain - GCP App Engine 创建自定义域返回错误 409:CNAMEAlreadyExists - Create custom domain returns error 409: CNAMEAlreadyExists 编译时出现“找不到方法:‘guardWebExceptions’” Flutter web 应用程序 - "Method not found: 'guardWebExceptions'" when compiling Flutter web application “错误:找不到成员”与 Flutter Firebase 授权 package - "Error: Member not found" with Flutter Firebase Auth package Flutter Web 和多个部署错误 - Flutter Web and multiple deployment error Troubleshooting Dart XMLHttpRequest error - works for Flutter mobile, not for Flutter web - Troubleshooting Dart XMLHttpRequest error - works for Flutter mobile, not for Flutter web
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM