Demos with persistence fail running locally - alexa

I run the Amazon Alexa video tutorial "Setup Local Debugging for an Alexa Skill", and debugging is successful on VSCode against "hello World" app, as in the video. However, running against any demo with persistence eg Cake Walk or High Low, the app fails as shown below:
User > start high low game
Alexa > There was a problem with the requested skill's response
Is there some sort of permissions I need to set up to allow access to persistence locally? It's not specified in the tutorials documentation anywhere I can see.
[Note, running from the developer console with the endpoint (re)set to AWS Lambda works.]
debug window gives:
~~~~ Error handled: Could not read item
(amzn1.ask.account.AFV5QAE7QCLJQGHTK5EYAWRYARFW3HCGSAGBWXVBSSIGDUT4OR
7YJ23CIPY7PD6LTEREB5URCGCSOPK6J4UDBSQUE6QMYFUQQ44T5KJ62BI3UZYNE4T6CZE
SOP4GYHOJ3JENFM44HKSZY4MC6T564AACOLP7HEIKGXDMN5WJQ7ZIK5GSC66LVRSFOH5H
Q2JXHMG3D3HHMKK42SQ)
from bucket (undefined): Missing required key 'Bucket' in params"

Related

Amazon Alexa doesn't open the skill developed by me( on the device)

I have a problem with Amazon Alexa.
I have started to develop a small skill in Alexa Developer Console.
Everything works perfectly when I test it in that console, but when I tell to Alexa device to open my skill. It tell me "I don't know about that".
I don't understand why, the email address is the same for the Developer Console and for the device. I'm sure that the invocation is correct. I tried to disable and enable the skill from the AlexaApp, but it still doesn't work.
Any ideas? Thank you!
It could be an internal recognition issue from the invocation name.
What I recommend you to do:
Change the invocation name by something very simple ex: Test four
Save the model and Build the model
Try open Test four in the developer console
Try open Test four on the device
If open Test four doesn't work on the device, relogin on the Alexa app with the same email as the developer console and resync the device. Make sure the app is enabled.
If it work with test four it means that the invocation name you choosed previously is not properly recognized by Alexa. You should keep it as simple as possible or ask the support to improve the recognition of it.

alexa The target device does not support the specified directive

I am trying to implement the videoapp-starter template. I ran the following commands :
> ask new --template --url http://skilltemplates.com/templates.json
and
> ask deploy
After deploying the skill I am trying to test from the console. however, I am getting the same error as below. I have not modified the code revived from the template and trying to deploy as is.
The target device does not support the specified directive.
Alexa console error message
There are limitations to the Alexa Simulator, some of the interfaces are not supported.
The Alexa Simulator does not render the video playback, but the Skill I/O section shows the VideoApp directives sent from your skill.
Try it on an actual device. Or check out other ways to test skill.
List of Alexa Simulator Limitations here.

Java Google AppEngine Managed VMs: What logs are obtainable through the Logging API?

I like that I can use the Logs API (described here: https://cloud.google.com/appengine/docs/java/logs/) to programatically access and display app & request logs as I see fit--it's great.
Now that I'm using Managed VMs on AppEngine you can see on the Admin Console Logs Viewer that there are a ton of additional logs--including in my case a custom log which I found I could include in the viewer (decribed here: https://cloud.google.com/appengine/docs/managed-vms/custom-runtimes#logging).
My question is: Is there any way I can use the Logs API (or other pipelines already built?) to access these logs? My Managed VM module includes several components which could produce logs that I want to view:
App logs -- I can get these! No problem here.
Custom log files created by background processes I kick off in _ah/start (like "my_custom_1.log" in the screenshot)
STDERR & STDOUT from my background processes
Relevant Managed VM logs (e.g. for when an instance was restarted due to bad health... other system events like normal restarts?)
Basically I want "the total picture" at the instance level. Anyone tried to tame Managed VMs in this way with success? I'm not looking forward to rolling my own solution. And I wouldn't even know where to start on the problem of capturing STDERR and STDOUT. Any help appreciated.
There is a difference between App Engine logging and Google Cloud logging. Some of the Managed VM logs go to both, but much of it only goes to cloud logging.
Until recently there was not an API to read Cloud logs, only to write them. However, there is a new v2 beta API: https://cloud.google.com/logging/docs/api/introduction_v2
To do things at an instance level, entries in Cloud logging should have metadata set to denote which VM they came from. Both of these values seem to vary on logs from my VMs:
compute.googleapis.com/resource_name
compute.googleapis.com/resource_id

Google App Engine - Console Output

I am running a Java Microengine on GAE.
I have my own html pages for data input and output. When there is a data error and the engine cannot complete its execution (crashes) - the microengine spits out the "Response" as Server not available, please try later.
In order to debug, I run the dataset in the dev environment - as a Java application to identify the error in the console output.
Is there a way to capture the "error" (the console output equivalent when run as a Java application) - as an output string and send it as a content of the servlet response from the deployed Application in GAE..
thanks,
assuming you are using App Engine Managed VM, and a logging framework, you should also forward the log entry into a file, e.g. /var/log/app_engine/custom_logs/app.log
https://cloud.google.com/appengine/docs/managed-vms/custom-runtimes#logging
Subsequently, you'll be able to read the output from Google Cloud Logging.

Registration with Endpoints Server...FAILED! (emulator worked, phone doesn't)

Code generated by Android Studio>tools>Google Cloud Tools> Generate App Engine Backend
and Generate Endpoint worked in the Emulator,
Intent intent = new Intent(this, RegisterActivity.class);
startActivity(intent);
however I got this error (image from another person's question)
http://i.stack.imgur.com/230G2.png
when I load the app onto my phone and run. (I did change the LOCAL_ANDROID_RUN to false)
The error implies that there is some Endpoint server running at http://10.0.2.2:8080
which I don't expect because I don't really understand where the Endpoint Service runs. Does it run locally on the phone or somewhere on the Cloud?
I believe generated App Engine code is shipped up to Google through the Maven appengine:update
What am I missing here, thanks
-a
UPDATE (11:24 AM)
executed:
Android Studio>tools>Google Cloud Tools> Generate Client Libraries
which added to -AppEngine/target/generated-sources/appengine-endpoints etc
This changed what happened on the phone. There is still a registration error but now says:
2) registration with Endpoints Server...FAILED!
Unable to register your device with your Cloud Endpoints server running at https://.appspot.com/_ah/api
UPDATE (11:44 AM)
executed maven script
appengine:update to get the AppEngine deployed with the new code from Generate Client Libraries
same error on phone (unable to register your device with your Cloud Endpoints server)
UPDATE (1:39 pm)
got logcat info while running app on the phone, hooked up through USB to computer,
looks like a 404 Not Found error (???)
12-27 13:36:51.942 609-703/? I/InputDispatcher﹕ Delivering touch to: action: 0x1
12-27 13:36:52.412 19103-19103/sic.example.db7 W/AbstractGoogleClient﹕ Application name is not set. Call Builder#setApplicationName.
12-27 13:36:52.412 19103-19246/sic.example.db7 E/GCMRegistrar﹕ internal error: retry receiver class not set yet
12-27 13:36:53.253 19103-19246/sic.example.db7 E/sic.example.db7.GCMIntentService﹕ Exception received when attempting to register with server at https://core-phoenix-441.appspot.com/_ah/api/
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
Not Found
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1042)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
at sic.example.db7.GCMIntentService.onRegistered(GCMIntentService.java:158)
at com.google.android.gcm.GCMBaseIntentService.handleRegistration(GCMBaseIntentService.java:296)
at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:197)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:61)
the emulator can access because it runs locally, your phone doesn't have access to the computer localhost. To do that you can check Codiak answer.
https://stackoverflow.com/a/16097253/1368396

Resources