How to automatically load pyRevit third-party extensions for all existing and new login users - pyrevit

I have worked out how to do it, but is this 'supported', Eshan or pyRevit community?
How to load extension for all existing and new-logins for pyRevit users:
If I:
Get the extensions from the user profile pyRevit 'extensions' folder and copy them to the Program Files pyRevit-Master folder, and then
Add the users extensions.json values to the pyRevit-Master extensions.json, and then
set the "builtin" to "False" and the "default_enabled" to "True", like below?
{
"builtin": "False",
"default_enabled": "True",
"type": "extension",
"rocket_mode_compatible": "False",
"name": "PyRevitPlus",
"description": "Extensions for PyRevit",
"author": "Gui Talarico",
"author_profile": "https://github.com/gtalarico",
"url": "https://github.com/gtalarico/pyrevitplus.git",
"website": "https://github.com/gtalarico/pyrevitplus",
"image": "",
"dependencies": []
},
Cheers!

Related

Microsoft Teams Connector unable to save configuration

I'm trying to build a Microsoft Teams connector that I have sideloaded into my team while developing. I've set up a testing config page on S3 and have pointed my app manifest to it. When I click the save button, it stays stuck on the "Setting up your connector" spinner for a while, before saying "Unable to save connector configuration. Please try again."
The Javascript of the config page should be visible through the S3 link above; my app manifest is below. After looking at a few similar questions, you'll note that the contentUrl is included by wildcard in validDomains.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"id": "0b73c39a-db1d-43eb-81bd-3813bef33713",
"packageName": "<redacted>",
"developer": {
"name": "Developer",
"websiteUrl": "<redacted>",
"privacyUrl": "<redacted>",
"termsOfUseUrl": "<redacted>"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "Test",
"full": "Test"
},
"description": {
"short": "Test notifications",
"full": "Test notifications"
},
"accentColor": "#FFFFFF",
"connectors": [
{
"connectorId": "0b73c39a-db1d-43eb-81bd-3813bef33713",
"configurationUrl": "https://wsk-teams-test.s3.amazonaws.com/teams_configure.html",
"scopes": [
"team"
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"wsk-teams-test.s3.amazonaws.com",
"<redacted>"
]
}
I'm not able to get any more detailed information when attempting this via the desktop Teams app, but in the browser I see this error in the console:
2020-09-02T23:05:20.879Z Received error from connectors {"seq":1599086774636,"timestamp":1599087920857,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"<redacted>","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false,"DisableConnectToO365InlineDeleteFeedbackPage":true},"status":500,"clientType":"SkypeSpaces","connectorType":"0b73c39a-db1d-43eb-81bd-3813bef33713","name":"handleMessageError"}
Thanks for any guidance you might have. If I can get in touch with someone from Microsoft privately, I'd be happy to provide the <redacted> information.
This issue is fixed by adding the content url in valid domains list in the Connector Developer Dashboard.
As recommended above: This issue is fixed by adding the content url in a valid domains list in the Connector Developer Dashboard.
This helped me understand the direction of the problem.
But my accidental mistake was due to the lack of the prefix https://
Be sure to add https:// prefix to your domain

Microsoft Teams: Messaging Extension with Search-based commands

I'm testing Teams Messaging Extension for Search-based commands. After creating solution with "YO TEAMS" and creating BOT in Azure with BotId / AppId and password / Secret. And put these as values in .env file in solution.
By running the command "gulp ngrok-serve" I get ngrok url generated and things look like it should be fine. But by uploading a .zip file from the package folder in Teams, I get the error message "Unable to reach app, Please try again".
Just to test, I have created another solution with only "Tab". And I get almost the same error message when I try to upload .zip,
"There was a problem reaching this app"
There are many frustrating tutorials some old and some new. By running the command "gulp ngrok-serve" you start ngrok for tunnel. And ngrok URL that is generated seems to work:
And the URL is stored as an endpoint for BOT in Azure:
So what have I missed here since it does not work?
Here is my manifest file:
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.6/MicrosoftTeams.schema.json",
"manifestVersion": "1.6",
"id": "{{APPLICATION_ID}}",
"version": "{{VERSION}}",
"packageName": "{{PACKAGE_NAME}}",
"developer": {
"name": "gonadn consulting",
"websiteUrl": "https://{{HOSTNAME}}",
"privacyUrl": "https://{{HOSTNAME}}/privacy.html",
"termsOfUseUrl": "https://{{HOSTNAME}}/tou.html"
},
"name": {
"short": "TeamsMsgExtSearch",
"full": "TeamsMsgExtSearch"
},
"description": {
"short": "TODO: add short description here",
"full": "TODO: add full description here"
},
"icons": {
"outline": "icon-outline.png",
"color": "icon-color.png"
},
"accentColor": "#D85028",
"configurableTabs": [],
"staticTabs": [],
"bots": [],
"connectors": [],
"composeExtensions": [
{
"botId": "{{MICROSOFT_APP_ID}}",
"canUpdateConfiguration": false,
"commands": [
{
"id": "msgSearchCommandMessageExtension",
"title": "MsgSearchCommand",
"description": "Add a clever description here",
"initialRun": true,
"parameters": [
{
"name": "parameter",
"description": "Description of the parameter",
"title": "Parameter"
}
],
"type": "query"
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"{{HOSTNAME}}"
],
"showLoadingIndicator": false
}
Link to Git Repo

Failed to load the package The add-in package provided was not understood. Verify that the submitted file is a valid Office add-in package

I am trying to publish a MS Teams Chat bot on App Source but have came across the following error
Here is how my manifest.json file looks like
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.1",
"id": "0007-0007-4a9f-8163-0007",
"packageName": "MyBOT.Manifest",
"developer": {
"name": "MyCompany",
"websiteUrl": "https://MyBOT.azurewebsites.net",
"privacyUrl": "https://MyBOT.azurewebsites.net/Privacy",
"termsOfUseUrl": "https://MyBOT.azurewebsites.net/Termsofuse",
"mpnId": "0007"
},
"localizationInfo": {
"defaultLanguageTag": "en-us"
},
"icons": {
"color": "icon-color.png",
"outline": "icon-outline.png"
},
"name": {
"short": "MyBOT",
"full": "MyBOT Virtual Assistant"
},
"description": {
"short": "MyBOT",
"full": "I am a Virtual Assistant, continuously in training to enhance my skills. Currently, I can help you by answering inquiries related to COVID-19, Zoom, Webex, Microsoft Office, Adobe, Microsoft Azure and Xbox. For questions that are not currently in my search database, I leverage the web to fetch you those information."
},
"accentColor": "#F9F9FA",
"bots": [
{
"botId": "0007-0007-4a9f-8163-0007",
"needsChannelSelector": false,
"isNotificationOnly": false,
"scopes": [ "team", "personal", "groupchat" ],
"supportsFiles": false,
"isNotificationOnly": false,
"commandLists": [
{
"scopes": [ "team", "groupchat" ],
"commands": [
{
"title": "help",
"description": "Provides you the list of commands that you can enter"
},
{
"title": "cancel",
"description": "Cancels the current operation"
}
]
},
{
"scopes": [ "personal", "groupchat" ],
"commands": [
{
"title": "main menu",
"description": "This command takes you to the main menu"
},
{
"title": "help",
"description": "Provides you the list of commands that you can enter"
}
]
}
]
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"token.botframework.com"
]
}
The validator gives the following error as well
I have looked into Stackoverflow for this message as well as searched online but I am not able to get an exact article on how to fix this issue. I read about how the app has to work for all types of devices but the manifest.json file doesnt show how that is to be done. Can someone forward me a template that I can build my manifest.json file on? Or am I doing something wrong altogether?
Thank you.
This file resolved the issue. We used AppStudio to get this file.
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
"manifestVersion": "1.7",
"version": "1.0.0",
"showLoadingIndicator": true,
"isFullscreen": true,
"id": "80007-8049-0007-8163-e89f9a80007",
"packageName": "com.myCompany.myBOT",
"developer": {
"name": "myCompany Services",
"websiteUrl": "https://myBOT.azurewebsites.net",
"privacyUrl": "https://myBOT.azurewebsites.net/Privacy",
"termsOfUseUrl": "https://myBOT.azurewebsites.net/Termsofuse",
"mpnId": "00000"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "myBOT",
"full": "myBOT Virtual Assistant"
},
"description": {
"short": "myBOT",
"full": "I am a Virtual Assistant, continuously in training to enhance my skills. Currently, I can help you by answering inquiries related to COVID-19, Zoom, Webex, Microsoft Office, Adobe, Microsoft Azure and Xbox. For questions that are not currently in my search database, I leverage the web to fetch you those information."
},
"accentColor": "#F9F9FA",
"bots": [
{
"botId": "80007-8049-0007-8163-e89f9a890007",
"scopes": [
"team",
"personal",
"groupchat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [] }
Can someone forward me a template that I can build my manifest.json
file on?
You can maybe start with this one (specifically for search extension), but you'll obviously want to change/trim/add it to do what you are actually wanting to do.
https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/csharp_dotnetcore/50.teams-messaging-extensions-search/TeamsAppManifest/manifest.json
More samples have other examples of manifest files.
Additionally, you may want to try and create a manifest from App Studio (MS Teams app that allows you to create them).
"IsNotificationOnly"property is added twice in the manifest. Can you please try deleting it and check again.
Assuming that you already have two files "icon-color.png" and "icon-outline.png" along with the manifest.json in the app package zip file. Can you please verify if all three files are added to a zip files and no folder is created inside the zip package.

Chat bot Hands-Off published on azure - gives connection error emulator :Cannot post activity. Unauthorized

I have been trying to host bot which works on local to the Azure Hosting.
I'm trying to connect hosted bot with local emulator gives connection error (emulator :Cannot post activity. Unauthorized).
My .bot file:
{
"name": "production",
"description": "",
"services": [
{
"type": "endpoint",
"appId": "********************",
"appPassword": "*************",
"endpoint": "intermediatorbotsample2019.azurewebsites.net/api/messages",
"name": "AzureAccountLive",
"id": "178"
}
],
"padlock": "",
"version": "2.0",
"path": "D:\\Architecture\IntermediatorBot\\production.bot",
"overrides": null
}
I took a look at your bot file in your comment. The problem is that you have "name": "AzureAccountLive" in your services section. This name MUST be "production". The outer level "name" has to match the name of the bot (in this case, it's probably intermediatorbotsample2019). It's the Name:Production, Type:Endpoint combination that ABS looks for. If you update your botfile to match what I have below, your bot should work as expected.
{
"name": "YOURBOTNAMEHERE",
"description": "",
"services": [
{
"type": "endpoint",
"appId": "********************",
"appPassword": "*************",
"endpoint": "http://intermediatorbotsample2019.azurewebsites.net/api/messages",
"name": "production",
"id": "178"
}
],
"padlock": "",
"version": "2.0",
"path": "D:\\Architecture\IntermediatorBot\\production.bot",
"overrides": null
}
Re genreted AppId and secret from https://dev.botframework.com/.
Previously was using AzureBotProject replaced it with AzureBotChannelProject instead.

Breakpoints and debugging statements open "read-only inlined content"

Context:
I am working on a React.js app that uses Webpack, and I'm using VS Code as my editor.
The Webpack config is specifying inline-source-map as its devtool option. but I am using hot reloading, too. So, source maps actually come into the browser via this webpack:// protocol.
I am using the following launch.json config:
{
"name": "Launch in Chrome",
"type": "chrome",
"request": "launch",
"url" : "https://myapp.local/", // This is not the real app URL
"trace" : true,
"sourceMaps": true,
"webRoot": "${workspaceRoot}/build",
"sourceMapPathOverrides": {
"webpack:///*" : "${webRoot}/*"
},
"preLaunchTask" : "development",
"internalConsoleOptions": "openOnSessionStart",
"smartStep": true,
"skipFiles": [
"node_modules/**",
"extensions:"
]
}
and I'm using this tasks.json.
Problem
So this mostly works well, except when I put a breakpoint somewhere, it opens the tab in a new tab marked as read-only inlined content from source map:
I just want to be able to debug and work on my files directly!
This is because VC can't find the sources on the file system, so it resorts to using the copy it got from the web server.
This is typical in projects that span both server and client side code, and as a result, the web (HTML/JS/CSS) root is nested inside the workspace root. It can be easily fixed:
in VC, open the root folder of your project. go to "File -> Save workspace as" and save the workspace. Going forward always use the workspace (rather than folder) to enter your project.
In launch.json, set the webRoot value to reflect the relative path of the webRoot (typically folder with index.html). If your webRoot is under "UI", then it should look like this:
"webRoot": "${workspaceFolder}/UI"
I got it working with this launch.json config. Hopefully it helps you.
{
"name": "Launch localhost",
"type": "chrome",
"request": "attach",
"url": "http://localhost:8080",
"port": 9222,
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": { "webpack:///./src/*": "${workspaceFolder}/src/*" },
"sourceMaps": true,
}
I was running into the same issue remote debugging Python, thanks the two above answers I was able to solve it.
as SimbalCoder suggested I saved the workspace. I suppose this is needed to set your workspace folder path.
I then modified my launch.json as such:
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/Scripts/MyScripts/"
}
],
}
Now the pathMappings are pointing to the correct file and upon debugger entry it is opening the correct file.

Resources