accordproject / cicero-word-add-in

A plugin to allow users to interact with Accord Project templates directly in MS Word.
Apache License 2.0
19 stars 9 forks source link

Manifest.xml is not valid #43

Open Aniruddha-Shriwant opened 3 years ago

Aniruddha-Shriwant commented 3 years ago

Bug Report 🐛

When npm run validate is run, It gives the following message:

PS D:\Github\cicero-word-add-in> npm run validate

> cicero-word-add-in@0.0.1 validate
> office-addin-manifest validate manifest.xml

The manifest is not valid.

Error # 1: 
Localhost Manifest Icon URL: The manifest icon URL should not be localhost.
  - Details: https://localhost:3000/assets/ap-48.png

Additional information: 
Package Type Identified: Package of your add-in was parsed successfully.

Correct Package: Your package matches the submission type.

Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests.

Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports.

Manifest Version Correct Value: The manifest version number is greater or equal to 1.0.

Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix
  - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9

Manifest ID Correct Structure: The structure of the product ID is correct.
  - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9

Desktop Source Location Present: A desktop or default source location URL is found.

Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS.

Supported Office Identified: Supported Office products were successfully determined.

Support URL Present: The manifest support URL is present.
  - Details: https://www.contoso.com/help

Valid Support URL: The manifest support URL is valid.

Icon Present: A icon element was expected and is present.
  - Details: https://localhost:3000/assets/ap-48.png

Supported Icon URL File Extension: The manifest icon URL has a valid image file extension.
  - Details: png

The manifest icon URL uses HTTPS.: Secure Icon URL
  - Details: https://localhost:3000/assets/ap-48.png

Acceptance Test Completed: Acceptance test service has finished checking provided add-in.

PS D:\Github\cicero-word-add-in>

The manifest.xml is not valid because of the error of the Icon URL which is from the localhost

Expected Behavior

After running the npm run validate command, the validation should be passed

Current Behavior

It fails due to LocalHost Icon URL error

Possible Solution

A possible solution might be hosting those logo's on the server and then using a link similar to this: "https://LoremIspum/Images/ap-16.png" for Icon URL

Steps to Reproduce

  1. Run npm run validate

Context (Environment)

Although this is not causing any issues right now, but since we want to publish Add-in in MS-Word's catalog, the manifest.xml should be valid and this issue should be fixed beforehand.

Desktop

algomaster99 commented 3 years ago

The images are pushed to this repository so you can use their respective links only.

Aniruddha-Shriwant commented 3 years ago

The images are pushed to this repository so you can use their respective links only.

As suggested, I had used this link: https://github.com/accordproject/cicero-word-add-in/blob/master/assets/ap-32.png

The response was this :
``` PS D:\Github\cicero-word-add-in> npm run validate > cicero-word-add-in@0.0.1 validate > office-addin-manifest validate manifest.xml The manifest is not valid. Error # 1: Icon URL Unreachable: Unable to retrieve an image from the icon URL. - Details: The IconURL supplied in the app manifest is not reachable, IconURL : https://github.com/accordproject/cicero-word-add-in/blob/master/assets/ap-32.png. Additional information: Package Type Identified: Package of your add-in was parsed successfully. Correct Package: Your package matches the submission type. Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests. Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports. Manifest Version Correct Value: The manifest version number is greater or equal to 1.0. Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Manifest ID Correct Structure: The structure of the product ID is correct. - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Desktop Source Location Present: A desktop or default source location URL is found. Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS. Supported Office Identified: Supported Office products were successfully determined. PS D:\Github\cicero-word-add-in> npm run validate > cicero-word-add-in@0.0.1 validate > office-addin-manifest validate manifest.xml The manifest is not valid. Error # 1: Icon URL Unreachable: Unable to retrieve an image from the icon URL. - Details: The IconURL supplied in the app manifest is not reachable, IconURL : https://github.com/accordproject/cicero-word-add-in/blob/master/assets/ap-32.png. Additional information: Package Type Identified: Package of your add-in was parsed successfully. Correct Package: Your package matches the submission type. Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests. Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports. Manifest Version Correct Value: The manifest version number is greater or equal to 1.0. Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Manifest ID Correct Structure: The structure of the product ID is correct. - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Desktop Source Location Present: A desktop or default source location URL is found. Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS. Supported Office Identified: Supported Office products were successfully determined. Support URL Present: The manifest support URL is present. - Details: https://www.contoso.com/help Valid Support URL: The manifest support URL is valid. Icon Present: A icon element was expected and is present. - Details: https://github.com/accordproject/cicero-word-add-in/blob/master/assets/ap-32.png Supported Icon URL File Extension: The manifest icon URL has a valid image file extension. - Details: png The manifest icon URL uses HTTPS.: Secure Icon URL - Details: https://github.com/accordproject/cicero-word-add-in/blob/master/assets/ap-32.png Acceptance Test Completed: Acceptance test service has finished checking provided add-in. PS D:\Github\cicero-word-add-in> ```

The hosting requirements for manifest URL's are stated here

tl;dr

All image URIs, such as those used for add-in commands, must support caching. The server hosting the image should not return a Cache-Control header specifying no-cache, no-store, or similar options in the HTTP response.

Hence to experiment I used this link : https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Info.png

and then the result was what we are expecting :
``` PS D:\Github\cicero-word-add-in> npm run validate > cicero-word-add-in@0.0.1 validate > office-addin-manifest validate manifest.xml The manifest is valid. Additional information: Package Type Identified: Package of your add-in was parsed successfully. Correct Package: Your package matches the submission type. Valid Manifest Schema: Your manifest does adhere to the current set of XML schema definitions for Add-in manifests. Manifest Version Correct Structure: The manifest version number has the correct structure for the platform that it supports. Manifest Version Correct Value: The manifest version number is greater or equal to 1.0. Manifest ID Valid Prefix: The product ID in the manifest has a valid prefix - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Manifest ID Correct Structure: The structure of the product ID is correct. - Details: 99ea9ad2-971a-46ad-99d1-190379478cb9 Desktop Source Location Present: A desktop or default source location URL is found. Secure Desktop Source Location: The manifest desktop source location URLs use HTTPS. Supported Office Identified: Supported Office products were successfully determined. Support URL Present: The manifest support URL is present. - Details: https://www.contoso.com/help Valid Support URL: The manifest support URL is valid. Icon Present: A icon element was expected and is present. - Details: https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Info.png Supported Icon URL File Extension: The manifest icon URL has a valid image file extension. - Details: png The manifest icon URL uses HTTPS.: Secure Icon URL - Details: https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Info.png Correct Icon Dimensions: The manifest icon dimensions are correct. Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store: - Word on iPad - Word on Mac (Microsoft 365) - Word 2016 or later on Mac - Word 2019 or later on Mac - Word on the web - Word 2013 or later on Windows - Word 2016 or later on Windows - Word 2019 or later on Windows - Word on Windows (Microsoft 365) Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://docs.microsoft.com/office/dev/add-ins/overview/office-add-in-availability). *This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in. PS D:\Github\cicero-word-add-in> ```