I am working the Dialogflow CX Java SDK to execute a list agents command. When, I try to list the agents, I get this exception.
io.grpc.StatusRuntimeException: PERMISSION_DENIED: Dialogflow API has not been used in project project-number before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dialogflow.googleapis.com/overview?project=project-number then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
Relevant code snippet:
AgentsSettings agentsSettings = AgentsSettings.newBuilder().build();
AgentsClient client = AgentsClient.create(agentsSettings)
LocationName parent = LocationName.of("my project id", "US-CENTRAL1");
AgentsClient.ListAgentsPagedResponse agents = client.listAgents(parent);
Any help appreciated.
This error may indicate that the GOOGLE_APPLICATION_CREDENTIALS and/or GOOGLE_CLOUD_PROJECT environment variables were not properly set. Reviewing the Dialogflow CX Setup documentation may help.
Related
With reference to setting custom user status on slack the documentation covers how to pass the timestamp when it would expire, but I could not find any mention of how to set the starting timestamp.
My question is if there is a slack api that would allow setting the user status, especially when the start time for the status is in the future?
There are no arguments or API methods for schedule a future custom status unfortunately. To accomplish this, you would have to schedule it server-side using a cron job or similar.
Slack is working on a new platform, currently in beta, that in its final form should allow you to create "scheduled triggers" that could then call a function that updates a user's status as part of a workflow. User token/authorization support is not yet supported in the beta but should be there soon.
I have a spring-boot-admin running in Kubernetes. It uses the spring-cloud-starter-kubernetes-fabric8 to discover all services running in my cluster. This works fine and the journal show all status changes of a service.
I enabled spring-boot-admins ability to send notifications to MS Teams. But here I only get (De-)Registered notifications having the status UNKNOWN. It lacks the information about the status change to UP.
Is there anything missing to get proper status updates in MS Teams? Looks like it notifies MS Teams immediately once it is aware of a new pod but at this point the status is not UP yet.
For some reason spring-boot-admins AbstractStatusChangeNotifier defines
/**
* List of changes to ignore. Must be in Format OLD:NEW, for any status use * as
* wildcard, e.g. *:UP or OFFLINE:*
*/
private String[] ignoreChanges = { "UNKNOWN:UP" };
so there is no update for this change.
It can be changed with spring.boot.admin.notify.ms-teams.ignore-changes:""
I am trying to develop a simple bot that is supposed to answer incoming call made in personal chat with bot. The bot is employing application hosted media to play or get access to media streams. I am making use of classes and controllers that are implemented in Huebot sample project at Github. The bot is registered on MS Azure and i am using ngrok for local testing and debugging. While debugging after making the call, breakpoints are hit that are placed in 'CallsOnIncoming' or 'CallsOnUpdated' event handlers. So my bot configurations over Azure and in MS Teams seem to be correct. For setting up media platform, I have installed the wildcard SSL certificated issued by Let's Encrypt and CName records are created for corresponding tcp URLs exposed by ngrok. The environment is multi-tenant i.e. bot registration is done on another tenant, while bot is installed and tested in MS Teams on another tenant.
These are Media platform settings:
MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings()
{
CertificateThumbprint = "0B687..................",
InstanceInternalPort = 8445,
InstancePublicPort = 15410,
InstancePublicIPAddress = new IPAddress(0x0),
ServiceFqdn = "4.mycustomdomain.com",
},
Here's the snapshot for ngrok:
The problem is, when call is made to the bot, after 5 to 10 seconds call is terminated automatically. Whereas he Call status should turn to 'Established' and the call shouldn't end until user does this.Please guide, what could be wrong.
The call is terminating because Teams can't connect to your media endpoint of the InstancePublicIPAddress / InstancePublicPort. It timesout (i believe in 15 seconds) and terminates the call when it can't get a media connection.
You need to put the IP address of 4.tcp.ngrok.io from your running ngrok settings above into it.
e.g.
InstancePublicIPAddress = Dns.GetHostEntry("4.tcp.ngrok.io").AddressList[0]
You may want to put error checking around the GetHostEntry call in production code.
I'm trying to find out what is wrong with my bot. This is a bot meant as back-end for a Cortana skill. The bot is built with the bot framework version 3.8.0. I'm running it on an Azure Bot Service instance (Azure Function).
Locally, everything works as expected. I'm using the bot framework emulator to test everything; all great. Now I publish the bot to Azure and invoke it using Cortana. Cortana replies there's an issue with the bot.
When I check the diagnotics log in Azure, I see the following:
2017-07-18T08:11:34.252 Exception while executing function: Functions.messages
2017-07-18T08:11:34.252 Invalid channel data.
2017-07-18T08:11:34.272 Executed 'Functions.messages' (Failed, Id=e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed)
2017-07-18T08:11:34.272 Invalid channel data.
2017-07-18T08:11:34.272 Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is 'e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed'
2017-07-18T08:11:34.272 Invalid channel data.
2017-07-18T08:11:34.315 {"id":"6f095c10-d9e8-4ad0-a6a8-caf052288f8b","requestId":"2f4c950c-2459-4467-8579-4f3b5bc45e6b","statusCode":500,"errorCode":0,"messsage":"An error has occurred. For more information, please check the logs for error ID 6f095c10-d9e8-4ad0-a6a8-caf052288f8b"}
2017-07-18T08:11:34.315 Invalid channel data.
2017-07-18T08:11:34.194 Function completed (Failure, Id=e5eae9f5-97e4-4a35-aa5f-5c7d58a63aed, Duration=4626ms)
2017-07-18T08:11:34.252 Exception while executing function: Functions.messages. Microsoft.Bot.Connector: Invalid channel data.
So "invalid channel data" seems to be the main error here, but that doesn't tell much. I enabled all logging on the server and downloaded + inspected these; there's nothing more useful in there.
I also attached a debugger to the remote process. I see my dialog method being called and finished without any problem. So the issue doesn't appear to be in my code, but in the framework somewhere? But I have no idea on where to go next.
BTW I also tried updating to the latest version of the SDK (3.8.5) but it appears that Microsoft.Bot.Builder.Azure has a dependency on version 3.8.0 cause it won't run after upgrading due to a assembly load error (it's trying to load 3.8.0).
You can debug your Azure published BOT locally. This will help you to find the real issue.
I am adding the steps how to debug Azure published BOT in locally.
Enable Debug in Azure Application setting:
Open Azure Portal.
Click on Azure Web Bot.
Click on Application Settings, In the Debugging section On Remote Debugging and select your Visual Studio Version.
enter image description here
Get Publish Settings:
Click on All App service Settings
Click on Get publish profile to get the publish setting with all user name and paths. It will download the settings.
enter image description here
Click on the Attach to process ..
enter image description here
In the Connection target: type your bot url without http://.
Example: yourbotname.azurewebsites.net:4022
--Click on Find Button.
--This is asking you to give username and password. You need to get your azure username and password from publish file.
enter image description here
Now run your Web App or Cortana to debug your BOT and the get real Error.
I am trying to send an outlook appointment through code. My code is posted below. When I run it on the server with IIS 6 and an app pool under a domain account identity, it throws this error. I have tried changing various settings on the server and none worked. Outlook 2007 is installed. I have even made the domain account a local admin. Please help!
Description: An unhandled exception
occurred during the execution of the
current web request. Please review the
stack trace for more information about
the error and where it originated in
the code.
Exception Details:
System.Runtime.InteropServices.COMException:
Operation aborted (Exception from
HRESULT: 0x80004004 (E_ABORT))
Line 201: objAppt.Send();
Code below:
Microsoft.Office.Interop.Outlook.Application objOL
= new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.AppointmentItem objAppt
= (Microsoft.Office.Interop.Outlook.AppointmentItem)objOL
.CreateItem
(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
objAppt.Start = startTime;//datetime
objAppt.End = endTime;//datetime
objAppt.Subject = subject;
objAppt.Body = body;
objAppt.Location = location;
objAppt.MeetingStatus
= Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
objAppt.RequiredAttendees = "test#test.com";
objAppt.Send();
objAppt = null;
objOL = null;
Yes as casperOne said I wouldn't use outlook on the server. I would use CDO or RDO(redemeption) for this. or even use vcal and send the vcal on a system.Net.Mail.
Update:
Take a look at http://www.dimastr.com/redemption/rdo/RDOAppointmenItem.htm
Show you how to do excatly what you want to do using RDO. You can do the same with CDO as well. Check out CDOLive.com
You will have to construct a teh login details as you are on a server that has no Outlook profile (thats if you remove the one that you allready have on there)
Quite simply, you shouldn't be doing this. It is not recommended that you run Office in a server environment because of the threading (and desktop session) requirements that Office has.
Are you trying to do this on an Exchange server? If so, then I would interact directly with the Exchange server (using WebDAV perhaps?).
If not connecting with Exchange, then take a look at the headers for an invitation to the event. The invitations should be nothing more than regular emails with custom header information.
I guess the reason you cannot use Outlook from an IIS application is because the current user the IIS app is running under does not have an Outlook profile associated.
Therefore you can instantiate Outlook objects and set their properties, until profile-specific functionality is required, such as the Send() command, which would store the outgoing mail in the user's/profile's (non-existing) pst file.
Don't do this using Outlook automation.
Straight from the horse's mouth:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
http://support.microsoft.com/kb/257757
Examine email headers sent by Outlook when it's doing this job to work out how this is done, and emulate it using the standard .NET SmtpClient stuff.