Kurento Media Server Throwing " Unexpected error while processing method: Factory 'PlayerEndPoint'' not found" - json-rpc

I am Very new to Kurento. I went through its json-rpc documentation from this link.
http://www.kurento.org/docs/5.0.3/mastering/kurento_protocol.html
1) I have installed a local kurento server which runs on the port 8888.
2) I used a tool called wscat to establish a connection to the kurento-websocket.
3) I tried to connect to the kurento-server with below command
wscat -c ws://localhost:8888/kurento
After that i got the connected prompt from the server.
From the above kurento protocol documentation link. I have used the below request json
{
"jsonrpc": "2.0",
"id": 1,
"method": "create",
"params": {
"type": "PlayerEndPoint",
"creationParams": {
"pipeline": "6829986",
"uri": "http://host/app/video.mp4"
},
"sessionId": "c93e5bf0-4fd0-4888-9411-765ff5d89b93"
}
}
But according to the docs the response which i should get after sending this request is like this.
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"value": "442352747",
"sessionId": "c93e5bf0-4fd0-4888-9411-765ff5d89b93"
}
}
But i am getting
{
"error":
{"code":-32603,
"message":"Unexpected error while processing method: Factory PlayerEndPoint not found"
},
"id":1,
"jsonrpc":"2.0"
}
If i am not wrong the above request-json is used to create a new media pipeline for player end point which is used to stream http://host/app/video.mp4.
Is there any problem in my request-json object or do i have to do something before giving this request.
please help me.

You have several problems. The first is that PlayerEndpoint is not correctly spelled (note the lower case "p" PlayerEnd-p-oint). The second is that you need to first to create a MediaPipeline before you can create a PlayerEndpoint or any other media element.
If you are new to Kurento, my recommendation is that you should try to use the official Kurento client implementations (currently available in Java and JavaScript). If you want to create your very own Kurento client, you'll need to read carefully the documentation because there are a lot of details you'll need to manage (e.g. the distributed garbage collector, the WebSocket reconnection mechanisms, etc.)

Related

Create GitHub service connection using azure rest api giving error

I am trying to create GitHub service connection using azure Devops rest api -
In postman I put following Json Body-
{
"name": "release-1",
"type": "github",
"url": "https://github.com",
"authorization": {
"scheme": "PersonalAccessToken",
"parameters": {
"accessToken": "<Github_Personal_Access_Token>"
}
}
}
This Creates service connection but It gives error when I open service connection in UI and try to verify but if I edit and replace with same Github token In UI then it works. seems like its not taking token I am providing in Json body -
I also see information here on this ongoing issue - https://ljvmiranda921.github.io/notebook/2019/12/28/workaround-azure-github-pat/
I want to automate GitHub service connection creation.
How to create GitHub service connection using Azure Devops rest api ?
How to create GitHub service connection using Azure Devops rest api ?
Are you creating this GitHub service connection?
If so, you should use EndPoints-Create API and your Json Body can follow this format:
{
"authorization": {
"scheme": "Token",
"parameters": {"AccessToken": "YourGitHubPAT"}
},
"data": {},
"description": "",
"name": "YourServiceConnectionName",
"serviceEndpointProjectReferences": [{
"description": "",
"name": "YourServiceConnectionName",
"projectReference": {
"id": "YourProjectID",
"name": "YourProjectName"
}
}],
"type": "github",
"url": "https://github.com",
"isShared": false
}
We should enter the value of YourGitHubPAT, YourServiceConnectionName(twice in two points), YourProjectID and YourProjectName with your own values to make the body work. We can get YourProjectID via Projects-List API.
After running that in PostMan, I can verify it successfully without issues. I guess your issue may have something to do with your parameters. Use
"authorization": {
"scheme": "Token",
"parameters": {"AccessToken": "<Github_Personal_Access_Token>"}
},
Instead of
"authorization": {
"scheme": "PersonalAccessToken",
"parameters": {"accessToken": "<Github_Personal_Access_Token>"}
Update about how to enable grant access to all pipelines:
Dislike other elements like Token, Name and Description, Grant Access Permissions to all pipelines option is managed by another API.
API to enable this option:
https://dev.azure.com/{YourOrganizationName}/{YourProjectName}/_apis/pipelines/pipelinePermissions/endpoint/{YourEndPointID}?api-version=5.1-preview.1
Body:
{
"resource": {
"id": "YourEndPointID",
"type": "endpoint",
"name": ""
},
"pipelines": [],
"allPipelines": {
"authorized": true,
"authorizedBy": null,
"authorizedOn": null
}
}
Note: We need to enter EnterPointID in URL and Body. (Twice!)
In PostMan, you should use PATCH method and application/json type. The YourEndPointID is ServiceConnectionID, you can get this value from EndPoints-Create API's response.
So normally to create a service connection with "Grant Access to All..." enabled, we should run Endpoints-Create first and then run the second API to enable this option.
(And this is the same behavior in Web Portal. When we click Verify and Save button in web browser, it actually also calls these two APIs to complete the process.)

Send file using Axios Assyst REST API

Working in Blue Prism .Net environment utilising the HTTP utility to make calls to Axios Assyst (an IT service desk 3rd party software).
My HTTP request is as per below:
POST /assystREST/v2/site/10/attachments/binary HTTP/1.1
Host: <myserver>:<myport>
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary<base64 encode here>
Accept: application/json
Authorization: Basic <base64 encoded key>
{
"eventId": 10010045,
"fileName": "C:\Users\Me\Desktop\MyFile.msg",
"attachment": "data:;base64,<base64 encoded file>
"onBehalfOfUser": "MR ROBOT",
"custom": {},
"attachedByUserId": <my ID>,
"name": "C:\Users\Me\Desktop\MyFile.msg",
"event":{
"assystRESTType": "event",
"assystRESTXMLType": "eventDto",
"id": 10010045
},
"attachedByUser":{
"assystRESTType": "assystUser",
"assystRESTXMLType": "assystUserDto",
"name": "Mr Robot - Test",
"id": <my ID>,
"shortCode": "MR ROBOT"
}
}
I can create and close my tickets but unable to send/save files to my newly created tickets. I get a HTTP STATUS CODE 410-GONE and the below exception JSON response:
{
"type": "NotFoundException",
"message": "The requested resource is not available.",
"messageKey": "rest.exceptions.NotFoundException",
"diagnostic": "Could not find resource for relative : /site/10/attachments/binary of full path: http://server:port/assystREST/v2/site/10/attachments/binary"
}
I'm following the instructions and guidelines noted in the official Axios Assyst Web Service wiki(per the below link), i.e. I'm using multipart/form-data while sending the file, a .msg file, and the binary of said file (yes I know this adds 33% more to the file size): https://wiki.axiossystems.com/assyst10SP75Wiki/index.php/Integrations:assystREST#Attachments
My issue is that 400 status codes would denote an issue on the client side but I've checked internally re firewall/port being used and nothing is being blocked.
I've reasearched 410 status codes and it would seem that the issue is server side but one that the server is not willing to elaborate on.
For testing I'm using Postman as it allows for greater flexibility rather than using Blue Prism, the JSON response is the same.
Looking for some guidance re status code 410 and possible solutions, note I've limited scope re options due to Blue Prisms .net vbo's.

S4HC Extensibility: SCBO_AUTHORIZATION/000: You are not authorized to create instance

I developed a side-by-side app using Java + SAP Cloud SDK (Neo). The app adds records to a custom business object.
The app was working fine when I concluded development in February. Now, I need to do some additional improvements, but I can add records anymore.
I am getting the error SCBO_AUTHORIZATION/000 - You are not authorized to create XXXXXXX instance.
I assigned CBO to a business role, the custom communication scenario along with communication arrangement is in place. I tested already the service (metadata) and the user is not locked.
HereĀ“s the error sent back from the backend:
2020 05 27 19:36:55#+00#ERROR#com.sap.cloud.extensibility.services.CockpitServiceImp##PHENRIQUE#https-jsse-nio-8041-exec-8#na#fzrl99axqb#csccapplication2#web#fzrl99axqb#na#na#na#na#Error building up cockpit. com.sap.cloud.sdk.s4hana.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 400.
You're not authorized to create CSCCOCKPIT instance.
Full error message:
{
"error": {
"code": "SCBO_AUTHORIZATION/000",
"message": {
"lang": "en",
"value": "You\\u0027re not authorized to create CSCCOCKPIT instance."
},
"innererror": {
"application": {
"component_id": "BC-ESI-ESF-GW",
"service_namespace": "/SAP/",
"service_id": "YY1_CSCCOCKPIT_CDS",
"service_version": "0001"
},
"transactionid": "338BDCAE69170270E005EC3E361F2498",
"timestamp": "20200527193655.5607910",
"Error_Resolution": {
"SAP_Transaction": "For backend administrators: use ADT feed reader \\"SAP Gateway Error Log\\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
"SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
},
"errordetails": [
{
"code": "SCBO_AUTHORIZATION/000",
"message": "You\\u0027re not authorized to create CSCCOCKPIT instance.",
"propertyref": "",
"severity": "error",
"transition": true,
"target": ""
}
]
}
}
}
Could someone give a clue on where could the issue be?
BR,
Pietro
The error happened because all the fields in the custom business object in S/4Hana Cloud were set as "read-only".

Alexa Skill Won't Play My Streaming Audio

I've been banging my head against the wall on this one for 2 days, and will post the resolution in the hopes it helps someone in the past. I created an Alexa skill to stream a radio station, and just couldn't get it to play, even using the sample code. Finally I just hardcoded the values sent down the wire, and it still didn't work. Here's what I was sending:
{
"version": "1.0",
"response": {
"shouldEndSession": 1,
"response": {
"outputSpeech": {
"text": "Playing Somgwriters island",
"type": "PlainText"
},
"directives": [
{
"playBehavior": "REPLACE_ALL",
"audioItem": {
"stream": {
"url": "http://la2-ssd.myautodj.com:8198/stream.mp3",
"token": "",
"offsetInMilliseconds": 0
}
},
"type": "AudioPlayer.Play"
}
],
"reprompt": {},
"card": {}
}
},
"sessionAttributes": {},
"statusCode": "200"
}
I finally found the cause in their documentation:
audioItem.stream.url:
Identifies the location of audio content at a remote HTTPS location.
The audio file must be hosted at an Internet-accessible HTTPS endpoint. HTTPS is required, and the domain hosting the files must present a valid, trusted SSL certificate. Self-signed certificates cannot be used. Many content hosting services provide this. For example, you could host your files at a service such as Amazon Simple Storage Service (Amazon S3) (an Amazon Web Services offering).

How to update HP Fortify 'Processing Rules' via REST

I've read the documentation, and I get the REST API GET URL...
http://localhost:8080/ssc/api/v1/projectVersions/6/resultProcessingRules
To work and return a list of the 'Profile - Processing Rules' for my application (via ID 6).
e.g.
"data": [
{
"displayName": "Require approval if the Build Project is different between scans",
"identifier": "com.fortify.manager.BLL.processingrules.BuildProjectProcessingRule",
"enabled": true,
"displayable": true
}
What I can't get to work is the PUT command to set this from 'enabled=true' to 'enabled=false'
I get back the same error message each time...
{
"message": "An unexpected error occurred accessing resource of type Project Version Result Processing Rules.",
"responseCode": 500,
"errorCode": -20010
}
And the log just says...
2016-11-27 23:24:40,076 [ERROR] com.fortify.server.platform.endpoints.rest.ProjectVersionResultProcessingRulesController - ApiGeneralResourceException: &apos;An unexpected error occurred accessing resource of type Project Version Result Processing Rules.&apos; [url: /ssc/api/v1/projectVersions/6/resultProcessingRules]
2016-11-27 23:24:40,077 [WARN] org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver - Handler execution resulted in exception: java.lang.String cannot be cast to java.util.List
Can anyone tell me what the correct payload should be for this command?
Using Postman, I got this to work:
Here are the headers I used
Authorization = FortifyToken A13D...E2
Content-Type = application/json
Accept = application/json
And here is the body:
[
{
"displayName": "Require approval if the Build Project is different between scans",
"identifier": "com.fortify.manager.BLL.processingrules.BuildProjectProcessingRule",
"enabled": true,
"displayable": true
}
]
NOTE
The trick I have used when trying to figure out who to call the REST API is to perform the action through the HTML5 UI while looking at the traffic (Fiddler, the browser's dev tools, etc). Then looking at the requests that it sends. The HTML5 interface uses the REST API under the hood.