Validation error while submitting app to Firefox Marketplace

谁都会走 提交于 2019-12-24 02:22:52

问题


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:

  1. JSON Parse Error
  2. 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?


回答1:


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.



来源:https://stackoverflow.com/questions/25864490/validation-error-while-submitting-app-to-firefox-marketplace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!