question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server runs on Windows not on Mac

See original GitHub 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

The add-in server should run on Windows and Mac.

Current behavior

The add-in server runs on Windows. The add-in server fails on Mac.

Steps to Reproduce

  1. Generate an Outlook dedicated add-in with SSO.
  2. Note: I can’t tell everything I did on the add-in though I’m using preview Outlook API with signatures and a call to a HTTPS server of mine.
  3. Run the server with npm start on Windows 10: should work just fine.
  4. Run the server on the latest Mac OS Big Sur with npm start: should not work, even in sudo.

Context

Mac

  • Operating System: Mac OS Big Sur v11.0.1
  • Node version: 14.15.0 & 14.15.1
  • NPM version: 6.14.8

Windows

  • Operating System: Windows 10 v19042.630
  • Node version: 14.15.1
  • NPM version: 6.14.8

Failure Logs

The terminal on Mac outputs this:

[0] > office-addin-taskpane-sso-js@0.0.0 start:server /Users/tobudim/code/w10test
[0] > office-addin-sso start manifest.xml
[0] 
[0] (node:2227) UnhandledPromiseRejectionWarning: false
[0] (Use `node --trace-warnings ...` to show where the warning was created)
[0] (node:2227) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[0] (node:2227) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[0] npm run start:server exited with code 0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
TCourtneyOwencommented, Nov 30, 2020

@tobudim The PR is at https://github.com/OfficeDev/Office-Addin-Scripts/pull/346. It will also require a corresponding change to to Office-Addin-SSO to add CLIENT_SECRET to the .ENV file

1reaction
TCourtneyOwencommented, Nov 30, 2020

@tobudim The problem is that the other machines don’t have the application secret stored in the Windows Credential Manager (in the case of Windows) or the KeyChain (in the case of Mac). At the time you ran “configure-sso” an application secret is created and added the Credential Manager or KeyChain - this secret is available in the console log after running configure-sso. On your other machines, you would need to create a new entry that matches the name of your add-in project (i.e. the name you specified for your project when creating it via Yo Office) and use the application secret from the console log for this new entry. You can do this in PowerShell with the script:

$ssoAppName = ‘<add-in project name>’ $user = ‘<your user name>’ $secret = ‘<secret>.’ [void][Windows.Security.Credentials.PasswordVault, Windows.Security.Credentials, ContentType = WindowsRuntime] $creds = New-Object Windows.Security.Credentials.PasswordCredential $creds.Resource = $ssoAppName $creds.UserName = $user $creds.Password = $secret $vault = New-Object Windows.Security.Credentials.PasswordVault $vault.Add($creds)

I think we could make this a bit easier for users by adding a new “Secret” param to the .ENV file that would allow users to add the secret to this file and then the office-addin-sso package could read this value if it’s set. This would make it easier to port the project over to other machines, although having a secret hard-coded into the project is not ideal (which is why we didn’t take this approach initially).

I will work on making those changes today and can include you in the PR if you’d like.

Thanks,

Courtney

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you can't connect Mac and Windows computers
If you can't connect Mac and Windows computers, make sure both computers are on the same network and the network connection is working....
Read more >
What are mail server programs that have versions that will run ...
What are mail server programs that have versions that will run on Linux and Windows but not on Mac OS X?
Read more >
How to run Windows Server on a Mac - YouTube
Apple users love their MacBooks, iMacs, and Mac Minis - they are great computers that run a very powerful Operating System.
Read more >
Run Windows or Windows programs on your Mac - IU KB
To dual-boot between macOS and Windows, use Apple's Boot Camp . · To run Windows in a virtual machine within macOS, use Parallels...
Read more >
How to install Windows 10 on Mac - Microsoft Support
You can enjoy Windows 10 on your Apple Mac with the help of Boot Camp Assistant. Once installed, it allows you to easily...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found