[英]Chrome gives a 401 error for manifest.json
I have a Flutter UI (Web channel) app that is deployed as a bundled Spring-boot app ( build files dropped into the main/resources folder in the Spring-boot project).我有一个 Flutter UI(Web 频道)应用程序,它部署为捆绑的 Spring-boot 应用程序(构建文件放入 Spring-boot 项目的 main/resources 文件夹中)。 The issue I'm facing is that every time I load the app in Chrome and login I see a 401 error pointing to the manifest.json.
我面临的问题是,每次我在 Chrome 中加载应用程序并登录时,我都会看到指向 manifest.json 的 401 错误。 I don't face the same issue when I test my UI locally using Android Studio.
当我使用 Android Studio 在本地测试我的 UI 时,我没有遇到同样的问题。 This setup uses a modified version of the spring-boot app that is running in Docker.
此设置使用在 Docker 中运行的 spring-boot 应用程序的修改版本。
My manifest.json file is :我的 manifest.json 文件是:
{
"name": "ccccc",
"short_name": "ccccc",
"start_url": "/#/",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "basicapp",
"orientation": "landscape-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/cd-16.png",
"sizes": "16x16",
"type": "image/png"
},
{
"src": "icons/cd-32png",
"sizes": "32x32",
"type": "image/png"
},
{
"src": "icons/cd-64.png",
"sizes": "64x64",
"type": "image/png"
},
{
"src": "icons/cd-256.png",
"sizes": "256x256",
"type": "image/png"
}
] }
And the error that I see is :我看到的错误是:
{"timestamp":"2021-09-30T18:34:24.329+00:00","status":401,"error":"Unauthorized","message":"","path":"/manifest.json"}
I thought this problem was similar to this but that fix did not work.我认为这个问题与此类似,但该修复程序不起作用。 I then removed the reference to manifest.json from my index.html i e.
然后我从我的 index.html 中删除了对 manifest.json 的引用,即。
<link rel="manifest" href="manifest.json">
and that got rid of the error but not sure if that is the right thing to do. <link rel="manifest" href="manifest.json">
并消除了错误,但不确定这是否正确。
Not sure what the issue is here, it does not stop me from logging into the app but it's just an annoyance to see that as the first thing in the console log.不确定这里的问题是什么,它并没有阻止我登录应用程序,但看到它作为控制台日志中的第一件事只是一种烦恼。 Any help/assistance to fix this is greatly appreciated.
非常感谢任何解决此问题的帮助/协助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.