Agora cloud recording is not working. Start and acquire work normally, but I don't get any video files and query and stop return error 404 - agora.io

I have problems with cloud recording. Right now I am testing it with postman. I call acquire, then start, start returns code 200 ok or code 201 created. Then, when I call query or stop they return code 404 not found. Why is this happening and how to fix this? Also, I'm not quite sure if I set correct key and secret key. I am using Azure, I created a storage resource and I have a tab with keys there. I just copied the key from the first key field and pasted it both to key and secret key variables. Am I doing it right or should I use some other keys?

Currently looking into why the stop api call is returning a 404, it's happening across all storage vendor options.

"recordingConfig": {"maxIdleTime": 86400} // - one day
add above line.
By default maxIdleTime set to one minute. Once you start the recording and the recording will be stopped after one minute. so you got 404 status code for both query and stop Api call

Related

ApplePayJS InvalidAccessError

Trying to integrate ApplePayJS into my website and getting this annoying message::
InvalidAccessError Code 15
"The object does not support the operation or argument"
Everything seems to have been going well and now nothing works.
If you get this error, in my experience Safari is now dead to ApplePayJS and you must start by force quitting and reopening it again.
Turns out the reason for me what that the ApplePay API completely craps out if you pass a string instead of an object into the completeMerchantValidation.
If what you return from your server is not JSON object, but a string instead then you can do this:
session.completeMerchantValidation(JSON.parse(merchantSession));
Or better still - fix your server to return a JSON object instead of a string.
Update 4 years later:
I just saw this again today for a real customer as opposed to during my own testing. In this instance the order had succeeded and the customer thought it had failed so attempted to go through the process again.
Oddly it was on this call with the same error "The object does not support the operation or argument."
applePayTokenize.session.completePayment(ApplePaySession.STATUS_SUCCESS);
Since the payment succeeded I've changed my logic to just ignore the exception (for STATUS_SUCCESS only) and proceed to the final page. I don't even know if the ApplePay sheet was still open but even if it was at least when it cancels it will be on the receipt page.
I have also had this issue but with a different reason
Your domain name in the session needs to equal the domain name of your browser. you set the domain name in the backend during in the initiativeContext
https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/requesting_an_apple_pay_payment_session

AWS API Gateway: Error 429 Too many requests

I'm trying to create a backend system with AWS API Gateway and Lambda.
In the past days I created a PUT method for a new API resource, with an API Key as a simple first security step. The PUT method invoke a Lambda function on AWS.
Then I deployed this API to a "prod" stage for some tests.
In the first days everything were working well as expected: I created a call to the API with postman and I received all the data I was expecting.
But a couple of days ago I started to receive always the 429 "Too many requests" response. I created also a new stage, but nothing changed: also the new stage, with the same version or with newer version, is getting always the same error.
The API is not reaching any limit, because they are called 4 or 5 times per day, not per second (checked on CloudWatch). There is no cycle, it is only a single invocation.
I suppose there is no error on the lambda side, because if I test the API in the AWS API Gateway console I get no error (and the lambda was working well in the past, no new changes from that version). The error only shows when I use an external client to test my api (in my case it is Postman).
Can anyone help to solve this problem?
UPDATE: I've just created a POST method on the same resource, with the same parameters and the same lambda. It is working. I wonder if the problem is related to the PUT methods in general or if within 2 days also my POST method will be affected by the same problem.
I had the same problem. I deleted and recreated the deployment. It did work in my case.
Here is a link to errors related to Amazon's API gateway. The last paragraph has additional information on the 429 error you discussed above.
I had the same issue. I created the case in AWS, and they suggested that I implement this dependsOn fix in the template file. Refer: Link
And it worked for me.

UrlFetchApp.fetch stopped working on Monday the 7th after no issues for months with two api's

Any one else see the following problem.
I use zendesk API and pipeline deals api.
code has been in use for 2 months (no issues all working)
As of this week (no changes to the code) both API's fail on post with create calls (Gets work fine and authentication also working fine for both API's).
The execution log shows correct data being encoded example below (removed actual values)
UrlFetchApp.fetch([https://supernahelp.zendesk.com/api/v2/organizations.json, {headers={Authorization=Basic someencodedauthdata, Content-Type=application/json}, method=post, payload={"organization":{"name":"somecustomer","domain_names":"xyc.edu","organization_fields":{"supernauniqueid":"Sup-2308233814","crmdashboard":"someurladdedhere"}}}, muteHttpExceptions=true}])
The payload was passed through JSON.stringify to add to API call and has been working fine for ever.
Error return to from execution log "call to make to ZD {"error":"RecordInvalid","description":"Record validation errors","details":{"name":[{"description":"Name: cannot be blank","error":"BlankValue"}"
Which basically means API could not parse the body correctly for the name value which was sent
I opened case with Zendesk and they got there logs and showed me what they received (not the same record)
only a snippet
{"{\"organization\":{\"name\":\"customer name here \"
I noticed \ added to the payload (not by my code) but this was added by GAS.
AND
Pipeline API has same issue payload Post commands are rejected with bad payload.
Both failed on the same day, and no longer work at all.
this tells me others must have issue with post commands?
looking for help as code worked fine and then stopped and it looks like GAS is adding escape codes out of the blue
Andrew
GAS was broken, seems content type encoding into headers stopped working and moving the content type ad syntax was changed (broke many others scripts as well).
https://code.google.com/p/google-apps-script-issues/issues/detail?id=5585&can=6&colspec=Stars%20Opened%20ID%20Type%20Status%20Summary%20Component%20Owner
Andrew

Use AWS S3 success_action_redirect policy with XHR

I'm using signed POST to upload file directly to amazon S3. I had some trouble with the signature of the policy using PHP but finally fixed it and here is the sample of code.
This xhr request is send in javascript and I'm waiting for an answer from amazon. At first I was using success_action_status setting it to 201 to get the XML response.
What I'd like to do is using the success_action_redirect to call a script on my server to create a record in the database.
The reason why is that I could create the record in the database and if anything wrong happen at this stage I can return an error message directly at this point. Also it saves me another ajax request to my server.
So I've tried to set this up specifying the success_action_redirect to http:\\localhost\callback.php where I have a script that is waiting for some parameters.
But it looks like this script is never called and the response of the xhr.send() is empty.
I think it's a cross-browser issue and I'm wondering if it would be possible to use jsonp somehow to pass-by this?
Any ideas?
UPDATE
Apparently xhr is following redirect natively so it should work but when I specified the success_action_redirect it returns error Server responded with 0 code.
At first I thought it was because the redirect URL was on my local server so I've changed it to an accessible server but no chance.
Anyone knows why it's returning this error message?
I also run into this problem. It seems like nobody has a solution to this like this
maybe the best workaround i have found is something like this.
It seems thet the only workaround includes a second xhr-request to execute the callback manually. therefore the
success_action_status
should be used. Witht his you will get a 201 response if the upload was successful and you can start a second request for the actual callback. For me it looks like the only possible solution at the moment.
Any other solutions?

How to update file upload messages using backbone?

I am uploading multiple files using javascript.
After I upload the files, I need to run several processing functions.
Because of the processing time that is required, I need a UI on the front telling the user the estimated time left of the entire process.
Basically I have 3 functions:
/upload - this is an endpoint for uploading the files
/generate/metadata - this is the next endpoint that should be triggered after /upload
/process - this is the last endpoint. SHould be triggered after /generate/metadata
This is how I expect the screen to look like basically.
Information such as percentage remaining and time left should be displayed.
However, I am unsure whether to allow server to supply the information or I do a hackish estimate solely using javascript.
I would also need to update the screen like telling the user messages such as
"currently uploading"
if I am at function 1.
"Generating metadata" if I am at function 2.
"Processing ..." if I am at function 3.
Function 2 only occurs after the successful completion of 1.
Function 3 only occurs after the successful completion of 2.
I am already using q.js promises to handle some parts of this, but the code has gotten scarily messy.
I recently come across Backbone and it allows structured ways to handle single page app behavior which is what I wanted.
I have no problems with the server-side returning back json responses for success or failure of the endpoints.
I was wondering what would be a good way to implement this function using Backbone.js
You can use a "progress" file or DB entry which stores the state of the backend process. Have your backend process periodically update this file. For example, write this to the file:
{"status": "Generating metadata", "time": "3 mins left"}
After the user submits the files have the frontend start pinging a backend progress function using a simple ajax call and setTimeout. the progress function will simply open this file, grab the JSON-formatted status info, and then update the frontend progress bar.
You'll probably want the ajax call to be attached to your model(s). Have your frontend view watch for changes to the status and update accordingly (e.g. a progress bar).
Long Polling request:
Polling request for updating Backbone Models/Views
Basically when you upload a File you will assign a "FileModel" to every given file. The FileModel will start a long polling request every N seconds, until get the status "complete".