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

Security Problem in Firefox #715

Closed martinklein closed 1 year ago

martinklein commented 2 years ago

I tried to follow this instructions. Worked fine until in the final stage I opened "Show Taskpane". There is just a long description that Firefox encountered a possible security problem and did not open the "localhost". Everything in German so I did not copy it here. Please help.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AlexJerabek commented 2 years ago

Hi @martinklein,

Thank you for reporting this. Have you tried this quickstart in other browsers? Does it work for you on Edge or Chrome?

millerds commented 2 years ago

Since the add-in has to run as https from the localhost we are using a self-signed certificate and Firefox security is showing that as untrusted (chrome and edge have been configured to accept this self signed cert). I'm not sure how to configure Firefox so this is avoided.

It looks like in the taskpane view you aren't allowed to interact with the warning page, however if you open 'https://localhost:3000/taskpane.html' in another tab you'll see the same warning and if you click the "Advanced" button and then click "Accept the risk and continue" you'll see the base taskpane page load. Once that happens you can go back to OneNote and re-open the taskpane and it will work.

martinklein commented 2 years ago

Many thanks to all your help. Sorry for my late reply.

Thanks to Alex: I tried it on Chrome and it works there without any problem. On Edge I cannot even login to my OneNote but that is a different story...

Thanks to millerds. I followed your suggestion and opened the 'https://localhost:3000/taskpane.html' in another tab once and that opened the door. Since then I can run the taskpane nicely.

The only problem left for me now is how this could be done easier when I need to do this regularily. Its clear that I have to keep the server running. But do I have to upload the manifest every time again even if the code is unchanged ? Could this be kept in onenote sometime ? But the menu entry for "Show Taskpane" only appears when I have uploaded the manifest. I have to add that I am on a consumer account.

Kind Regards Martin

millerds commented 2 years ago

If the manifest hasn't changed then you shouldn't need to re-add it each time once it's been sideloaded. You would need to close the add-in in OneNote each time the add-in code it changed. I'm not sure how well the server is able to hot reload the add-in code if you leave it open so you may have to restart that when add-in code has changed.