Alexa INTERNAL_SERVICE_EXCEPTION [Error reading entity from input stream] - alexa

I am using the Alexa Skill Kit, but sometimes this error appears, I do not know why this happens, if I repeat exactly the same sentence that generated the error, the errors do not re-activate, this happens sometimes but frequently.
{
"header": {
"namespace": "System",
"name": "Exception",
"messageId": "d54f1559-f45e-47a8-b558-d391793c2030"
},
"payload": {
"code": "INTERNAL_SERVICE_EXCEPTION",
"description": "Error reading entity from input stream."
}
}
I don't know if there is my lambda or if is an error from the skill. I need to know what is the problem to fix it.
Thanks a lot!

Related

How can I go about avoiding verification for a TikTok bot with proxies?

I am making a TikTok bot for fun. It does not automate posts/follows, it only scrapes information off the site. The issue I am finding is that after about 10-15 requests to the TikTok API it requires verification, spouting the following JSON:
{
"code":"10000",
"from":"",
"type":"verify",
"version":"",
"region":"sg",
"subtype":"slide",
"detail":"Hj4wDrDKZhDyu*bE94NlMgd3uQfAXw2eZJGOyoJXO-X9iLbeynU-spQiwbxyOkhJkGKbHNCyGHKuZ4jnJaJfnGedLadLrz8UMPAV*sriWIzRIEwj0PdWEmtZ25SbcEoytp4G631fwjn7y0498dMxisxkA8QnSTTGfswOFlkQBfyyMFYf5TlvDkfxmkjG7qKRHdCOhsnmSLbTCOd6MLcNFJA9WhlmcnhBrJnnVCs-HvoRzOdbpGbOmZ55HjpWIRz0JrQp2EdEjr8-qtQd5jpdpzuXxcfzrLbGFZTjWkyMHPf4vMb3J*q8hIs0zX2gP6IyCsa2et5BQPsB1KU2YyRA5VEvd*8*lZyRR60ZVs46UwtEXAu0l41Y2q0agUrayqnPnj8zpq7H7aK2VS46RZO0W3N7nZ-Jjq4QbAs.",
"verify_event":"",
"fp":"verify_kxe9l4xj_3jaJngfM_UEUu_47yj_Au6M_Kp0jwEVrqCJb",
"scene":"",
"verify_ticket":"",
"channel_mobile":"",
"sms_content":"",
"mobile":"",
"email":""
}
I am aware of sneaker bots using proxies to avoid these sorts of issues, however TikTok requires cookies authentication from a signed in account so I'm not sure if it will work. Some responses talk about using headless requests, etc., but I've had no luck thus far in preventing this verification process.
Does anyone with experience scraping TikTok have a resolution for this issue?
Thanks.
{
"code": "10000",
"from": "",
"type": "verify",
"version": "",
"region": "sg",
"subtype": "slide",
"detail": "Hj4wDrDKZhDyubE94NlMgd3uQfAXw2eZJGOyoJXO-X9iLbeynU-spQiwbxyOkhJkGKbHNCyGHKuZ4jnJaJfnGedLadLrz8UMPAVsriWIzRIEwj0PdWEmtZ25SbcEoytp4G631fwjn7y0498dMxisxkA8QnSTTGfswOFlkQBfyyMFYf5TlvDkfxmkjG7qKRHdCOhsnmSLbTCOd6MLcNFJA9WhlmcnhBrJnnVCs-HvoRzOdbpGbOmZ55HjpWIRz0JrQp2EdEjr8-qtQd5jpdpzuXxcfzrLbGFZTjWkyMHPf4vMb3Jq8hIs0zX2gP6IyCsa2et5BQPsB1KU2YyRA5VEvd8*lZyRR60ZVs46UwtEXAu0l41Y2q0agUrayqnPnj8zpq7H7aK2VS46RZO0W3N7nZ-Jjq4QbAs.",
"verify_event": "",
"fp": "verify_kxe9l4xj_3jaJngfM_UEUu_47yj_Au6M_Kp0jwEVrqCJb",
"scene": "",
"verify_ticket": "",
"channel_mobile": "",
"sms_content": "",
"mobile": ""
}

Coinbase Pro API client_oid always empty

I've run into an issue using the Coinbase Pro sandbox API to test my software.
When placing orders, I POST a client_oid field along with the rest of the body to the REST API, the order gets filled properly but when the received message arrives through the websocket stream, the client_oid is always an empty string.
Anyone knows why is that and how to fix this?
Example data POSTed when placing the order:
{
"type": "market",
"side": "buy",
"product_id": "BTC-EUR",
"funds": "1000",
"client_oid": "dev_node-order-1"
}
And here's the matching websocket message of type received:
{
"type": "received",
"side": "buy",
"product_id": "BTC-EUR",
"time": "2021-08-15T16:57:29.079657Z",
"sequence": 52030416,
"profile_id": "[MY-PROFILE-ID]",
"user_id": "[USER-ID]",
"order_id": "d1f60730-8960-495e-a7eb-cd37baa46768",
"order_type": "market",
"funds": "995.0245866076",
"client_oid": ""
}
As you can see the received client_oid is empty, any idea why?
So the problem was that the client_oid needs to be of the UUID format, for example 9bffcb70-13ea-11ec-abc7-7dfab310af81, if not of this format the field is ignored.

Can't get events with open extension in Microsoft Graph API

I created an event through a shared mailbox in Graph API.
https://graph.microsoft.com/v1.0/users/{shared-user-id}/calendars/{shared-calendar-id}/events
{
"subject": "New Event Test",
"body": {
"contentType": "HTML",
"content": "Mail FLow Test"
},
"start": {
"dateTime": "2021-01-29T12:00:00",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "2021-01-30T14:00:00",
"timeZone": "Eastern Standard Time"
},
"attendees": [
{
"emailAddress": {
"address":"calendar#contoso.com",
"name": "Calendar Organizer"
},
"type": "required"
}
]
}
This creates an event successfully, and after that, I patched this event with extended data using open extension.
https://graph.microsoft.com/v1.0/users/{user-id}/calendars/{calendar-id}/events/{just-created-event-id}
{
"extensions": [
{
"#odata.type": "microsoft.graph.openTypeExtension",
"extensionName": "Com.Contoso.Events",
"courseId": 22,
"materialId": 75,
"courseType": "video"
}
]
}
This seems not to work. This responses Access is denied.
https://graph.microsoft.com/v1.0/users/{shared-user-id}/calendars/{shared-calendar-id}/events?$expand=extensions($filter=id eq 'Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Events')
It responses ErrorAccessDenided with error message "Access is denied. Check credentials and try again".
But if I try this without expanding extensions, then it works.
I couldn't even to create an event because it responded with the same error and message "Access is denied. Check credentials and try again", so I added an API permission MailboxSettings.ReadWrite in my Azure AD that made work an event creation through the shared mailbox.
What is the reason why I can create or get events but not add or expand extensions?
Move my comment here so that this issue is treated as answered.
The method you are using is incorrect. Please refer to this sample to create the open extension.
But based on my test, we cannot use an admin (or a delegated user or a shared mailbox member) to create the extension for the shared mailbox (Even if I have added Calendars.Readwrite.Shared permission). It will give 403 error as you have encountered.
When I sign in with the shared mailbox user, it can create the open extension for itself.
So the conclusion is: when we use delegated permissions (user token), we can only create an open extension for the currently logged in user himself.

Problem with StatusReport trait in Smart Home Actions

I have a Security System with traits action.devices.traits.ArmDisarm and action.devices.traits.StatusReport and some other sensors: WaterLeak Sensor, Door Sensor ...
I report some errors about other devices with StatusReport state.
For example: when the door sensor detects that the door is open, the security system must give deviceOpen error.
When I say, "Is my security system ok?", my server's response to the query intent is the JSON below, but Google Assistant says that he couldn't reach my action (Unexpected error happened).
Is there anything wrong with this response?
{
"requestId": "10417064006786362499",
"payload": {
"devices": {
"3rL3QL7Kq2HrQjs53Y7o": {
"isArmed": true,
"currentStatusReport": [
{
"blocking": true,
"deviceTarget": "4BCIpzBWpgLA24mMI7r2",
"priority": 0,
"statusCode": "deviceOpen"
},
{
"blocking": true,
"deviceTarget": "MxRCd6ERRSWzYzyNTE8S",
"priority": 0,
"statusCode": "waterLeakDetected"
}
],
"status": "EXCEPTIONS",
"online": true
}
}
}
}
In Firebase Console there are no errors.
Logs in Firebase Console
Your response to the query intent looks right, but there might be an error in other parts of the process. You can follow the Troubleshooting Guide to see how your failed intent is counted in the Smart Home metrics and what are the details on your logs. (Firebase logs only gives info about your server. The logging mentioned in the guide (Google Cloud Logging) is a different and more comprehensive for the intent handling)

GraphAPI Schema Extensions don't appear for Messages

I would like to add some custom data to emails and to be able to filter them by using GraphAPI.
So far, I was able to create a Schema Extension and it gets returned successfully when I query https://graph.microsoft.com/v1.0/schemaExtensions/ourdomain_EmailCustomFields:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#schemaExtensions/$entity",
"id": "ourdomain_EmailCustomFields",
"description": "Custom data for emails",
"targetTypes": [
"Message"
],
"status": "InDevelopment",
"owner": "hiding",
"properties": [
{
"name": "MailID",
"type": "String"
},
{
"name": "ProcessedAt",
"type": "DateTime"
}
]
}
Then I patched a specific message https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/Messages/hidingmessageid:
PATCH Request
{"ourdomain_EmailCustomFields":{"MailID":"12","ProcessedAt":"2020-05-27T16:21:19.0204032-07:00"}}
The problem is that when I select the message, the added custom data doesn't appear by executing a GET request: https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/Messages?$top=1&$select=id,subject,ourdomain_EmailCustomFields
Also, the following GET request gives me an error.
Request: https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/Messages?$filter=ourdomain_EmailCustomFields/MailID eq '12'
Response:
{
"error": {
"code": "RequestBroker--ParseUri",
"message": "Could not find a property named 'e2_someguid_ourdomain_EmailCustomFields' on type 'Microsoft.OutlookServices.Message'.",
"innerError": {
"request-id": "someguid",
"date": "2020-05-29T01:04:53"
}
}
}
Do you have any ideas on how to resolve the issues?
Thank you!
I took your schema extension and copied and pasted it into my tenant, except with a random app registration I created as owner. then patched an email with your statement, and it does work correctly.
A couple of things here,
I would verify using microsoft graph explorer that everything is correct. eg, log into graph explorer with an admin account https://developer.microsoft.com/en-us/graph/graph-explorer#
first make sure the schema extensions exists
run a get request for
https://graph.microsoft.com/v1.0/schemaExtensions/DOMAIN_EmailCustomFields
It should return the schemaextension you created.
then
Run a get request for the actual message you patched not all messages that you filtered for now.
https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/Messages/MESSAGEID?$select=DOMAIN_EmailCustomFields
here the response should be the email you patched and your EmailCustomField should be in the data somewhere, if it is not, that means that your patch did not work.
then you can run patch again from graph explorer
I did all this from graph explorer, easiest way to confirm.
two other things,
1) maybe the ?$top=1 in your get first message isn't the same message that you patched?
2) as per the documentation, you cannot use $filter for schema extensions with the message entity. (https://learn.microsoft.com/en-us/graph/known-issues#filtering-on-schema-extension-properties-not-supported-on-all-entity-types) So that second Get will never work.
Hopefully this helps you troubleshoot.

Resources