"500: directline:postActivity" - c#

I have created a sample Luis bot, I have tried for intent detection I have no errors in Bot it is running successfully in the browser. But I am getting an error in the emulator as
" 500:Directline.postActivity". I have rechecked the path for ngrok and also I have checked all my code with no errors. but still, I am getting the same error can anyone help me with this.

Related

Bot emulator-unable to debug

I gave the correct AppId and Password. But still, I am getting this error
I also tried leaving a blank in place of AppId and Password. Any suggestions. I came across this issue several times in the past. But everytime time it worked magically after some time. Very inconsistent behavior.Any suggestions.
getting error
[14:58:55]Cannot post activity. Unauthorized.
[14:58:55]POST401directline/conversations//activities
I noticed an update notification on my emulator. I clicked on the notification, installed the update and restarted my emulator. Then it worked.

Deployed Bot is working with emulator but not in Web Chat

One of the bots I'm working on (using Virtual Assistant Template 4.9.1.1__1) does not work if open from the "Test in Web Chat" pane in Azure.
("Sorry, it looks like something went wrong. Please try again later.")
I checked all the possible causes listed here but none of them applies to my situation. In fact the bot is working if called from the bot emulator.
Looking at
https://<bot-name>.scm.azurewebsites.net/dev/wwwroot/:output
or:
az webapp log tail -n <bot-name> -g <resource-group-name>
and nothing appears.
How can I troubleshoot what's happening?
I found what's causing the error: it's the embedded image size (maybe too big).
Replacing:
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA..."
with:
"url": "https://myurl/myimage.jpg"
solved the issue.
Is there a limit on image size?

ExampleAssistantV1 with IBM Watson Unity SDK

I have attached the ExampleAssistantV1.cs script to a character in Unity and obtained my services credentials (API key and service URL) from the Assistant I have created.
From my dialog page, I can only see/get my Assistant Name and Assistant ID, but nothing like Workspace ID. I have searched around my bluemix pages and account details for the Assistant service, but cannot seem to find anything about Workspace. Where is this?
The version date when I used Tone Analyzer in Unity worked with the current date (yesterday) so I wonder if the same applies to Assistant? In the code comments, there is no explanation of what this date actually is...
When I run Unity, I get the following error. I could only find two threads on this; both are closed now on GitHub. Could someone please help me understand what I am missing?
[RESTConnector.ProcessRequestQueue()][ERROR] URL: https://gateway-lon.watsonplatform.net/assistant/api/v1/workspaces//message?version=2018-12-27, ErrorCode: 400, Error: 400 Bad Request, Response: {"error":"URL workspaceid parameter 'message' is not a valid GUID.","code":400}
After running in Unity, when I look at my service page, I see a new instance created with a unity-sdk-example-workspace-deleteUpdated message. How did I cause this? Have I done something wrong that this appears new?
If you click the three dots in the image above next to conversation assistant you can click View API Details. You should be able to see your Workspace ID there.
You supply the version date to select the version of the service you want to use in your application. You will be using the last service release on or before the version date supplied. If you use today's date you will be using the latest release of the service.
The issue with the the call is there is no workspaceId supplied. Ideally there should be a null check for this param. I've created an issue for this: https://github.com/watson-developer-cloud/unity-sdk/issues/490
As for the unity-sdk-example-workspace-deleteUpdated it look like you ran the AssistantV1 example. The example runs through each operation in the service and attempts to invoke it. In this case it looks like it failed to delete the workspace or the example was stopped before it was deleted. It is safe to delete this workspace/skill.

Error signing in to gmail this morning

I have a C# app using OpenPop, sending E-Mails through GMAIL.
This app has been working for the last few years, without a problem, and the last EMAIL I got from it was 8 hours ago.
Now I get an 'InvalidLoginException' error when I try to log in. I logged in normally to my account, even tried to change passwords but I still get this same message.
Following previous tips I tried to change the login line from
pop3Client.Authenticate(EMAIL_ADDRESS, ACCOUNT_PASSWORD) to
pop3Client.Authenticate(EMAIL_ADDRESS, ACCOUNT_PASSWORD, AuthenticationMethod.UsernameAndPassword)
But I still get the same message.
Anyone knows what could be wrong?

Error "A type load exception has occurred." using apns-sharp with mono

I'm trying to move my APN backoffice from PHP to C# for performance issue. Bear with me, I'm new to C# and mono.
I've just downloaded MonoDevelop 2.8.6.4 and APNS-sharp merge 26 on my OSX 10.7.2
I opened the entire solution with all libraries and test executables and built the entire solution without errors. I modified the fields (token id, cert file, ...) in the Program.cs in JdSoft.Apple.Apns.Notifications.Test to meet my specs.
After a few tries I managed to get my certificate file OK and the connection to Apple servers is now up. I see the message saying I'm connected in the output of the application.
Probleme comes now. Everytime the application tries to send a message to Apple I get the error "A Type load exception has occured". I tried a little debug and the error seems to come from the NotificationPayload constructor.
Doing step by step follow up, it appears the NotificationAlert is correctly instantiated inside the NotificationPayload constructor. The error appears when coming back to the Notification constructor where the Payload member appears in the debugger as "A type load exception has occurred." instead of an object.
From there the Notification object ends up with the same behavior.
From my research on the Internet this could come from the version of Newtonsoft.Json.Compact.dll but I have no idea what to do with this piece of information.
For information I can see the same error when running the compiled test on my CentOS server.
And for more information the application message (changed ex.Message to ex.ToString() in the test program to get a full error) :
Notification Queued!
Sleeping 15000 milliseconds before next Notification...
Connecting...
Connected...
Error: System.TypeLoadException: A type load exception has occurred.
at JdSoft.Apple.Apns.Notifications.Notification.ToBytes () [0x0006c] in /Users/laurent/Downloads/Redth-APNS-Sharp-595275f 2/JdSoft.Apple.Apns.Notifications/Notification.cs:90
at JdSoft.Apple.Apns.Notifications.NotificationChannel.Send (JdSoft.Apple.Apns.Notifications.Notification notification) [0x00000] in /Users/laurent/Downloads/Redth-APNS-Sharp-595275f 2/JdSoft.Apple.Apns.Notifications/NotificationChannel.cs:371
at JdSoft.Apple.Apns.Notifications.NotificationConnection.workerMethod () [0x00035] in /Users/laurent/Downloads/Redth-APNS-Sharp-595275f 2/JdSoft.Apple.Apns.Notifications/NotificationConnection.cs:381
I didn't put the code, as I didn't change anything from the one you can see at https://github.com/Redth/APNS-Sharp.
I send an SOS to all mono guru around.
Have a nice day fellow developers and thanks in advance for your help and time. Any suggestion is gladly welcome.
(As the OP can't post the answer himself...)
In this particular case, the solution was to fetch the latest version of Newtonsoft.Json.Compact.dll.
In general, you need to try to get as much information from the exception as possible, to find out what it was trying to load - then check that the problematic library is present, and that you've got the version everything else expects.

Categories

Resources