gaction test caller has no permission - raspberry-pi3

I am trying to setup custom commands on my raspberry pi 3 with google assistant SDK. I was following this guide to setup my custom command. Whenever I run gactions test ti would get the following error:
Pushing the app for the Assistant for testing...
ERROR: Failed to test the app for the Assistant
ERROR: The caller does not have permission
2019/05/16 17:50:23 Server did not return HTTP 200
I have used gactions update to upload my action definition json file, with the google account that owns the Google Action project, and it was updated successfully. Therefore I'm not sure why I would have no permission on a project I owned and with a successfully updated action json.
There is the json I had for my custom action.
{
"manifest": {
"displayName": "DJ Roomba",
"invocationName": "DJ Roomba",
"category": "PRODUCTIVITY"
},
"actions": [
{
"description": "Thanos Snap",
"name": "djroomba.name.ThanosSnap",
"availability": {
"deviceClasses": [
{
"assistantSdkDevice": {}
}
]
},
"fulfillment": {
"staticFulfillment": {
"templatedResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "You should have gone for the head"
}
},
{
"deviceExecution": {
"command": "action.devices.commands.ThanosSnap"
}
}
]
}
}
},
"intent": {
"name": "djroomba.intent.ThanosSnap",
"trigger": {
"queryPatterns": [
"Thanos snap"
]
}
}
}
],
"locale": "en"
}
I'm not sure if this will help, but I'm using Raspbian Jessie(since snowboy only supports up to that)

So, it turns out to be that I'll have to at least publish my action in alpha or beta version, otherwise the gactions test will not work

Related

Sharing app content to stage - Insufficient RSC permission

sharing the content of our app hasn't worked for a week.
Using the Teams WebApp we are getting the following errors in the developer console:
CID[main] ShareExtensibleAppButtonContainer: Installed app is undefined or doesn't have authorization
Insufficient RSC permission for appId:'XXXXXXX' with isChannelMeeting: false
it worked last month, and nothing was changed from our side.
I tried to set the following permissions, but it has had no effect.
"authorization": {
"permissions": {
"orgWide": [],
"resourceSpecific": [
{
"name": "MeetingStage.Write.Chat",
"type": "Delegated"
},
{
"name": "ChannelMeetingStage.Write.Group",
"type": "Delegated"
}
]
}
}
could anyone help me to get it working?
Thank you

Is there a list of events for when Heroku runs scripts?

I find the documentation at - https://devcenter.heroku.com/articles/app-json-schema#scripts - is poor. It doesn't list all of the different events which can be hooked into to run scripts. I want to run a script for when the app is first created and another with each release. The first is objective is already achieved with a script with runs on the "postdeploy" event. I can't see anything though to help with the second. If using a procfile I know I just specify the "release" process type but I'm trying to do this with an app.json file so I believe the procfile is not relevant.
Does anybody know how I can do what I want? Even better the whereabouts of this explained on Heroku.
At the moment I have this for my app.json -
{
"name": "accounts",
"success_url": "/users/signup",
"addons": [
{
"plan": "heroku-postgresql:hobby-dev"
}
],
"env": {
"NEW_USERS_ARE_SUPERUSERS": "0"
},
"formation": {
"web": {
"quantity": 1,
"size": "free",
"command": "gunicorn proj.wsgi"
}
},
"buildpacks": [
{
"url": "heroku/python"
}
],
"scripts": {
"postdeploy": "psql -c \"create extension pg_trgm\" $DATABASE_URL && ./bin/setup.sh"
}
}
Can I just add a "release" key to the "scripts" dictionary? I saw somewhere somebody had "heroky-postbuild" but that didn't seem to work when I tried it.

Github v4 GraphQL API - access Marketplace App results (Travis CI)

We are using Travis CI to run tests for one of our repositories on Github.
When looking at the list of commits, we see green check-marks or red crosses, indicating the status of our tests.
Now I'm experimenting with the Github v4 GraphQL API.
I can browse the API (using GraphiQL and GraphiQL-explorer), but I cannot find the results of the Travis tests anywhere.
Can I use the Github GraphQL API to get the Travis results and how?
When requesting the last commit or a list of commit (with history) you can access status object which has a state property :
{
repository(owner: "bertrandmartel", name: "metec-braille-driver") {
refs(first: 100, refPrefix: "refs/heads/") {
nodes {
target {
... on Commit {
status {
state
contexts {
description
createdAt
state
}
}
history(first: 100) {
nodes {
message
status {
state
contexts {
description
createdAt
state
}
}
}
}
}
}
}
}
}
}
which has the following result :
....
"status": {
"state": "FAILURE",
"contexts": [
{
"description": "AppVeyor build failed",
"createdAt": "2020-03-09T02:31:19Z",
"state": "FAILURE"
},
{
"description": "The Travis CI build passed",
"createdAt": "2020-03-09T02:31:42Z",
"state": "SUCCESS"
}
]
},
....
Also from the v3 doc:
The state of the status. Can be one of error, failure, pending, or
success

Update Azure Event Grid function subscription with dead-letter storage

I have successfully created an event trigger on storage blob creation, on a storage account called receivingtestwesteurope, under resource group omni-test, which is received via a function called ValidateMetadata. I created this via the portal GUI. However I now want to add deadletter/retry policies, which can only be done via the CLI.
The working trigger is like this:
{
"destination": {
"endpointBaseUrl": "https://omnireceivingprocesstest.azurewebsites.net/admin/extensions/EventGridExtensionConfig",
"endpointType": "WebHook",
"endpointUrl": null
},
"filter": {
"includedEventTypes": [
"Microsoft.Storage.BlobCreated"
],
"isSubjectCaseSensitive": null,
"subjectBeginsWith": "/blobServices/default/containers/snapshots/blobs/",
"subjectEndsWith": ".png"
},
"id": "/subscriptions/fa6409ab-1234-1234-1234-85dd2b3ceab4/resourceGroups/omni-test/providers/Microsoft.Storage/StorageAccounts/receivingtestwesteurope/providers/Microsoft.EventGrid/eventSubscriptions/png",
"labels": [
""
],
"name": "png",
"provisioningState": "Succeeded",
"resourceGroup": "omni-test",
"topic": "/subscriptions/fa6409ab-1234-1234-1234-85dd2b3ceab4/resourceGroups/omni-test/providers/microsoft.storage/storageaccounts/receivingtestwesteurope",
"type": "Microsoft.EventGrid/eventSubscriptions"
}
First I thought I could update the existing event with a deadletter queue:
az eventgrid event-subscription update --name png --deadletter-endpoint receivingtestwesteurope/blobServices/default/containers/eventgrid
Which returns:
az: error: unrecognized arguments: --deadletter-endpoint
receivingtestwesteurope/blobServices/default/containers/eventgrid
Then I tried via REST Patch:
https://learn.microsoft.com/en-us/rest/api/eventgrid/eventsubscriptions/update
scope: /subscriptions/fa6409ab-1234-1234-1234-85dd2b3ceab4/resourceGroups/omni-test/providers/microsoft.storage/storageaccounts/receivingtestwesteurope
eventSubscriptionName: png
api-version: 2018-05-01-preview
Body:
"deadletterdestination": {
"endpointType": "StorageBlob",
"properties": {
"blobContainerName": "eventgrid",
"resourceId": "/subscriptions/fa6409ab-1234-1234-1234-85dd2b3ceab4/resourceGroups/omni-test/providers/microsoft.storage/storageaccounts/receivingtestwesteurope"
}}
Which returns
"Model state is invalid."
===================
Final working solution:
{
"deadletterdestination": {
"endpointType": "StorageBlob",
"properties": {
"blobContainerName": "eventgrid",
"resourceId": "/subscriptions/fa6409ab-1234-1234-1234-85dd2b3ceab4/resourceGroups/omni-test/providers/microsoft.storage/storageaccounts/receivingtestwesteurope"
}
}
}
have a look at Manage Event Grid delivery settings, where in details is described turning-on a dead-lettering. Note, you have to install an eventgrid extension
az extension add --name eventgrid
also, you can use a REST API for updating your event subscription for dead-lettering.
besides that, I have just released my tinny tool Azure Event Grid Tester for helping with an Azure Event Grid model on the local machine.
Update:
The following is a deadletterdestination property:
"deadletterdestination": {
"endpointType": "StorageBlob",
"properties": {
"blobContainerName": "{containerName}",
"resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resgroup}/providers/Microsoft.Storage/storageAccounts/{storageAccount}"
}
}
you can use the Event Subscriptions - Update (REST API PATCH) with the above property. Note, that the api-version=2018-05-01-preview must be used.

Parse.com - send Push notification with objectId from Installation as parameter

I'm trying to use the Parse.com API.
I want to send a push notification to a spesific device by
using the objectId in _Installation.
This is the parameter I'm sending in my POST:
{
"data":
{
"alert":"Message to send"
},
"where":
{
"user":
{
"__type":"Pointer",
"className":"_Installation",
"objectId":"GfdbNwJhr6"
}
}
}
The response returns:
{
"result": true
}
However I do not get any notification on my device...
Also I've tried changing "user":"_type" to "installation":"_type"
Still doesn't work...
Nvm, found the solution:
{
"data":
{
"alert": "321213", "sound": "", "badge": "Increment"
},
"where":
{
"objectId": "GfdbNwJhr6"
}
}

Resources