Alexa test ISP with lambda-local - alexa

I'm trying to create my first Alexa skill with In Skill Purchasing (ISP), and having issues testing consistently locally.
When I copy my JSON Input from the "Alexa Console > Test" area and run the same request using lambda-local in vscode, it often works a few times but inevitably I end up getting the following response:
ServiceError: The authentication token is invalid or doesn't have access to make this request
at MonetizationServiceClient.<anonymous> (<my_path>/lambda/custom/node_modules/ask-sdk-model/index.js:149:35)
Sometimes I get the response the first try, sometimes after 2 or 3 attempts.
I'm testing with an amazon.com account using a US based address as recommended, and I'm using en-US locale, so why do I keep getting this error message that my authentication token is invalid?

Related

AWS S3 - key is not expected for the get method

Very weird occurrence of this error (see below). Points of note:
Web app in question has >500 daily users, all of them uploading objects into S3 daily
Two users, have this one error when they try and upload a file
The same users, if they try a different computer, do not get this error
Web app is using the EvaporateJS library - https://github.com/TTLabs/EvaporateJS
There seems to be no pattern with regards to file size (even a tiny <10kb file will cause it)
The authentication/authorisation component of the web app is handled by the web-app. I.e. - The IAM user associated with generating the S3 upload Url is shared for all web app users, so I have ruled out a permission issue for the IAM user ID in question
Error message:
<Error>
<Code>InvalidRequest</Code>
<Message>
Key is not expected for the GET method ?uploads subresource
</Message>
<RequestId>
*****
</RequestId>
<HostId>
*****
</HostId>
</Error>
From all the points above, the only variable here seems to be the computers. Am I right? Have I overlooked something? If it is the computers, any idea what would be the issue there? An overactive firewall/something else preventing the upload network requests?
Thanks in advance for any guidance in decipher this error message (what does it even mean?!)

Getting http 500 backend error when posting to Gmail API

I am using the Gmail API to put messages into a Google Apps email account. I use
the OAuth 2.0 authentication protocol with a service account. This is more or
less working fine. One of our customers has asked us to put messages
directly into a Google Vault. I don't see a Vault API, but I did find this
information related to the "insert" method (which is what we use to add
messages to a normal account):
parameter "deleted" (boolean): Mark the email as permanently deleted
(not TRASH) and only visible in Google Apps Vault to a Vault administrator.
Only used for Google Apps for Work accounts.
When I do this, some messages are accepted, but frequently I get http error
500 in response to the POST. The error text says "Backend Error". I thought
the pattern was that the first time the message was posted, it would work,
but the second time would generate the error. Therefore I was thinking it
was a duplicate check issue. However I now see some examples of messages
that fail immediately. The POST url looks like this:
https://www.googleapis.com/upload/gmail/v1/users/user#domain.com/messages?uploadType=multipart&internalDateSource=dateHeader&deleted=true&access_token=ABC...
As I mentioned, the same message to the same url (without deleted=true) will
always work. Any ideas what is causing the error?
Was just fighting this issue myself. Apparently the error has something to do if the message is compatible with the Google vault retention policies:
If I turn on a default policy of "Retain everything" then I've been able to get the messages to import correctly. HTH!
I'm using the import api method and the backendError seems to be related to filters/policies. For example we asked Google to reject messages with xls and macros and we get the error on mail with that kind of attachment

Web app occasionally gets net::ERR_NAME_NOT_RESOLVED

I created a simple web app card game that is currently in development mode.
The way it works is simple: users log in and start playing. To play, the user clicks on three cards that make a match and clicks submit. Submit sends the names of the chosen cards to the server to be saved. Then the next round is loaded and presented.
However, in testing, some of my users are getting stuck in the game after clicking submit.
An investigation in the console reveals a message:
POST https://myproj.herokuapp.com/api/user/billy/saveResult
net::ERR_NAME_NOT_RESOLVED
I can't figure out why this is happening. The save mechanism works for other rounds. Why does this randomly happen suddenly to some rounds?
Any ideas?
ERR_NAME_NOT_RESOLVED is given when the request can not reach the DNS server and therefore can not translate the given name into an IP sequence. This might be given to a bad connection to internet resulting to null network service, for example.
You could try to point directly to the IP address, so the request does not need to be translated and can be pointed direclty to the server. So instead of having:
POST https://myproj.herokuapp.com/api/user/billy/saveResult
You could try:
POST https://54.225.236.39/api/user/billy/saveResult
Please, also note that this could also be caused by a wrong Proxy Settings SetUp in case you have one.
Hope it helps!

Getting unexpected results when processing email via App Engine app

I'm trying to set up the email receiver found here, to process incoming emails and send them out as POST data to a script on my server to be handled further from there. The issue I'm having is when I send one test email to foo#[myappname].appspotmail.com, the App Engine logs show that the email is continually "received" over and over again every couple of minutes, even though I only sent it once. Then after several minutes of this, when I go into settings and disable the app, I get at least one "Delivery to the following recipient failed permanently" message to the email account I was sending the emails from (makes sense, since the app is now disabled and not accepting any incoming mail).
What I'm having trouble understanding is why the application is behaving like it's getting multiple emails sent to it when it's only one. Do I need to modify the Python script to do something to delete or halt the email once it's been processed the first time? If so, does anyone have any suggestions as to how to do that? The Python script that I'm using is found here.
User voscausa answered my question-- the email requests kept retrying because the script was erroring. Thanks!

QuickBooks Online API Diagnostics.php ERROR

I am testing QuickBooks Online API by using the source code from the following URL:
https://github.com/consolibyte/quickbooks-php
When I test the diagnostics.php http://mydomain.info/qb/docs/example_app_ipp_v3/diagnostics.php
I got the following error:
Warning: array_merge(): Argument #2 is not an array in /home/mydomain.info/public_html/qb/docs/example_app_ipp_v3/diagnostics.php on line 15
The connection is fine.
Please advise
If $creds is empty, it means that you have not yet established a valid OAuth connection to Intuit's servers.
You need to do that before anything is going to work. If you're just trying to get rid of the error, just cast $creds to an array.
To establish a connection, click the "Connect to QuickBooks" button that's shown on the /index.php script when you visit it in a browser. You'll be walked through the OAuth setup process (make sure you've changed the URLs, app token, and OAuth credentials in config.php first, and configured your URLs in your IPP app as well on Intuit's site).
Regarding your other questions:
$the_username and $the_tenant can be left at their defaults for testing.
In production, you will likely NEVER use $the_username (it's used only in very specific special circumstances). $the_tenant should be set to your unique tenant identifier within your SaaS app (or, if you're not a SaaS app, just leave it at it's default).

Resources