generator-office icon indicating copy to clipboard operation
generator-office copied to clipboard

unified add-in generated by yo office not side-loaded successfully

Open julius-gummersbach opened this issue 8 months ago • 6 comments

Type of issue

Code doesn't work

Feedback

Summary

I followed the linked article to create a PowerPoint Add-In with the unified manifest for m365. However, after running npm start in the generated project, the Add-In does not appear in PowerPoint.

Steps to reproduce

In a terminal:

  1. run yo office
  2. select Excel, PowerPoint, amd/or Word Task Pane with unified manifest for Microsoft 365 (preview) as project type
  3. name the add-in
  4. select PowerPoint as the client-application
  5. cd into the just created directory
  6. run npm start

PowerPoint opens, however, the Add-In is not installed:

Image

I would expect the Add-In to show in the Add-Ins flyout, as it happens when you create a Office Add-in Task Pane project

How can I sideload a unified add-in created with yo office generator?

System Info:

Apple M4, macOS Sequoia 15.4.1 Microsoft PowerPoint 16.97, preview channel Office installed with microsoft installer, not App-Store yo version 5.1.0 npm version 10.9.2

Log of my add-in generation

julius@Mac ~ % yo office

     _-----_     ╭──────────────────────────╮
    |       |    │   Welcome to the Office  │
    |--(o)--|    │   Add-in generator, by   │
   `---------´   │ @OfficeDev! Let's create │
    ( _´U`_ )    │    a project together!   │
    /___A___\   /╰──────────────────────────╯
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

? Choose a project type: Excel, PowerPoint, amd/or Word Task Pane with unified manifest for Microsoft 365 (preview)
? What do you want to name your add-in? foo-add-in
? Which Office client application would you like to support? Powerpoint

----------------------------------------------------------------------------------

      Creating foo-add-in add-in for Powerpoint
      using TypeScript and Excel, PowerPoint, amd/or Word Task Pane with unified manifest for Microsoft 365 (preview) and Unified manifest for Microsoft 365
      at /Users/julius/foo-add-in

----------------------------------------------------------------------------------
(node:54148) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
   create foo-add-in/package.json

> [email protected] convert-to-single-host
> node convertToSingleHost.js powerpoint json foo-add-in

Manifest: manifest.json
  Id: a5ea582b-6898-44bd-bddd-8ac0da78620d
  Name: foo-add-in
  Provider: Contoso
  Type: TaskPaneApp
  Version: 1.0.0
  AppDomains: contoso.com
  Default Locale: en-us
  Description: A template to get started.
  High Resolution Icon Url: assets/color.png
  Hosts: presentation
  Icon Url: assets/color.png
  Permissions: Document.ReadWrite.User
  Support Url: https://www.contoso.com


Changes to package.json were detected.
Error detecting the package manager. Falling back to npm.

Running npm install for you to install the required dependencies.
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 1003 packages, and audited 1004 packages in 32s

245 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
----------------------------------------------------------------------------------------------------------

      Congratulations! Your add-in has been created! Your next steps:

      1. Go the directory where your project was created:

         cd /Users/julius/foo-add-in

      2. Start the local web server and sideload the add-in:

         npm start

      3. Open the project in VS Code:

         code .

         For more information, visit http://code.visualstudio.com.

      Please visit https://learn.microsoft.com/office/dev/add-ins for more information about Office Add-ins.

----------------------------------------------------------------------------------------------------------

julius@Mac ~ % cd /Users/julius/foo-add-in
julius@Mac foo-add-in % npm start

> [email protected] start
> office-addin-debugging start manifest.json

Debugging is being started...
App type: desktop
The dev server is already running on port 3000.
Sideloading the Office Add-in...
Manifest package saved to /var/folders/gv/svhttsy13sx8rb39ydf2t46h0000gn/T/manifest.zip
running: npx @microsoft/teamsapp-cli install --file-path "/var/folders/gv/svhttsy13sx8rb39ydf2t46h0000gn/T/manifest.zip"

Using account [email protected]
TitleId: U_454232e2-0052-08d3-2ac9-c9eb6efc6b86
AppId: 2dbe1b3d-d52f-4f12-9247-93847dac3272

Successfully registered package! (U_454232e2-0052-08d3-2ac9-c9eb6efc6b86)
 STDERR: (node:55283) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)


Launching powerpoint via /var/folders/gv/svhttsy13sx8rb39ydf2t46h0000gn/T/PowerPoint add-in a5ea582b-6898-44bd-bddd-8ac0da78620d.pptx
Debugging started.
julius@Mac foo-add-in %

Page URL

https://learn.microsoft.com/en-us/office/dev/add-ins/develop/yeoman-generator-overview#word-powerpoint-or-excel-with-unified-manifest-option

Content source URL

https://github.com/OfficeDev/office-js-docs-pr/blob/main/docs/develop/yeoman-generator-overview.md

Author

@o365devx

Document Id

15f43fe5-03e0-579c-165c-57e16b1a53ea

Platform Id

e84f211c-a2fe-8042-c805-bbed28ea481b

julius-gummersbach avatar May 05 '25 10:05 julius-gummersbach

Hi @julius-gummersbach,

I'm sorry to hear you're having issues. I tried to reproduce this issue, but npm start successfully sideloaded the add-in. I noticed I didn't have the same Array deprecation warning you did. I have the same yo version as you (5.0.1), but I wonder if you have an old template from generator-office. Here's my output:

$ npm start

> [email protected] start
> office-addin-debugging start manifest.json

Debugging is being started...
App type: desktop
Enabled debugging for add-in 21fc50d8-16d0-476e-83fa-1601ce08fe8c.
Starting the dev server... (webpack serve --mode development)
The dev server is running on port 3000. Process id: 22468
Sideloading the Office Add-in...
Manifest package saved to C:\Users\aljerabe\AppData\Local\Temp\manifest.zip
running: npx @microsoft/teamsapp-cli install --file-path "C:\Users\aljerabe\AppData\Local\Temp\manifest.zip"

Using account [email protected]
TitleId: U_3c70c047-744f-c054-96f2-d31ee98531dd
AppId: 344ea6c3-cbb3-40a9-9636-d5a04fcc0a96

Successfully registered package! (U_3c70c047-744f-c054-96f2-d31ee98531dd)
 STDERR:

Launching powerpoint via C:\Users\aljerabe\AppData\Local\Temp\PowerPoint add-in 21fc50d8-16d0-476e-83fa-1601ce08fe8c.pptx
Debugging started.

I'm going to transfer this to the generator-office GitHub repo, since I believe this to be a tooling issue.

AlexJerabek avatar May 05 '25 16:05 AlexJerabek

@millerds, could you please take a look and reassign as needed?

AlexJerabek avatar May 05 '25 16:05 AlexJerabek

This is probably a host support issue. I know the preview work for unified manifest support in WXP is being done for Win32, but I don't know if it's being done for Mac.

@Rick-Kirkham have you heard of Mac support for unified manifests?

millerds avatar May 05 '25 17:05 millerds

@millerds This note appears in a few places in the docs:

Image

So, at least when the add-in is being installed from AppSource or the Admin center, it should be installable in principle on a Mac (wiht a manifest that's been translated into XML). But I don't know if that applies when a unified manifest package is being sideloaded. Is the TAOS service that does the translation being called when the package is sideloaded?

Rick-Kirkham avatar May 05 '25 19:05 Rick-Kirkham

I think it works . . . but there might be a delay between json deployment and converting it to xml for compatibility.

@julius-gummersbach have you tried sideloading it and then coming back later to see if it shows up?

millerds avatar May 06 '25 16:05 millerds

Hello @millerds sorry for the late response, seems like my e-mail notifications are not set up properly.

I am not sure what you mean by "sideloading it and then coming back later", but I have quit and reopened PowerPoint and it still didn't show up, if that is what you mean. Maybe someone on your team that is on a Mac can try to reproduce the issue?

julius-gummersbach avatar Jun 05 '25 19:06 julius-gummersbach