"Could not exchange access token for unknown reasons" ; In-meeting App Meeting Extension - javascript

Myself and a team member have followed the 'Try this sample' and 'Use the app in Teams' instructions for the In-Meeting sample application to develop an app for Microsoft Teams:
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:
"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)
'tabs' folder, asked to run npm install and npm start
'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:\Users\Luke\TeamsApps\in-meeting-app\tabs> 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:\Users\Luke\TeamsApps\in-meeting-app\bot> 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:\Users\Luke\TeamsApps\in-meeting-app\bot> npm run start:local
> api-server#0.0.1 start:local
> cross-env NODE_ENV=development.local node ./index.js
API server is listening on port 5000
C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\botbuilder\lib\botFrameworkAdapter.js:192
const connectorClient = this.createConnectorClientInternal(reference.serviceUrl, credentials);
^
TypeError: Cannot read properties of undefined (reading 'serviceUrl')
at BotFrameworkAdapter.<anonymous> (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\botbuilder\lib\botFrameworkAdapter.js:192:82)
at Generator.next (<anonymous>)
at C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\botbuilder\lib\botFrameworkAdapter.js:15:71
at new Promise (<anonymous>)
at __awaiter (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\botbuilder\lib\botFrameworkAdapter.js:11:12)
at BotFrameworkAdapter.continueConversation (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\botbuilder\lib\botFrameworkAdapter.js:165:16)
at C:\Users\Luke\TeamsApps\in-meeting-app\bot\index.js:144:13
at Layer.handle [as handle_request] (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\Luke\TeamsApps\in-meeting-app\bot\node_modules\express\lib\router\route.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?
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."

Thanks for using this sample and post the issue.
For the first error occurred in tab folder, from the log
reflectrdomain.eu.rok.io to http://localhost:5000/
I found that you may not using the ngrok, so caused the proxy error, my suggestion is try ngrok first and check if it is worked.
The solution for the second issue in bot folder, is removed the app in the meeting and re-add the app into the meeting.

Related

Exception in thread "main" javax.net.ssl.SSLException: Tag mismatch [React-native]

Version
react native:0.68.2
react native cli: 2.0.1
node:v18.13.0
jdk:jdk-8.0.342.07-hotspot
when I run this cmd to run my project in react native it's give me error
npx react-native run-android or react-native run-android
it's give me this type error
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:6120) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 936 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
Downloading https://services.gradle.org/distributions/gradle-7.3.3-all.zip
Exception in thread "main" javax.net.ssl.SSLException: Tag mismatch!
at sun.security.ssl.Alert.createSSLException(Alert.java:133)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:324)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:262)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:119)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1400)
at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1368)
at sun.security.ssl.SSLSocketImpl.access$300(SSLSocketImpl.java:73)
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:962)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3456)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3449)
at org.gradle.wrapper.Download.downloadInternal(Download.java:106)
at org.gradle.wrapper.Download.download(Download.java:80)
at org.gradle.wrapper.Install$1.call(Install.java:68)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: javax.crypto.AEADBadTagException: Tag mismatch!
at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:620)
at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116)
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:941)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:491)
at javax.crypto.CipherSpi.bufferCrypt(CipherSpi.java:779)
at javax.crypto.CipherSpi.engineDoFinal(CipherSpi.java:730)
at javax.crypto.Cipher.doFinal(Cipher.java:2463)
at sun.security.ssl.SSLCipher$T12GcmReadCipherGenerator$GcmReadCipher.decrypt(SSLCipher.java:1606)
at sun.security.ssl.SSLSocketInputRecord.decodeInputRecord(SSLSocketInputRecord.java:262)
at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:190)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:109)
... 18 more
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Exception in thread "main" javax.net.ssl.SSLException: Tag mismatch!
at sun.security.ssl.Alert.createSSLException(Alert.java:133)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:324)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:267)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:262)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:119)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1400)
at sun.security.ssl.SSLSocketImpl.readApplicationRecord(SSLSocketImpl.java:1368)
at sun.security.ssl.SSLSocketImpl.access$300(SSLSocketImpl.java:73)
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(SSLSocketImpl.java:962)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at sun.net.www.MeteredStream.read(MeteredStream.java:134)
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3456)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3449)
at org.gradle.wrapper.Download.downloadInternal(Download.java:106)
at org.gradle.wrapper.Download.download(Download.java:80)
at org.gradle.wrapper.Install$1.call(Install.java:68)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: javax.crypto.AEADBadTagException: Tag mismatch!
at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:620)
at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116)
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:941)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:491)
at javax.crypto.CipherSpi.bufferCrypt(CipherSpi.java:779)
at javax.crypto.CipherSpi.engineDoFinal(CipherSpi.java:730)
at javax.crypto.Cipher.doFinal(Cipher.java:2463)
at sun.security.ssl.SSLCipher$T12GcmReadCipherGenerator$GcmReadCipher.decrypt(SSLCipher.java:1606)
at sun.security.ssl.SSLSocketInputRecord.decodeInputRecord(SSLSocketInputRecord.java:262)
at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:190)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:109)
... 18 more
at makeError (C:\Users\dp312\OneDrive\Desktop\Project\LoanApp\node_modules\execa\index.js:174:9)
at C:\Users\dp312\OneDrive\Desktop\Project\LoanApp\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\dp312\OneDrive\Desktop\Project\LoanApp\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\dp312\OneDrive\Desktop\Project\LoanApp\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
android\gradle\wrapper\gradle-wrapper.properties
in this file I can change like this but it also not work
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-7.3.3-all.zip <---here https to http
or
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
I know where is problem
first one I install Android studio it's give me same error when I install Android studio and SDK then
I find a video which one do react native project without Android studio so I can follow the video and try to run my project but still my project give me error
I don't know why this error is come
my network connectivity is stable no issue in a network connectivity then why this error is come and my project is new in my project no have any dependency and any code simple code of hello word in my project
but still it's give me a error
any one can give me solution??

Error when I run "yarn kbn bootstrap"(kibana install)

Everybody.
I faced trouble when I try to install kibana bootstrap on my win10 os.
I followed this tutorial.
"https://www.elastic.co/guide/en/kibana/master/development-getting-started.html"
When I run "yarn kbn bootstrap", I saw this error.
info [bazel] warning Resolution field "trim#1.0.1" is incompatible with requested version
"trim#0.0.1"
info [bazel] success Already up-to-date.
info [bazel] INFO: Analyzed target //packages:build (1880 packages loaded, 8122 targets
configured).
info [bazel] INFO: Found 1 target...
info [bazel] ERROR: F:/work/2021_8/bidrectional/development/kibana-master/packages/kbn-dev-
utils/BUILD.bazel:106:11: Action packages/kbn-dev-
utils/_validate_tsc_types_options.optionsvalid.d.ts failed: (Exit -1):
ts_project_options_validator.bat failed: error executing command bazel-
out/host/bin/external/npm/#bazel/typescript/bin/ts_project_options_validator.bat
packages/kbn-dev-utils/tsconfig.json ... (remaining 4 argument(s) skipped)
info [bazel] Windows Subsystem for Linux has no installed distributions.
info [bazel] Distributions can be installed by visiting the Microsoft Store:
info [bazel] https://aka.ms/wslstore
info [bazel] Target //packages:build failed to build
info [bazel] Use --verbose_failures to see the command lines of failed build steps.
info [bazel]
info [bazel] ERROR: F:/work/2021_8/bidrectional/development/kibana-master/packages/kbn-
analytics/BUILD.bazel:89:8 Assembling npm package packages/kbn-analytics/npm_module failed:
(Exit -1): ts_project_options_validator.bat failed: error executing command bazel-
out/host/bin/external/npm/#bazel/typescript/bin/ts_project_options_validator.bat
packages/kbn-
analytics/tsconfig.json ... (remaining 4 argument(s) skipped)
info [bazel] INFO: Elapsed time: 218.882s, Critical Path: 62.52s
info [bazel] INFO: 217 processes: 65 remote cache hit, 147 internal, 5 local.
info [bazel]
info [bazel]
ERROR [bootstrap] failed:
ERROR The bazel command that was running failed to complete.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Any suggestions are welcome.
From your system out, it seems you are using windows CMD window for installation.
The official document said in Windows you should run in Git Bash or WSL, and Git Bash is recommended.

React-Native cannot run project if I am not Sudo

I am unable to run react-native project with the code react-native run-android. I am getting the following error
info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
But it runs if I run it as root `sudo react-native run-andoid'.
How can I make the project run without being root??
I found out from reading the post by Medium that u have to give permission to every folder explicitly when u encounter a permission issue when installing react native and realated tools, so that u can run the app without being sudo. Otherwise the files installed by sudo can only be run as sudo.
Use the below command to give access to the current user for that specific folder
sudo chown -R $(whoami) ~/Documents/Myapplicationfolder

Problem with new version of react-native: FAILURE: Build failed with an exception

the new version of react-native (v 0.59) give me an error when trying to run that on a device or simulator:
C:\Pro\react-native jan\tictactoe>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Downloading https://services.gradle.org/distributions/gradle-4.10.2-all.zip
...............................................................................................................
Unzipping C:\Users\MAN.gradle\wrapper\dists\gradle-4.10.2-all\9fahxiiecdb76a5g3aw9oi8rv\gradle-4.10.2-all.zip to C:\Users\MAN.gradle\wrapper\dists\gradle-4.10.2-all\9fahxiiecdb76a5g3aw9oi8rv
Welcome to Gradle 4.10.2!
Here are the highlights of this release:
- Incremental Java compilation by default
- Periodic Gradle caches cleanup
- Gradle Kotlin DSL 1.0-RC6
- Nested included builds
- SNAPSHOT plugin versions in the plugins {} block
For more details see https://docs.gradle.org/4.10.2/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'tictactoe'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:3.3.1.
Required by:
project :
Could not resolve com.android.tools.build:gradle:3.3.1.
Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
Connect to 127.0.0.1:50002 [/127.0.0.1] failed: Connection refused: connect
Could not resolve com.android.tools.build:gradle:3.3.1.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.1/gradle-3.3.1.pom'.
Connect to 127.0.0.1:50002 [/127.0.0.1] failed: Connection refused: connect
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 4m 55s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug
what i have to do?

Error in protobuf | npm ERR! code ELIFECYCLE :: while setting Sawtooth JavaScript Transaction Processor in Ubuntu 16.04

Currently working on sawtooth example
Things I have done :
Installed latest Node(8.11.3)& npm version.
Started javascript
essential thing using docker-compose up.
Things giving error:
Want to setup Javascript transaction processor so moved to dir jsprocessor.
Trying to install all node modules using $ npm i, but giving error shown in image. I think it is relate to node js.
Reinstalled Node & NPM, Externally installed npm module that producing error but no effect.
What am I doing wrong?
I would follow the directions at
https://github.com/askmish/sawtooth-simplewallet
Which seems different from what you ran.
Build and start the Docker containers:
docker-compose -f simplewallet-build-client-js.yaml up
Open bash shell in simplewallet-client-js container:
docker exec -it simplewallet-client-js bash
Create user accounts for jack and jill:
sawtooth keygen jack && sawtooth keygen jill
Open two new browser tabs and go to http://localhost:3000 on each tab.
Login in one tab as jack and in other as jill Start with an initial deposit for each user - jack and jill via the Deposit tab in the UI homepage

Categories