mattermost-community / mattermost-plugin-skype4business Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Troubleshooting issues with connecting to on-prem skype4business servers has consistently proven to be difficult. It would be useful to be able to view the raw requests being sent out. The task here is to log the request or important bits of the request to the server logs.
Issue created from a Mattermost message by @muratbayan.
If the server's SiteURL is configured with a subpath, the webapp's API calls do not work. The task here is to make this plugin's client to prefix its URLs with the SiteURL. This also includes any calls to /plugins/*
Only API calls to the Mattermost server should use the SiteURL. Any calls to Microsoft servers should not use the SiteURL.
Here's an example of how the SiteURL may be computed:
https://github.com/mattermost/mattermost-plugin-jira/blob/19a9c2442817132b4eee5c77e259b80a40188a6a/webapp/src/selectors/index.js#L13-L26
Hi thank you for the nice plugin, it works for us now.
Maybe you even considered that already, we would find it useful if the plugin allows to give:
Keep up the good work!
Update Dependencies before cutting a new release
Originally posted by @aaronrothschild in #41 (comment)
$ make golint
Running lint
env GO111MODULE=off /usr/bin/go get golang.org/x/lint/golint
/home/sumacheb/go/bin/golint -set_exit_status ./...
server/plugin.go:26:2: exported const PostMeetingKey should have comment (or a comment on this block) or be unexported
server/plugin.go:35:6: exported type IClient should have comment or be unexported
server/plugin.go:44:6: exported type Plugin should have comment or be unexported
server/plugin.go:57:1: exported method Plugin.OnActivate should have comment or be unexported
Found 4 lint suggestions; failing.
make: *** [Makefile:80: golint] Error 1
Cannot create a new meeting, because the AutodiscoverService fails:
Access to fetch at 'https://webdir2e.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user' from origin 'https://5cf9b2c4cadf.ngrok.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled
@kosgrz I know we discussed it, just creating a ticket to track
When a plugin’s webapp makes an API request to the Mattermost server, it needs to include the CSRF token supplied by the server in its request. This can be done using the getOptions
function exported by the mattermost-redux library. Here is some example usage
The task here is to convert all API requests done by the plugin’s Client
to use the token. The import statement import request from 'superagent'
should be removed, and favor using fetch
instead, as shown in the example usage linked above.
After migration, we can remove the Username
System Console setting, simplifying plugin configuration.
Mattermost is currently in the process of using golangci-lint
as the default linter for all go projects. mattermost-community/mattermost-plugin-autolink#108 serves as an example of how the migration should look like:
.golangci.yml
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.Makefile
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.build/
from https://github.com/mattermost/mattermost-plugin-autolink/ into this repository.go mod tidy
and make dist
to ensure the build system works fine.linters-settings.goimports.local-prefixes
to the go module path i.e. to github.com/mattermost/mattermost-plugin-aws-SNS
.make golangci-lint
and fix all issues that arise.Fixing an linter issue is sometimes trivial but can also be quite complicated. There might be cases, where ignoring an issue using issues.exclude-rules
is needed. If you don't know how to resolve an error, please reach out to @hanzei
on the Mattermost Community Server or ask the question here.
Hi,
I'm trying to install sfb plugin v0.1.2 into Mattermost 5.19.1 (bundled with gitlab).
I downloaded the plugin here: https://github.com/kosgrz/mattermost-plugin-skype4business/archive/v0.1.2.tar.gz
The error I'm getting is:
{"level":"error","ts":1585067578.4680972,"caller":"mlog/log.go:174","msg":"Encountered error extracting plugin","path":"/api/v4/plugins","request_id":"x7e44so53td67q3fhyuw4curxo","ip_addr":"85.212.72.83","user_id":"hesn8tm5g7f38cfhriryytibao","method":"POST","err_where":"installPluginLocally","http_code":400,"err_details":"ExtractTarGz: unknown type: 103 in pax_global_header"}
I guess I'll have to build the plugin in some way. But there's nothing mentioned in the readme...
From here:
"For some more context, see here. The short version though is that we updated the web app to React 17, and there's a chance that plugins will have some issues with it because they're compiled with the React 16 version of ReactDOM. I'm submitting PRs to the 3 products, the demo plugin, and the plugin template to have them use the web app's version of React DOM to fix any immediate issues, but we'll want to properly migrate them to React 17 going forward."
Ticket Link
https://mattermost.atlassian.net/browse/MM-47046
Related Pull Requests
mattermost/mattermost-plugin-playbooks#1489
mattermost/focalboard#3861
mattermost-community/mattermost-plugin-todo#190
mattermost/mattermost-plugin-starter-template#169
Hi, this is a very nice integration, we would like to use,
After initial installation and configuration, we have this error:
Mattermost channel:
System
2:58 PM(Only visible to you)
×
An error occurred when creating the meeting. Please try again later.
mattermost logs:
"caller":"go-plugin/stream.go:15","msg":"invalid character '<' looking for beginning of value","plugin_id":"skype4business","source":"plugin_stdout"}
It could be that the configuration is not done right,
Thanks a lot for the nice integration.
Getting the following error when trying to build:
go: willnorris.com/go/[email protected]: unrecognized import path "willnorris.com/go/imageproxy" (https fetch: Get https://willnorris.com/go/imageproxy?go-get=1: x509: certificate signed by unknown authority)
go: error loading module requirements
There have been 18 commits since the last release in July 2019. In the documentation it states to use the plugin to download the source from the last release, but I think that there are probably changes we would want since then (Specifically the NPM Audit changes)
Hi All,
Thank you for the plugin. We installed the plugin and enabled in Mattermost and registered application in Azure as described. We can see the icon displayed in Mattermost but when i clicked the icon nothing is happening. But in the background i see the redirect url returning "missing id_token" response with http status code 401.
Could you please let me know what i can be missing in the configuration.
Here is my Manifest file from Azure
{
"id": "badbb555-f750-49f6-952e-281b6d4efdee",
"acceptMappedClaims": null,
"accessTokenAcceptedVersion": 2,
"addIns": [],
"allowPublicClient": null,
"appId": "bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1",
"appRoles": [],
"oauth2AllowUrlPathMatching": false,
"createdDateTime": "2019-07-17T11:08:06Z",
"groupMembershipClaims": null,
"identifierUris": [],
"informationalUrls": {
"termsOfService": null,
"support": null,
"privacy": null,
"marketing": null
},
"keyCredentials": [],
"knownClientApplications": [],
"logoUrl": null,
"logoutUrl": null,
"name": "Mattermost Skype for Business Plugin - XXXX",
"oauth2AllowIdTokenImplicitFlow": true,
"oauth2AllowImplicitFlow": true,
"oauth2Permissions": [],
"oauth2RequirePostResponse": false,
"optionalClaims": null,
"orgRestrictions": [],
"parentalControlSettings": {
"countriesBlockedForMinors": [],
"legalAgeGroupRule": "Allow"
},
"passwordCredentials": [],
"preAuthorizedApplications": [],
"publisherDomain": "XXXXXXXX.onmicrosoft.com",
"replyUrlsWithType": [
{
"url": "https://XXXXXXXXXXX/plugins/skype4business/api/v1/auth_redirect",
"type": "Web"
}
],
"requiredResourceAccess": [
{
"resourceAppId": "00000004-0000-0ff1-ce00-000000000000",
"resourceAccess": [
{
"id": "d0c8f2ea-8f80-4289-8e78-4bc821cde1bc",
"type": "Scope"
}
]
},
{
"resourceAppId": "00000003-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
"type": "Scope"
}
]
}
],
"samlMetadataUrl": null,
"signInUrl": null,
"signInAudience": "AzureADandPersonalMicrosoftAccount",
"tags": [],
"tokenEncryptionKeyId": null
}
Thanks,
Venkat
@yoandrygc Is this issue solved?
Originally posted by @larkox in #52 (comment)
{
"caller": "web/context.go:117",
"err_where": "installExtractedPlugin",
"error": "installExtractedPlugin: Unable to generate plugin webapp bundle., unable to copy webapp bundle directory: jira: mkdir client/plugins/jira: permission denied",
"http_code": 500,
"ip_addr": "10.2.6.2",
"level": "error",
"method": "POST",
"msg": "Unable to generate plugin webapp bundle.",
"path": "/api/v4/plugins/marketplace",
"request_id": "moxdhjtkjfbffg4cr6mnzgrury",
"timestamp": "2023-10-04 18:13:16.738 Z",
"user_id": "368zkifiujyoigiqetkxafu36w"
}
Getting the following errors when trying to run with Skype for Business Server:
{"level":"debug","ts":1587102486.5159667,"caller":"mlog/log.go:162","msg":"CSRF Check failed for request - Please migrate your plugin to either send a CSRF Header or Form Field, XMLHttpRequest is deprecated","path":"/plugins/skype4business/api/v1/create_meeting_in_server_version","ip":"127.0.0.1:48131","session_id":"..........","user_id":"..........."}
...
{"level":"info","ts":1587102491.4761477,"caller":"[email protected]/stream.go:15","msg":"{\"level\":\"warn\",\"msg\":\"Resource from applications url is not the same as resource name from user url\"}","plugin_id":"skype4business","source":"plugin_stdout"}
{"level":"info","ts":1587102491.4866028,"caller":"[email protected]/stream.go:15","msg":"{\"level\":\"error\",\"msg\":\"Error fetching meetings resource url: Error performing request to get authentication header from new resource: Response doesn't have WWW-AUTHENTICATE header!\"}","plugin_id":"skype4business","source":"plugin_stdout"}
Hi, I was flailing with the Server Domain
setting and stuck in a https://theedge.company.com
and I can't change it. It seems since it was valid, the plugin stuck it in the kv store. Can you tell me now to clear out the settings so I can stick in the correct information?
Thanks!
Hey there,
I really like this plugin!
In our enterprise environment, we have several different Skype instances. An option to configure multiple skype instances and make them selectable via dropdown would be really great!
Do you think this would be feasible?
Best regards!
The .circleci/config.yml file needs to be updated to run the webapp tests in CI.
Now users are connected as attendances and because of that, they cannot, for example, present their desktops, etc.
There are two options in my mind to consider:
homepage_url
support_url
icon_path
min_server_version
i get an error Failed to fetch
Got no error in the logs, only in ui
Instead of using mlog
all log calls should use the RPC methods LogX
, e.g. LogDebug
. This allows the server to gradually select which log messages to show in the server logs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.