将应用程序提交到Firefox Marketplace时出现验证错误 [英] Validation error while submitting app to Firefox Marketplace
问题描述
我在此页面上验证了我的清单,并在我的应用的此清单网址上托管GitHub:
https://raw.githubusercontent.com/my_username/my_application/master/manifest.webapp
这是我得到的错误:
清单必须与HTTP标头
Content-Type:application / x-web-app-manifest + json
一起提供。请参阅 https://developer.mozilla.org/docs/Web/Apps/Manifest# Serving_manifests 获取更多信息。
所以我检查了错误中提到的链接,它说:
如果您从GitHub Pages提供清单文件,则GitHub将使用
application / x-web-假设我需要创建一个。
//pages.github.com/rel =nofollow> GitHub页面为我的应用程序,我创建它并通过该链接进行验证。然后我得到2个错误:
- JSON解析错误
- 舱单必须与HTTP标头
Content-Type:application / x-web-app-manifest + json
一起提供。请参阅 https://developer.mozilla.org/docs/Web/Apps/Manifest# {/ li>
我的JSON是有效的,我检查过它JSLint的。另外,我假定当我给出相应的URL时,GitHub页面正在传递所需的标题。仍然失败。
我该如何解决这个问题?
您不是通过GitHub页面提供此清单,而是作为原始内容。 raw.githubusercontent.com上的所有内容均以text / plain的形式提供。使用真正的Github页面来完成这项工作。
I was validating my manifest on this page with this manifest URL of my app hosted on GitHub:
https://raw.githubusercontent.com/my_username/my_application/master/manifest.webapp
This is the error I got:
Manifests must be served with the HTTP header "
Content-Type: application/x-web-app-manifest+json
". See https://developer.mozilla.org/docs/Web/Apps/Manifest#Serving_manifests for more information.
So I checked that link mentioned in the error and it says:
If you serve your manifest file from GitHub Pages, GitHub will serve it with the Content-Type header of
application/x-web-app-manifest+json
.
Assuming that I need to create a GitHub page for my app, I created it and passed on that link to validate. Then I got 2 errors:
- JSON Parse Error
- Manifests must be served with the HTTP header "
Content-Type: application/x-web-app-manifest+json
". See https://developer.mozilla.org/docs/Web/Apps/Manifest#Serving_manifests for more information.
My JSON is valid, I had it checked on jsLint. Also, I am assuming that the GitHub page is passing on the required header when I am giving the respective URL. Still it's failing.
How do I fix this?
You are not serving this manifest over GitHub pages, but as 'Raw' content. All content on raw.githubusercontent.com is served as text/plain.
Use real Github pages to make this work.
这篇关于将应用程序提交到Firefox Marketplace时出现验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!