Having trouble getting my action to work in preview.
After installing the app on gcloud I ran....
./gactions preview -action_package=agent.json -invocation_name="my action"
... and I got...
Pushing action 'my action' for testing...
'my action' is now available for you until 2017-04-08 9:32AM CDT (29 minutes from now)
Try 'gactions simulate', then 'talk to my action', or use the Web Simulator at https://g.co/actionswebsim.
Then I ran...
./gactions simulate
.. and I got...
User TTS (CTRL-C to stop):
Than from the device I got...
Sorry I don't know how to help with that...
And from the web simulator I got....
{
"response": "Sorry, this action is not available in simulation",
"audioResponse": "//NExAASq..."content_copy,
"debugInfo": {
"sharedDebugInfo": [
{
"name": "GOOGLE_SYSTEM_ACTION",
"debugInfo": "Your query is handled by Google’s system actions"
}
]
}
}
Any ideas?
Thanks,
Don
In order for the simulator to invoke your intent, you have to begin with "talk to your invocation name" or "at your invocation name for deep link phrase"
More details here:
https://developers.google.com/actions/distribute/invocation-and-discovery
It works for me.
Just type excatly the following 'talk to my test app'
Related
i'm using a service account to add events to my calendar, 1 month ago it was working with the code below, then after sometime it started to give me the error: 'invalid conference data type', i removed 'conferenceDataVersion' field and it started working again. Now it doesn't work both ways. When i test it from the Calendar API page it works fine with the same parameters, but on my app it's not working.
The event is added succesfully, but no google meets link is created.
I think that maybe i can't create an event of the type "hangoutsMeet" on a service account, while i was testing it worked because i was creating it from the same account. BTW i still can't figure out why it was working fine one month ago, nothing has changed. I was using the exact same configurations and code and i managed to create an event and to add a google meet conference to that evet.
calendar.events.insert( {
"calendarId" : 'primary',
"conferenceDataVersion": 1,
"resource":{
"end": {
"dateTime" : endDate.toISOString(),
'timeZone': 'Europe/Berlin'
},
"start": {
"dateTime" : startDate.toISOString(),
'timeZone': 'Europe/Berlin'
},
"conferenceData": {
"createRequest": {
"requestId": randomstring,
"conferenceSolutionKey": {
"type": "hangoutsMeet"
}
}
}
}
Any help appreciated. Thanks
Here is the scenario:
I'm logging to my application by visiting app.domain/login (example) which will redirect me to something like another.app.domain/
This is working fine. But when I logout: cy.contains('logout').click(), I am getting
CypressError: Timed out after waiting '60000ms' for your remote page to load.
Any suggestions to get around this issue? Ps: I just started to learn Cypress and I want to logout mainly because I want to restore the state back.. I don't want my environment to be updated/modified with the automation scripts. Thanks in advance.
First of all, in cypress there is no AfterAll hook, so we have to use more handmade solution. Second think: if you want to use cypress instead of curl to clean up after test is ok (but I recommend us curl ;)).
First you need to add line to scripts section in package.json:
{
"scripts": {
"after-cypress": "cypress run --spec cypress/hooks/after-all.js",
}
}
File cypress/hooks/after-all.js should looks like this:
describe('clean up after test', () => {
before(() => {
cy.login() // Should we save auth token here?
});
it('', () => {
cy
.request()
.request()
.request() // each of request should delete created during test data
});
});
I would like to use GA for my Ionic 2 app but for hybrid applications it looks a little bit tricky.
In my app.component I have:
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
GoogleAnalytics.debugMode();
GoogleAnalytics.startTrackerWithId(this.config.googleAnalyticsId).then(() => {
console.log(this.TAG + ' ANALYTICS+');
}).catch((err) => {
console.log(this.TAG + ' ANALYTICS- ' + err);
});
GoogleAnalytics.enableUncaughtExceptionReporting(true)
.then((_success) => {
console.log(_success);
}).catch((_error) => {
console.log(_error);
});
...
And got such error log:
I: Google Analytics 10.2.98 is starting up. To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
I: Logger is deprecated. To enable debug logging, please run:
adb shell setprop log.tag.GAv4 DEBUG
W: THREAD WARNING: exec() call to UniversalAnalytics.debugMode blocked the main thread for 57ms. Plugin should use CordovaInterface.getThreadPool().
W: Attempted to send a second callback for ID: UniversalAnalytics549833873
Result was: "Invalid action"
W: Attempted to send a second callback for ID: UniversalAnalytics549833875
Result was: "Invalid action"
I: [INFO:CONSOLE(16)] "Tracker not started", source: file:///android_asset/www/build/main.js (16)
The straightforward goal for me is to collect information about bugs during beta-testing. Because I didn't find enough information about this quite new subject for me, any hints or best practices would be appreciated.
Is there a way to get an export of the store state / actions programmatically in Production that could be imported back into dev tools?
For example I can setup middleware to capture the current state and send that to something like (Trackjs,Sentry, Rollbar) but that lacks all the previous state and actions.
I would like to capture in the same format as exporting from the Redux Dev Tools.
Sample export from Dev Tools
{"monitorState":{},"actionsById":{"0":{"type":"PERFORM_ACTION","action":{"type":"##INIT"},"timestamp":1471017239656},"1":{"type":"PERFORM_ACTION","action":{"type":"INCREMENT"},"timestamp":1471017242004}},"nextActionId":2,"stagedActionIds":[0,1],"skippedActionIds":[],"committedState":5,"currentStateIndex":1,"computedStates":[{"state":5},{"state":6}]}
This is currently in development but you can now push action history right in the extension see https://github.com/zalmoxisus/remotedev-server/pull/20
Another option is to save the actions to a JSON file as an array and import them back in.
That's possible as of https://github.com/zalmoxisus/redux-devtools-extension/issues/173
logger.js
let actions = []
export function logActions (stateSanitizer) {
return store => next => action => {
actions.push(action)
return next(action)
}
}
These actions can be saved to a file or database and can be imported back into the dev tools.
Sample actions
[{
"type": "INCREMENT"
}, {
"type": "DECREMENT"
}, {
"type": "DECREMENT"
}, {
"type": "DECREMENT"
}, {
"type": "DECREMENT"
}]
I created this repo which demos this in action https://github.com/timarney/redux-trackjs-logger it uses middleware to log the actions when an error happens.
I maintain a Redux middleware called Raven for Redux which attaches Redux data to Sentry error reports. Currently it adds the following context to each error report:
The complete state object.
The complete last action object.
The type of all actions that lead up to the current state. These are added as "breadcrumbs".
The Sentry blog has a writeup describing it in more detail: https://blog.sentry.io/2016/08/24/redux-middleware-error-logging.html
You can find the middleware as an NPM package here: https://github.com/captbaritone/raven-for-redux
I'm trying to port my properly working (in iOS, Android) cordova app to Firefoxos.
The simulator starts properly and its browser can load web pages BUT my app cannot load data from the web.
Looking at console I see the following errors:
"JavaScript error: app://aa2a2c24-a8d6-447d-92da-4f2e9af65661/plugins/org.apache.cordova.network-information/src/firefoxos/NetworkProxy.js, line 33: missing : after property id" simulator-process.js:44
"JavaScript error: app://aa2a2c24-a8d6-447d-92da-4f2e9af65661/cordova.js, line 1120: Module org.apache.cordova.network-information.NetworkProxy does not exist."
Any suggestion? Thanks.
Cordova 3.5.0
Simulator FirfeoxOS 1.3 and FirfeoxOS 1.4
After some research I figured out the issues
1- Despite upgrading cordova to 3.5.0 I must remember that plugins don't get automatically update.
To get the plugin code for firefoxos updated I added again the same plugin, removed the firefoxos platform and reinstalled it again.
At that point the javascript errors were gone
2- Then the ajax call were still not accessible due to permissions. To ensure you can have ajax call you have to put in your manifest.webapp the following code
"type": "privileged",
"permissions": {
"systemXHR": { "description": "Required for AJAX calls in app"}
}
Both "type" and "permissions" are needed
3- Finally you have to ensure the ajax calls use
mozSystem: true
Specifically for jquery, you could put something like the following on top of your js file:
if (device.platform == 'firefoxos') {
$.ajaxPrefilter( function( options ) {
if ( options.firefoxOS ) {
options.xhr = function() {
return new window.XMLHttpRequest( {
mozSystem: true
} );
}
}
} );
$.ajaxSetup( {
firefoxOS: true
} );
}
Now I can properly handle ajax calls.