“Could not exchange access token for unknown reasons” ; In-meeting App Meeting Extension

Myself and a team member have followed the ‘Try this sample’ and ‘Use the app in Teams’ instructions for the In-Meeting sample application:
https://github.com/OfficeDev/TeamsFx-Samples/tree/v2/in-meeting-app

We’ve both followed the same steps on different computers and on different OS’s (Mac and PC), and we are getting the same issue:

enter image description here

“An error has occurred. This application may no longer respond until reloaded”.

The instructions have us open Powershell and run commands in two locations. (‘Try this sample’ Step 5)

  1. ‘tabs’ folder, asked to run npm install and npm start
  2. ‘bot’ folder, asked to run npm install and npm run start:local

No errors occur when these commands are run initially, but when we open the app up in Teams and click on the button to bring out the side panel, errors show up in both terminals where we ran the commands.

In terminal 1, the tabs folder, we get a ‘proxy error’:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:UsersLukeTeamsAppsin-meeting-apptabs> npm install
up to date, audited 1685 packages in 2s

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

142 vulnerabilities (125 moderate, 16 high, 1 critical)

To address issues that do not require attention, run:
Compiled successfully!

You can now view microsoft-teams-ext in the browser.

  Local:            https://localhost:3000
  On Your Network:  https://192.168.0.3:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

Proxy error: Could not proxy request /getGraphAccessToken?ssoToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdWQiOiI5MzI0MTRiOS04NjM1LTQ3MjYtODlhZS1mYzAzVjOWU2MGMiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vNTk2ZGYzOWEtNzUyNS00OWU4LWE3ODktYzZhMzY2OGQ5ZWZmL3YyLjAiLCJpYXQiOjE2NDU1NTU2NTYsIm5iZiI6MTY0NTU1NTY1NiwiZXhwIjoxNjQ1NTY0NjQyLCJhaW8iJBVFFBeS84VEFBQUExZTF2NkVIUVpFbkEvSEZ0Q3lkSHp4OEJVU3U0QzR2VlExbFNoWldiMjRBV0JMZWtlbmExOC8wbTlBZzFiajhtIiwiYXpwIjoiMWZlYzhlNzgtYmNlNC00YWFmLWFiMWItNTQ1MWNjMzg3MjY0IiwiYXpwYWNyIjoiMCIsIm5hbWUiOiJMdWtlI6cGllayIsIm9pZCI6ImMyNjdkZDUyLWQ4OTItNDZlZC1iNWMyLWVkMGU5OTdlN2ZmOSIsInByZWZlcnJlZF91c2VybmFtZSI6Ikx1a2VAcDIxcS5vbm1pY3Jvc29mdC5jb20iLCJyaCI6IjAuQVU4QW12TnRXU1YxNkVtbmljYWpabzJlXzdrVUpKTTFoaVpIaWE3OEWEo1Z3hQQUVZLiIsInNjcCI6ImFjY2Vzc19hc191c2VyIiwic3ViIjoiNG01LTlvQ2JKT1ZLb3k1TGduMEtpWnpaNk9YNkU5STR4ZVJsUVMxYjZEbyIsInRpZCI6IjU5NmRmMzlhLTc1MjUtNDllOC1hNzg5LWM2YTM2NjhkOWVmZiIsInV0aSI6IlB0bEs4QnJOcmsVRwTE5Nb0U5QVEiLCJ2ZXIiOiIyLjAifQ.je5zMu4knsZ-NwqSKF1M_n71Ehxgs8WZGsPdIwUu0EBT3qdoHHL2ET4RqoTACqtMC8lDFqxFT2EWwYHcXes02QivXYEvWj8j-MQS-VhAs3FTh1e07qer8jq4cOeaVrLpfBjoCpSnbI_lXYUP-hz77YGWbUZrI6k5rXnij6-Jcn1TmvV9OgD_lrliWGIPHrS28TajvFa1Acu64YJGNAGys-r6uU7U5MrpcEszufRVExx8tDEysNWc55_Wr88Ur5mBIzDgDqiUbEf_RP2ZzlulRlPZC2ZVwI54VZqAWM2LfbCpD5bL9OhT7H9qAml5N8fOXY_WNHlYUWROgtD_iinQ from reflectrdomain.eu.rok.io to http://localhost:5000/.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNRESET).

In terminal 2, the bot folder, we get a type error:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:UsersLukeTeamsAppsin-meeting-appbot> npm install

up to date, audited 188 packages in 1s

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

found 0 vulnerabilities
PS C:UsersLukeTeamsAppsin-meeting-appbot> npm run start:local

> [email protected] start:local
> cross-env NODE_ENV=development.local node ./index.js

API server is listening on port 5000
C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesbotbuilderlibbotFrameworkAdapter.js:192
            const connectorClient = this.createConnectorClientInternal(reference.serviceUrl, credentials);
                                                                                 ^

TypeError: Cannot read properties of undefined (reading 'serviceUrl')
    at BotFrameworkAdapter.<anonymous> (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesbotbuilderlibbotFrameworkAdapter.js:192:82)
    at Generator.next (<anonymous>)
    at C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesbotbuilderlibbotFrameworkAdapter.js:15:71
    at new Promise (<anonymous>)
    at __awaiter (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesbotbuilderlibbotFrameworkAdapter.js:11:12)
    at BotFrameworkAdapter.continueConversation (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesbotbuilderlibbotFrameworkAdapter.js:165:16)
    at C:UsersLukeTeamsAppsin-meeting-appbotindex.js:144:13
    at Layer.handle [as handle_request] (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesexpresslibrouterlayer.js:95:5)
    at next (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesexpresslibrouterroute.js:137:13)
    at Route.dispatch (C:UsersLukeTeamsAppsin-meeting-appbotnode_modulesexpresslibrouterroute.js:112:3)

My team member who is on Mac, instead of getting the error I get above, just gets the message “Could not exchange access token for unknown reasons.”, but his client displays the same behaviour.

These errors repeat each time we open and close the side panel.

What can we do to fix the issue, and get it to show as it’s supposed to?

enter image description here

Steps to reproduce:
Follow steps at https://github.com/OfficeDev/TeamsFx-Samples/tree/v2/in-meeting-app

“An error has occurred. This application may no longer respond until reloaded.”