I have a Teams bot (.Net Core 3.1 + Bot SDK 4.0) and I call task module from it to render my React app. A React app is a SPA located at the same App Service as a bot. It works fine at the local stand and at the developer's stand, but at the customer's test stand, after calling the task module, a problem arises.
At desktop windows app there is happening nothing at first time, after the second click of the button to open the task module, an error appears at the bottom of the adaptive card:
There is an error in the Developer Tools:
I also tried to open this task module in popup application mode, it returns an error window:
In the Developer Tools, in this case, I have the following errors:
When I try to open my React app from the browser or use it as a tab for my bot, it works fine. What should be the problem with opening it as a task module? Maybe I need to do some extra steps in the Microsoft Teams admin center?
I found a way to solve the problem. I installed the bot through a local upload of the manifest, but then I found out that it was also added to the list of applications for our organization (at Teams admin center), and apparently there was some kind of collision between them. After I uninstalled the application from my desktop Teams and installed it from the application pool - the error disappeared.
Related
I'm trying to make some actions inside a teams bot using the task module. it works fine on my mobile but doesn't work on desktop and web. It displays an error "Unable to reach app. Please try again".
I'm currently learning Teams development and I just installed the Teams Toolkit extension. Following the quickstart guide, launching the app opens my browser with the Teams web app and the message
App not found, Please verify the app and it's[sic] access
permissions.
Fortunately, this app can still be launched when selecting the "Preview in Teams" option in the Developer Portal.
Quoting the GettingStarted.txt:
If you Start Debugging in a browser and Teams shows the message "App not found, Please verify the app and it's access permissions", it means the app hasn't been uploaded to Teams Dev Portal. To resolve this, follow the steps in the Quick start section above. The Project > TeamsFx > Configure for SSO menu command will do this step for you.
Except it was successfully uploaded to Dev Portal.
What I did
Did this "Configure for SSO" thing. No problems with that and the app was successfully added to the Developer Portal.
Where I searched for an answer
VS Marketplace page for Teams Toolkit (Reviews, Q&A)
Github page (issues) for Teams Toolkit
This very site - Stack Overflow.
Obviously, I'm not 100% sure that I haven't missed anything.
Temporary solution
In the meantime, I set the "launchBrowser" property to "false" in launchSettings.json. However, it's a waste of time to constantly go back to the Developer Portal to launch it, especially when the functionality is there.
Visual Studio 2019, Microsoft Development Account.
Thanks in advance.
We tried to repro this issue at our end and it is working fine for us. Could you please make sure app is opened in same tenant with which you configured for SSO. Also please remove all credentials from cache to make sure its not taking another credentials and try again.
Assuming nothing else was changed from the new project template, there are a few things you can try to narrow down the issue.
Open your browsers web dev tools and watch the console after clicking the Add button (before you see the error message). Sometimes a useful error message from the developer portal helps identify the issue.
Verify that when Visual Studio launches the URL, the correct tenant is loaded in Teams.
Run the project in VS, then manually navigate in your browser to the endpoint of your tab that you expect to work. It would be something like https://localhost:44357/tab by default (the value is in the manifest.json). The sample won't work completely because it's not running inside Teams, but you should be able to verify it's working locally.
If none of that helps, please log an issue on the GitHub page and we can investigate a bug.
We recently added a QnA Maker Bot to MS Teams and got it to Deploy on the Azurewebsites.net/api. Unfortunately in MS Teams when you direct message the bot it is not responding at all. We checked the logs and are not getting any errors either. Any Idea where we need to check next?
Thank you,
M
I had exactly this problem, and it was because I was trying to hit the bot directly rather than creating a Teams App first. You will need to install App Studio from the Apps blade on the left if you haven't already.
Open up App Studio and click on Manifest editor tab
Click Create a new app
Fill our all of the required information for App details
Generate/create an App ID. This is NOT the same as your Bot's App ID
Click on Bots tab under Capabilities and add your bot
Install app for testing in specific Teams or Chats
Submit is for if you want to publish to your company's App Store. If you download the package you could import it in Step 2 instead of creating a new app. Or use it as a template to do future apps offline instead of using App Studio for the whole process.
Once I set up the bot in this way, it started responding to me. I tried with another app after doing this for one and confirmed that I would NOT get a response from a bot unless I had set it up with a manifest through App Studio.
I am trying to build a Teams tab using an SPFx web part for a demo.
On my inital app the Sync to teams button in the app catalog was failing with this console error being returned...
https://{TENANT}/sites/AppCatalog/_api/web/tenantappcatalog/SyncSolutionToTeams 400
After running into this problem I started again and this time followed the below tutorial step by step but on my tenant the Sync to Teams button is disabled (This step is near in the end in the Making the web part available in Microsoft Teams section)
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab
I then tried to follow the alternative method of side-loading the app by creating a manifest manually using this tutorial...
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/creating-team-manifest-manually-for-webpart
This resuted in the installation succeeding as far as the setup tab screen (this provides a preview of your tab in a model popup before adding the tab to a channel)
The result was "Sorry, something went wrong" (This was the end result of side-loading both my customised web part another freshly yo sharepoint generated scaffold.
Really stuck on whether there's a tenant issue or maybe some node package or SPFx version issue.
Any thoughts would be greatly appreciated.
I received a same error from console which led me to this article.
In this case, the app was already synced to Teams store. If that's the case, you should find and remove it by opening Teams -> Apps -> Built for [tenantname]. After removing it here, I am able to successfully sync my app once more.
I'm using SPFx 1.8.1 version and added TeamsTab in supportedHosts manifest file. Deployed in tenant app catalog and tried to Sync to Teams. Then I'm getting same issue of SyncSolutionToTeams with 400 error. Please find the attached screenshot from console windwow.
The error occurs if the app is still in the Teams catalog. It doesn't override it and instead throws the error. This is a known bug and we will look to fix it in the future. For now, please try either manually updating the app from Teams (not from the SharePoint app catalog) or to delete the Teams app and then to resync from SharePoint.
In my case this error occurs when I changed title in webpart manifest file (webpart.manifest.json). When I rejected the change, it works. Probably there was some inconsistency in project files.
I'm working on an Outlook addin using the new Office-JS apis, and in building out the authentication flow, I've found that in the Outlook 2016 for Mac case, the dialog system seems to not work properly.
To be clear, we're using the Office Insider Fast Track build as it has much improved support for the Office-JS API.
I've been through several iterations of this particular piece (most of which worked fine both in the Windows client and the web client on Mac and Win), and have had no luck. The scenario is:
List item
Open up the task pane in outlook.
Hit the sign in button
A new window opens, pointed at our authentication portal
User signs in.
On auth completion, the window redirects to a page in the office add-in scope, and calls back to the parent frame with the auth token, where it can be further processed.
Steps 1 through 5 work fine on all platforms. Step 6 refuses to work on Outlook for Mac. Initially, this flow was built using the native js window.open and window.postMessage apis. As mentioned above, this worked everywhere but Outlook Mac, where, the API seemed to ignore the window options and just open the url in a new tab in whatever browser was open and never setting the child window reference (result of window.open being null).
Failing this, I followed the advice found here on SO to use the Office functionality, displayDialogAsync and messageParent. After some initial hurdles, this too was setup and working on every platform save Outlook Mac.
As there is no dev tools or JS console support in Mac Outlook, I followed the advice found here Howto: Outlook 2016 for Mac - Debugging/View Console Logs in Outlook Add-in and setup Vorlon to attempt to get some context, adding numerous logging points to try and get some context. Unfortunately, while Vorlon does pick up my auth landing page as a client, and sees the Office interfaces, none of my console outputs are presented, making it seem as though the JS isn't running at all.
At this point I'm not sure what to try next. Has anyone run into this issue, or gotten this to work on the Outlook 2016 for Mac client?
Clarifying context:
All auth pages are listed in the AppDomains section of the Manifest.
While initial versions pointed directly at our auth service (this worked on not Mac), the current version first opens up an in scope pre-auth page that redirects to the auth service.
The Office-JS api's block alerts, preventing their use in displaying useful information.
Authentication through all versions of this app have worked on both Outlook 2016 on Windows and OWA on both Win and Mac.
Thank you.
This issue in Outlook Mac has been fixed a few months ago. If anyone still encounters this issue with a recent Outlook Mac build, please reply with the build number.
The Office.context.ui is undefined in v16.17 (180909) build of Outlook for Mac 2016 using the following OfficeJS dist:
https://appsforoffice.microsoft.com/lib/1/hosted/office.js