OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
825 stars 208 forks source link

Root CA silently fails to be installed in the Trusted Root Cert store #685

Closed ANHPearce closed 2 years ago

ANHPearce commented 2 years ago

I am cross referencing this issue here as the other repo had asked. I would also like to post my simple workaround for the time being.

https://github.com/OfficeDev/office-js-docs-pr/issues/2937

Expected behavior

When running the "npm start" script for an Outlook Task Pane office add-in project I expect the "office-addin-dev-certs install" sub command to correctly register the Root CA cert and the Localhost cert.

Current behavior

After npm start finishes the node server is running and accessible but the task pane view is unable to open and provides the following error. This is also corroborated by viewing in the browser and being warned about an invalid cert.

image

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Setup project according to https://docs.microsoft.com/en-us/office/dev/add-ins/tutorials/outlook-tutorial
  2. Run npm start
  3. Attempt to view Add-In in the task pane

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

ANHPearce commented 2 years ago

My simple workaround was simply to navigate to ~.office-addin-dev-certs and manually install the certificates.

Note that you must install the Root CA in the Trusted Root Certificate store. To find that particular store on my machine I had to add it for the host/all users.

millerds commented 2 years ago

Did you find that running the "office-addin-dev-certs install" command reported an error of any kind?

If you have a repro environment (I know that you've unblocked yourself with the workaround) it would great if you could run some commands for us to narrow down the problem.

millerds commented 2 years ago

There have been some fixes to the office-addin-dev-certs package. If the problem still exists please re-open the issue.