poshbotio / PoshBot

Powershell-based bot framework
MIT License
536 stars 108 forks source link

'Library.Exceptions.PermissionDeniedException' #162

Closed delrio1110 closed 5 years ago

delrio1110 commented 5 years ago

Teams backend

I was running PoshBot 11.0 for months with no issues for what I needed it for. 2 days ago the bot started crashing with a permission denied. I installed 11.5 and im getting the same error. I looked at the bot framework site to test and that works but Im seeing 'Library.Exceptions.PermissionDeniedException' warning every time you send a command via teams.

Do I need to renew any of the keys

Expected Behavior

Current Behavior

The bot wont acknowledge the command and will error over time. This causes the error permission denied

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

*Module version used: 11.5 Operating System and PowerShell version: Server 2016 PS 5.1

delrio1110 commented 5 years ago

image

delrio1110 commented 5 years ago

This is what i seeing in the psohbot verbose logs

":"Debug","Message":"User [removed] not found. Refreshing users","Data":{}}

delrio1110 commented 5 years ago

when I navigate to https://smba.trafficmanager.net/amer/v3/conversations/TEAMSID@thread.skype/members

I get {"message":"Authorization has been denied for this request."}

delrio1110 commented 5 years ago

@devblackops have you seen this before?

delrio1110 commented 5 years ago

Does anyone have a working Poshbot for teams currently?

delrio1110 commented 5 years ago

It’s having a hard time posting back to the teams channel, getting permission denied. Function is working.

devblackops commented 5 years ago

Hey @delrio1110, I have not seen that before and my test instance of Teams appears to be working fine (no changes to the Bot Framework and Teams settings).

This error looks to be with Bot Framework itself. In Bot Framework, you could try deleting the Teams channel registration and adding it again.

delrio1110 commented 5 years ago

also when I first installed by runing .\build build, I get Cannot index into a null array. At C:\Program Files\WindowsPowerShell\Modules\BuildHelpers\2.0.0\Public\Get-BuildVariables.ps1:78 char:9 $GitPath = (Get-Command $GitPath -ErrorAction SilentlyContinu ...


    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray
delrio1110 commented 5 years ago

Name Value


PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

delrio1110 commented 5 years ago

I have gotten the bot to respond, I found that for some reason, the disable git command in your doc doesn't disable it for me . As soon as I manually disable it, the bot start responding. As @devblackops I can get the bot working on MS Team if I use 11.0, If i use any version above that, I get a response of Unable to match parsed command [:status] to a plugin command. Any idea why?

WARNING: {"DataTime":"2019-03-23 21:18:44Z","Class":"PluginManager","Method":"MatchCommand","Severity":"Warning","LogLevel":"Info","Message":"Unable to match parsed command [:status] to a plugin command","Data":{}}

az functionapp deployment source config --resource-group \ --name --repo-url "https://github.com/poshbotio/TeamsWebhook" \ --manual-integration

delrio1110 commented 5 years ago

@devblackops do you know what markroloff did to fix his similar issue?

https://github.com/poshbotio/PoshBot/issues/141

delrio1110 commented 5 years ago

closing this as I think its related to my companies network. This issue doesn't happen it my house.

devblackops commented 5 years ago

Glad you found the issue @delrio1110!

devmuppet commented 4 years ago

As soon as I manually disable it, the bot start responding

How did you do this? It looks like im facing the same issue :(