opentok - archiving to AWS folder fails - amazon-s3

I simply call the startArchive / stopArchive methods opentok.
Then I check the AWS folder to see if the files are successfully recorded.
However, for some cases, the JSON created for the archive is not complete, and there is no video file saved at all.
Any idea how to pinpoint the reason for this issue?
Example JSON - a successful one;
"createdAt" : 1494502861651,
"files" : [
{
"connectionData" : "",
"filename" : "xxxx.webm",
"size" : 204288,
"startTimeOffset" : 571,
"stopTimeOffset" : 15469,
"streamId" : "xxxxx-5944-43cd-85ff-1904a54e04ca",
"videoType" : "camera"
}
],
"id" : "1xxxx1-3c75-48dc-b2e5-19714b911967",
"name" : "Shamaleyte",
"sessionId" : "2_MX40NTYwMjxxxx-
MTQ5MzkwNDMzNTg3NX5XUWRxxxxBVjYrUE5DTUZwUzhCNnFwdi9-fg"
}
Example JSON - a broken one; as you can observe, there is no filename, size, and stopTimeOffset parameters in this JSON.
"createdAt" : 1494502861651,
"files" : [
{
"connectionData" : "",
"startTimeOffset" : 571,
"streamId" : "xxxxx-5944-43cd-85ff-1904a54e04ca",
"videoType" : "camera"
}
],
"id" : "1xxxx1-3c75-48dc-b2e5-19714b911967",
"name" : "Shamaleyte",
"sessionId" : "2_MX40NTYwMjxxxx-
MTQ5MzkwNDMzNTg3NX5XUWRxxxxBVjYrUE5DTUZwUzhCNnFwdi9-fg"
}
So it seems like that the stopArchiving somehow fails to upload the webm file because of a reason. How could I debug it?
PS : I checked the opentok UI in order to see the status of the archiving and it says "uploaded" but the weird thing is that the details are as the following;
Length Size
00:00:00 0.00MB
Why so?

This looks identical to a known issue in Opentok platform that should be fixed on our next release, currently just about to be deployed. This should not reproduce once TB next deployment is complete.

Related

Xray- json return empty array - No jira creation

I've created my client_id and secret on Jira and can get a proper Bearer token to communicate to Xray
I've got a return 200 code, but Nothing is created in Jira; why?
Can someone indicate to me what I've missed out
(was able to import the robot test but not JSON, as I would like to integrate Gatling result in Xray)
POST https://xray.cloud.getxray.app/api/v2/import/execution/
{
"testExecutionKey": "DP-12284",
"info" : {
"summary" : "Execution of automated tests for release v1.3",
"description" : "This execution is automatically created when importing execution results from an external source",
"version" : "v1.3",
"user" : "admin",
"revision" : "1.0.42134",
"startDate" : "2014-08-30T11:47:35+01:00",
"finishDate" : "2014-08-30T11:53:00+01:00",
"testPlanKey" : "DP-12272",
"testEnvironments": ["iOS", "Android"]
},
"tests" : [
{
"testKey" : "DP-12271",
"start" : "2014-08-30T11:47:35+01:00",
"finish" : "2014-08-30T11:50:56+01:00",
"comment" : "Successful execution",
"status" : "PASSED"
}
]
}xray.png
enter image description here
enter image description here
doc read: https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2#ImportExecutionResultsRESTv2-XrayJSONresults

Jira API returned Gitlab issue link -> extract more data about the Gitlab issue

When using the Jira API to return issues from a project, there is a JSON field called "customfield_12900" that contains a Gitlab issue link. I presume this is because we have Jira integration with Gitlab. However, the link is not in a valid format to use the Gitlab API to extract data from it.
An example of a URL can be "https://gitlab.gildeskagerak.com/ram/ram-platform/main/-/issues/65
My question is: how can I take the given Gitlab URL and extract data about the given issue? In this case, with ID 65.
Query the Gitlab API with the repository name and go from there
curl "https://gitlab.foo.bar/api/v4/projects/?private_token=xxxxx&search=ram-platform"
and you should get something like
[
{
"path_with_namespace" : "ram/ram-platform",
"web_url" : "https://gitlab.foo.bar/ram/ram-platform",
"path" : "ram-platform",
"service_desk_address" : null,
"operations_access_level" : "enabled",
"issues_enabled" : true,
"readme_url" : null,
"shared_with_groups" : [],
"namespace" : {
"id" : 433,
"kind" : "group",
"name" : "ram-platform",
"full_path" : "ram-platform",
"avatar_url" : null,
"web_url" : "https://gitlab.foo.bar/groups/ram-platform",
"parent_id" : null,
"path" : "ram-platform"
},
...
]
Get your ID from there.

Sony Camera API - Content URL get request 500, malformed URL?

With the latest Sony Camera API, I'm able to get a list of the contents on the memory card. When I'm trying to download the images using a GET request, I'm getting a 500 error without any descriptive error messages.
I believe there might be something wrong with the URL I'm using for the get request.
This is the first result part of the JSON response from getContentList
{ "id" : 12, "result" : [
[
{
"isPlayable" : "false",
"content" : {
"thumbnailUrl" : "http:\/\/192.168.122.1:8080\/contentstransfer\/thumb\/index%3A%2F%2F1000%2F00000001-default%2F00000044-00000AF2_68_1_1000",
"original" : [
{
"stillObject" : "raw",
"url" : "http:\/\/192.168.122.1:8080\/contentstransfer\/orgraw\/index%3A%2F%2F1000%2F00000001-default%2F00000044-00000AF2_68_1_1000",
"fileName" : "_DSC7790.ARW"
}
],
"smallUrl" : "http:\/\/192.168.122.1:8080\/contentstransfer\/vga\/index%3A%2F%2F1000%2F00000001-default%2F00000044-00000AF2_68_1_1000",
"largeUrl" : "http:\/\/192.168.122.1:8080\/contentstransfer\/scn\/index%3A%2F%2F1000%2F00000001-default%2F00000044-00000AF2_68_1_1000"
},
"fileNo" : "7790",
"isBrowsable" : "false",
"isProtected" : "",
"title" : "",
"contentKind" : "still",
"createdTime" : "2017-01-12T13:49:00-08:00",
"folderNo" : "100",
"uri" : "image:content?contentId=index%3A%2F%2F1000%2F00000001-default%2F00000044-00000AF2_68_1_1000"
},
The url is encoded, but when I decode it I'm getting this for the thumbnailUrl:
http://192.168.122.1:8080/contentstransfer/thumb/index://1000/00000001-default/00000043-00000AF0_67_1_1000
Of course that is giving me a 500 error, but I believe the characters after thumb must be some URL for the camera to internally parse. So instead I'm just removing the back slashes to get this:
http://192.168.122.1:8080/contentstransfer/thumb/index%3A%2F%2F1000%2F00000001-default%2F00000043-00000AF0_67_1_1000
This still also gives me a 500 error. I'm not sure how else I'm supposed to use this URL. All the API documentation and references just say do a GET request, but the URL that comes in the JSON is not working.
I can only spoke for me: I want video-data instead of thumbnail-data and I just used the url as given through their "result" JSON-Object and I got no problems. For me this looks like this:
http://192.168.122.1:8080/contentstransfer/org/index%3A%2F%2F1000%2F00000100-default%2F00000047-00000C3D_71_256_1000

Titanium appcelerator reste collection

i use reste library to handle api on titanium appcelerator :
this is my config :
api.config({
debug : true,
autoValidateParams : false,
validatesSecureCertificate : false,
timeout : 4000,
url : Kb.baseUrl,
models: [{
name: "product",
id: "id",
//content: "retArray",
collections: [{
name: "products",
content: "response",
read: "get_products"
}],
}],
methods : [
{
name : "get_products",
post : "api/get_product"
}
],
...
So this how i fetch (works perfectly) :
var p = Alloy.Collections.get_products;
p.fetch({
success:function(m,r){
console.log(r)
}
});
Now i have to past object to post (this not working, why?) :
p.fetch({
data:{'id':'2'},
success:function(m,r){ console.log(r); }
});
This second fetch not working, have you an idea ?
thanks.
In your config you're not specifying what to do with the id parameter. RESTe doesn't know (or care) about your API -- i.e if it's REST / PUT, GET based or POST, GET etc. So you need to tell it.
Change your method to:
{
name : "get_products",
post : "api/get_product/<id>"
}
and it should work fine. The flexibility here allows RESTe to work with APIs that don't conform to the normal REST pattern so if it required say:
"api/get_product?id=<id>"
for example.

auth tokens, local storage and meteor

We are running a web application (shiny-server, where coding is done in R) and want to add an authentication layer to it.
Rather than building something to do this in R, I thought of using meteor to create auth tokens and all that.
This is the way i was thinking of doing it:
A user logs in with meteor and meteor creates a database entry that looks something like this:
{ "createdAt" : 1372521823708,
"_id" : "HSdbPBuYy5wW6FBPL",
"services" : { "password" : { "srp" : { "identity" : "vKpxEzXboBaQsWYyJ",
"salt" : "KRt5HrziG6RDnWN8o",
"verifier" : "8d4b6a5edd21ce710bd08c6affb6fec29a664fbf1f42823d5cb8cbd272cb9b2b3d5faa681948bc955353890f645b940ecdcc9376e88bc3dae77042d14901b5d22abd00d37a2022c32d925bbf839f65e4eb3a006354b918d5c8eadd2216cc2dbe0ce12e0ad90a383636a1327a91db72cf96cd4e672f68544eaea9591f6ed102e1" } },
"resume" : { "loginTokens" : [
{ "token" : "t9Dxkp4ANsYKuAQav",
"when" : 1372521823708 } ] } },
"emails" : [
{ "address" : "example#example.com",
"verified" : false } ] }
The user is redirected to the "old application". Here we check local storage (should be the same local storage as meteor if we use the same outward facing host and port, correct?)
and find this information:
Meteor.loginToken: t9Dxkp4ANsYKuAQav
Meteor.userId: HSdbPBuYy5wW6FBPL
The local storage data is investigated by "the other application" and it does a simple database query against the meteor db to verify that the local storage information matches what is in the database. Perhaps also check some kind of expiration date. If this matches, the application renders, otherwise it doesn't.
Is this a decently safe way to do it? Will it work to share local storage between the applications?
Of course you'll have to make sure that your WebSockets are running over TLS. LocalStorage uses a simple Same-origin Policy. So yes it will work. LocalStorage is as secure as a cookie so that's ok.
TLDR:
Yes and Yes