OfficeDev / Office-Addin-Taskpane-SSO

Project template for creating an Office taskpane add-in that uses SSO,
Other
15 stars 16 forks source link

Does not work for Outlook "Office Add-in Task Pane project supporting single sign-on" #44

Closed gitcnd closed 3 years ago

gitcnd commented 3 years ago

It says all the right things, but Outlook does not open and no sideloading happens... so basically it just "stops without doing anything" at the end.

Type of issue

Bug

My environment

Expected behavior

Opens Outlook with my demo add-in sideloaded for me

Current behavior

Does not open anything

Steps to reproduce the behavior

yo office

Command line output

Microsoft Windows [Version 10.0.19043.1165]
(c) Microsoft Corporation. All rights reserved.

C:\Users\wm_pu\OneDrive\RN5>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: Office Add-in Task Pane project supporting single sign-on
? Choose a script type: JavaScript
? What do you want to name your add-in? ssotest
? Which Office client application would you like to support? Outlook

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

      Creating ssotest add-in for Outlook using JavaScript and Single-sign-on at C:\Users\wm_pu\OneDrive\RN5\ssotest

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

I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.

> core-js@2.6.12 postinstall C:\Users\wm_pu\OneDrive\RN5\ssotest\node_modules\@babel\polyfill\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> core-js@3.13.1 postinstall C:\Users\wm_pu\OneDrive\RN5\ssotest\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1242 packages from 614 contributors and audited 1255 packages in 71.192s

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

found 4 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
----------------------------------------------------------------------------------------------------------

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

      1. Go the directory where your project was created:

         cd C:\Users\wm_pu\OneDrive\RN5\ssotest

      2. Configure your SSO taskpane add-in:

         npm run configure-sso

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

         npm start

      4. Open the project in VS Code:

         code .

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

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

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

C:\Users\wm_pu\OneDrive\RN5>notepad.exe ssotest\built.txt

C:\Users\wm_pu\OneDrive\RN5>cd ssotest\

C:\Users\wm_pu\OneDrive\RN5\ssotest>npm run configure-sso

> office-addin-taskpane-sso-js@0.0.0 configure-sso C:\Users\wm_pu\OneDrive\RN5\ssotest
> office-addin-sso configure manifest.xml

Opening browser for authentication to Azure. Enter valid Azure credentials
Login was successful!
Registering new application in Azure
Application was successfully registered with Azure
Setting identifierUri
    Attempt 1
Itendifier Set
Setting signin audience
    Attempt 1
Sign In Audience Set
Setting application secret
App secret is **redacted**
Adding application secret for ssotest to Windows Credential Store
Updating source files with application ID and port
Logging out of Azure now
Application with id 3509cbcb-f226-4593-9ad5-6684db4bb976 successfully registered in Azure.  Go to https://ms.portal.azure.com/#home and search for 'App Registrations' to see your application

C:\Users\wm_pu\OneDrive\RN5\ssotest>npm start

> office-addin-taskpane-sso-js@0.0.0 start C:\Users\wm_pu\OneDrive\RN5\ssotest
> npm run build:dev && concurrently "npm run start:server"

> office-addin-taskpane-sso-js@0.0.0 build:dev C:\Users\wm_pu\OneDrive\RN5\ssotest
> webpack --mode development --https false

Hash: 2b9f6f1c23554033f4d6
Version: webpack 4.46.0
Time: 6857ms
Built at: 08/14/2021 8:37:48 PM
                    Asset       Size              Chunks                   Chunk Names
   assets/logo-filled.png     22 KiB                      [emitted]
            commands.html  473 bytes                      [emitted]
              commands.js   5.95 KiB            commands  [emitted]        commands
          commands.js.map   6.27 KiB            commands  [emitted] [dev]  commands
  fallbackauthdialog.html  801 bytes                      [emitted]
    fallbackauthdialog.js    387 KiB  fallbackauthdialog  [emitted]        fallbackauthdialog
fallbackauthdialog.js.map    374 KiB  fallbackauthdialog  [emitted] [dev]  fallbackauthdialog
         manifest.dev.xml    4.4 KiB                      [emitted]
              polyfill.js    648 KiB            polyfill  [emitted]        polyfill
          polyfill.js.map    550 KiB            polyfill  [emitted] [dev]  polyfill
             taskpane.css    1.7 KiB                      [emitted]
            taskpane.html   3.83 KiB                      [emitted]
              taskpane.js    566 KiB            taskpane  [emitted]        taskpane
          taskpane.js.map    689 KiB            taskpane  [emitted] [dev]  taskpane
Entrypoint polyfill = polyfill.js polyfill.js.map
Entrypoint taskpane = taskpane.js taskpane.js.map
Entrypoint commands = commands.js commands.js.map
Entrypoint fallbackauthdialog = fallbackauthdialog.js fallbackauthdialog.js.map
[0] multi core-js/stable regenerator-runtime/runtime 40 bytes {polyfill} [built]
[1] util (ignored) 15 bytes {taskpane} [built]
[2] util (ignored) 15 bytes {taskpane} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {polyfill} {taskpane} {commands} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {taskpane} [built]
[./src/commands/commands.js] 1.03 KiB {commands} [built]
[./src/helpers/documentHelper.js] 3.46 KiB {taskpane} [built]
[./src/helpers/fallbackAuthHelper.js] 3.29 KiB {taskpane} [built]
[./src/helpers/fallbackauthdialog.js] 2.55 KiB {fallbackauthdialog} [built]
[./src/helpers/ssoauthhelper.js] 4.1 KiB {taskpane} [built]
[./src/taskpane/taskpane.js] 435 bytes {taskpane} [built]
    + 469 hidden modules
Child HtmlWebpackCompiler:
                     Asset    Size  Chunks             Chunk Names
    assets/logo-filled.png  22 KiB          [emitted]
     + 3 hidden assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    Entrypoint HtmlWebpackPlugin_2 = __child-HtmlWebpackPlugin_2
    [./assets/logo-filled.png] 68 bytes {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/commands/commands.html] 450 bytes {HtmlWebpackPlugin_1} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/helpers/fallbackauthdialog.html] 779 bytes {HtmlWebpackPlugin_2} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/taskpane/taskpane.html] 3.98 KiB {HtmlWebpackPlugin_0} [built]
[0]
[0] > office-addin-taskpane-sso-js@0.0.0 start:server C:\Users\wm_pu\OneDrive\RN5\ssotest
[0] > office-addin-sso start manifest.xml
[0]
[0] You already have trusted access to https://localhost.
[0] Certificate: C:\Users\wm_pu\.office-addin-dev-certs\localhost.crt
[0] Key: C:\Users\wm_pu\.office-addin-dev-certs\localhost.key
[0] Server running on 3000

#(nothing happens at this point - no windows open etc, and opening oultook manually does not show my addin)
millerds commented 3 years ago

Looks like the coaching text output from yo office needs to be updated for outlook. If you do an regular add-in for outlook (non sso) the instructions point you to https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing to manually sideload the add-in. That should unblock and we'll have to correct the text.

millerds commented 3 years ago

If you have any further issue please re-open.