Is cardova mysqlite db.transaction api is synchronous or async? - android-sqlite

I am using the cardova mysqlite APIs for the usage in ionic. After connecting to the db, am calling db.transaction(insertDB, errorCB, successCB); Is this call a synchronous or async call? I have a log message in insertDB which gets logged after the log which I have written after this statement. Please help me if any of you have faced the same issue.

Related

is it possible to remove one user DatabaseReference when user disconnect

While I use .onDisconnect() I tried to then use remove() to delete a DatabaseReference, to remove the user from waiting room from database,
here is my code example:
lastOnlineRef
.onDisconnect()
.set(ServerValue.timestamp)
.then(firebaseController.removeThisRoom());
but it seems after onDisconnect() nothing can be sent to the server, do we have a better solution for this? thanks a lot!
The onDisconnect handler (set(ServerValue.timestamp)) runs when the client is no longer connected to the server, so there is no way for the server to notify the client at that point that it has completed the write operation.

Authentication context not auditing success event

I use keycloak to reset a user's password through a custom flow.
The flow works for resetting the password and logging/auditing error events.
But the context.success() doesn't log events in EVENT_ENTITY. I tried changing the event type to try and find the root cause using
context.getEvent().event(EventType.SEND_RESET_PASSWORD_ERROR); // for eg. context.success();
I am not sure what the problem is, or fail to understand what is different from setting a success and error.
I found the issue and it was me missing a call to send the event on success.
on error on context.getEvent().error(..) which call EventBuilder.send() internally. I had to use context.getEvent().sucess() to save the event on success.

Google actions fails to read error response and end the session smoothly

I have an actions project built and working. I'm trying to handle some error scenarios where it is failing. I need some help there.
I have a scenario where the webhook call throws a proper JSON formatted error response as shown below but which couldn't not be read at google end. Not sure if that is google actions limitation. Because of this issue I couldn't trigger a webhook handler back to my server to end the open conversation smoothly.
{
“responseJson”: {
“error”: {
“message”: “Transaction cancelled: maximum execution time exceeded”,
“detail”: “Transaction cancelled: ****”
},
“status”: “failure”
}
}
In the Error & status handling of actions scenes I dont see any system intent other than Cancel to handle any such error scenarios, I don't see any other relevant system intents too.
In simple words, I'm trying to catch a bad response and trigger back a webhook call to end the conversation at server side.
Could someone suggest a way to deal with this issue?

How can I make a proper facebook payment in unity3d webGL?

I am trying to make unity webgl game. I'm currently working with my own python django server. But there's few problems I am confronting right now.
First, when client completes the payment behavior, it repeatedly shows javascript error. Here's the error code:
Invoking error handler due to
Uncaught abort(219) at Error
at jsStackTrace (lottery.wasm.framework.unityweb:8:22313)
at stackTrace [Object.stackTrace] (lottery.wasm.framework.unityweb:8:22484)
at Object.onAbort (https:/lottery-server.ntucorp.com/static/game/Build/UnityLoader.js:4:11047)
at abort ('lottery.wasm.framework.unityweb:8:521824')
at wasm-function[62206]:0x1143303
at wasm-function[25973]:0x9c45e6
at wasm-function[61403]:0x111d42f
at wasm-function[27992]:0xa2a9df
at wasm-function[50781]:0xeabcd7
at wasm-function[35699]:0xba8a56
at wasm-function[35698]:0xba8997
at wasm-function[35744]:0xbaa780
at wasm-function[26171]:0x9c9232
at wasm-function[35758]:0xbab0e3
at wasm-function[26171]:0x9c9232
at wasm-function[35768]:0xbab37e
at wasm-function[23663]:0x9815d2
at wasm-function[61943]:0x11424be
at dynCall_iiiii [Object.dynCall_iiiii] (lottery.wasm.framework.unityweb:8:494571)
at invoke_iiiii (lottery.wasm.framework.unityweb:8:362010)
at wasm-function[59810]:0x10db82f
at wasm-function[59101]:0x10b9e40
at wasm-function[4047]:0x197f91
at wasm-function[4046]:0x197ebf
at wasm-function[7537]:0x2c346b
at wasm-function[7534]:0x2c283b
at wasm-function[11356]:0x483dc2
at wasm-function[9973]:0x3cab31
at blob:https:/lottery-server.ntucorp.com/d6308b13-98d3-4a85-abfd-0c7db365fcfd:8:438788
at ccall [Object.ccall] (lottery.wasm.framework.unityweb:8:16382)
at SendMessage (lottery.wasm.framework.unityweb:8:9099)
at sendMessage [Object.sendMessage] (lottery.wasm.framework.unityweb:8:48724)
at uiCallback (lottery.wasm.framework.unityweb:8:50342)
at a.__wrapper.a.__wrapper (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:93:765)
at Object.cb (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:145:4420)
at c (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:145:10332)
at a.c.read (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:125:737)
at a._processor (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:127:283)
at a.b.enqueue (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:126:711)
at Object.u [as onMessage] (https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:143:2477)
at https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:136:2925
at https:/connect.facebook.net/en_US/sdk.js?hash=11641b2e4a5fab828e74fff5f206cf37&ua=modern_es6:50:208'''
I'm using Unity Facebook SDK, so in unity c# script I call this function.
FB.Canvas.Pay(
product_url,
quantity:1,
callback:ProductCallback
);
And, anyway it gives callback function back, and the response of this callback is this.
PayResponse:{"callback_id":"4","response":{"payment_id":1794879660642720,"amount":"2.99","currency":"USD","quantity":"1","request_id":"","status":"initiated","signed_request":"r4_00GLFbodYSMVeVGfFcfuzIr1HQKd9EYiO_OM0eXM.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImFtb3VudCI6IjIuOTkiLCJjdXJyZW5jeSI6IlVTRCIsImlzc3VlZF9hdCI6MTU3ODA0MzI2OCwicGF5bWVudF9pZCI6MTc5NDg3OTY2MDY0MjcyMCwicXVhbnRpdHkiOiIxIiwicmVxdWVzdF9pZCI6IiIsInN0YXR1cyI6ImluaXRpYXRlZCJ9"}}
And secondly I cannot make Facebook Unity SDK workable, which is FB.Canvas.PayWithProductID. It just don't work, It just omits javascript error (UnityLoader.js error which is similar to one which I already mentioned), and also it do not give callback.
Also In document, https://developers.facebook.com/docs/games_payments/payments_lite?locale=ko_KR In here it says proper code would be FB.PayWithProductID, but Facebook SDK does not have any FB.PayWithProductID. All it have is FB**.Canvas.**PayWithProductID.
How can I get proper callback from facebook? I cannot get any kind of callback parameters. All I recieve is that the fact facebook called my callback url, not containing any GET parameters. I just return request.GET.get('hub.challenge'), but anyway it is still None.
Why does it happen? please help.
This is a very broad question as it includes so much into this. I would recommend connecting your project to API and then call Facebooks API to take payments. Here is the documentation: https://developers.facebook.com/docs/graph-api/reference/v5.0/payment
I am only saying this because there is not a lot of context here as to how and where you're calling the payment method from. Are you already doing this from an API? or are you trying achieve this from the engine itself?
Here is an extremely useful guide on how you can call an API from unity:
https://www.red-gate.com/simple-talk/dotnet/c-programming/calling-restful-apis-unity3d/
I would highly recommend you do this API side as it safer than doing it through the engine, if that's what you are doing.

Live SDK - server_internal_error - message - An error occurred while retrieving the resource. Try again later

Currently it looks like the lice SDK returns error 500 for all request. Also the interactive SDK Microsoft provides here returns the same error:
http://isdk.dev.live.com/dev/isdk/ISDK.aspx?category=scenarioGroup_core_concepts&index=1
My application work without any changes for over 24 months. Has someone any more details or a workaround?
Update: I tried the following API calls both with the same result:
https://apis.live.net/v5.0/me?access_token=#Token#
https://apis.live.net/v5.0/me/picture?access_token=#Token#
Finally, and after a very long downtime (more than 20 hours) the Live API is up & running again.
Unfortunately, there is not even an official announcement from Microsoft.
Up & Running
Have the same problem and all of my apps worked before for very long time.
I'm using LiveSDK 5.6 and getting successful response for LiveAuthClient.LoginAsync with the following scopes: "wl.signin", "wl.basic", "wl.contacts_photos", "wl.contacts_skydrive",
"wl.skydrive_update"
LoginAsync returns LiveLoginResult object where:
Status = Connected
Session = {Microsoft.Live.LiveConnectSession} with AccessToken
but when app trying to call
Session (LiveConnectClient) object with GetAsync ("/me")
I'm getting the following exception
[Microsoft.Live.LiveConnectException] = {"An error occurred while retrieving the resource. Try again later."}
ErrorCode = "server_internal_error"
The OneDrive service experienced a service outage on the 9th, you can see from this 3rd party site for an idea of the timeline. We did not communicate this issue well to you and other developers that have come to expect excellence from OneDrive.
It is the start of a long weekend and I do not have more answers for you at this time, I'll circle back next week with better details on what to do in the future.
The Live Connect API that the LiveSDK works in conjunction with has been replaced by the OneDrive API, which also has SDKs for most major platforms. You will see major performance improvements and a larger feature set such as a modern sync API available for you with this new API if you transition to it.