Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default project generated using yo officehas invalid manifest because it uses name instead of GUID as ID #409

Closed
3 tasks done
hn3000 opened this issue Apr 23, 2024 · 7 comments
Assignees
Labels
Area: Excel Feedback related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs

Comments

@hn3000
Copy link

hn3000 commented Apr 23, 2024

Prerequisites

Please answer the following questions before submitting an issue.

  • I am running the latest version of Node and the tools
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected behavior

Following the tutorial, I expected yo office to generate a valid Office Add-in, but npm run start:desktop opened a window without the new add-in loaded (and no visible error messages).

Current behavior

The generated manifest has the project name as it's ID (which npm run validateflags as invalid). I expected to either get a fully valid manifest to be generated or the tutorial to mention the additional step. Part of the original problem was probably OfficeDev/generator-office#820 (although I didn't see an error message).

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Install Office, log in with my Office365 credentials
  2. install node 18 (current LTS), npm, yeoman and generator-office
  3. npx yo office
  4. selecting Excel Custom Functions with either the shared runtime or a JavaScript-only Runtime
  5. select Typescript as language (didn't try JS option)
  6. use the name 'zzz' for the plugin
  7. wait for installation of dependencies
  8. check manifest.xml in the 'zzz'-folder, it has <Id>zzz</Id>

I followed the tutorial at https://learn.microsoft.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator .

Context

  • Operating System: macOS Ventura 13.6.6
  • Node version: 18.20.2
  • Office version: 16.84 (24041420)
  • Tool version: 5.0.0 (installed yesterday, 2024-04-22)

Failure Logs

Please include any relevant log snippets, screenshots or code samples here.

$ npm run validate

> excel-custom-functions@0.0.1 validate
> office-addin-manifest validate manifest.xml

Validation Information: 
Package Type Identified: Package of your add-in was parsed successfully.

Correct Package: Your package matches the submission type.

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: zzz

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.

The manifest source location URLs are valid.: The manifest source location URLs are valid.

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 structure: The manifest support URL has valid structure.

Valid OnlineMeetingCommandSurface ExtensionPoint.: OnlineMeetingCommandSurface ExtensionPoint extracted from manifest is found to be valid.

High Resolution Icon Present: A high resolution icon element was expected and is present.
  - Details: https://localhost:3000/assets/icon-64.png

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

Secure High Resolution Icon URL: The manifest high resolution icon URL uses HTTPS.
  - Details: https://localhost:3000/assets/icon-64.png

Icon Present: A icon element was expected and is present.
  - Details: https://localhost:3000/assets/icon-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://localhost:3000/assets/icon-32.png

All GetStarted strings are present in Resources: All GetStarted strings are present in Resources

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

Error OfficeDev/generator-office#1: 
XML Schema Validation Error: Error found during XML Schema validation.
  - Details: The 'http://schemas.microsoft.com/office/appforoffice/1.1:Id' element is invalid - The value 'zzz' is invalid according to its datatype 'http://schemas.microsoft.com/office/appforoffice/1.1:UUID' - The Pattern constraint failed.
  - Line: 3
  - Column: 4

Error OfficeDev/generator-office#2: 
XML Schema Violation: Your manifest does not adhere to the current set of XML schema definitions for Office Add-in manifests.

Error OfficeDev/generator-office#3: 
Manifest product ID Not Valid: The manifest product ID could not be parsed. The ID must be a plain GUID.
  - Details: zzz

The manifest is not valid.
@davidchesnut davidchesnut added Area: Excel Feedback related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback labels Apr 23, 2024
@davidchesnut
Copy link
Member

Hi @hn3000, thanks for reporting this issue! I'm also seeing this same behavior. @millerds can you please help with this issue? Thanks!

@millerds
Copy link
Contributor

This is a problem with the CF templates not generator-office . . . transfering there.

I think the master branch needs to be pushed to the yo-office branch to get some needed changes (including a library version updated).

@millerds millerds removed their assignment Apr 23, 2024
@millerds millerds transferred this issue from OfficeDev/generator-office Apr 23, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Apr 23, 2024
@Rick-Kirkham
Copy link
Contributor

This is a problem with the CF templates not generator-office . . . transfering there.

I think the master branch needs to be pushed to the yo-office branch to get some needed changes (including a library version updated).

@millerds Is there any reason I shouldn't do this right now?

@Rick-Kirkham Rick-Kirkham self-assigned this Apr 24, 2024
@Rick-Kirkham Rick-Kirkham added Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Apr 24, 2024
@millerds
Copy link
Contributor

When I tried to validate the changes in the master branch a few weeks ago (using the --prerelease flag) the project didn't work. I didn't have time to investigate then and don't recall the error now. There is no reason not to do this now assuming the current set of changes don't have a different problem.

@Rick-Kirkham
Copy link
Contributor

@millerds Updating the yo-office branch did not fix it. This does not reproduce locally. When I run

 node convertToSingleHost.js xml zzz

I get the proper manifest with "zzz" as the DisplayName and a random GUID as the ID.

I ran:

 node convertToSingleHost.js xml undefined zzz

I got exactly the symptoms of this Issue: "zzz' is in ID and "undefined" is in DisplayName.

So, I think something is wrong in the way the generator is reading the user's responses and and/or how it constructs the arguments to pass to the conversion script.

Would be OK with you to move this issue to the generator repo?

@millerds
Copy link
Contributor

I get it now. The problem is that generator-office calls a standard convert script call with the same arguments . . . but when we updated this convert script we took out the "host" argument because it seemed unnecessary. I think the right change is to the convert script to take the host argument and remain uniform with the other template repos instead of doing the one off deal.

Since it was broken with my merge I can take responsibility for fixing it here.

@millerds
Copy link
Contributor

This should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Excel Feedback related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests

4 participants