Getting Error while updating "enableEmbed": true, - api

Description
When I am trying to update the Allow Embed flag with True("enableEmbed": true) for the live video but am getting Error of
"code": 400,
"message": "Embed setting was invalid",
But when doing "enableEmbed": false it's working fine only issue when making "enableEmbed": true
API request with parameters used
Request URL: https://youtube.googleapis.com/youtube/v3/liveBroadcasts?part=contentDetails&key=AIzaSy...
Parameters
{
"id": "",
"contentDetails": {
"enableEmbed": true,
"monitorStream": {
"enableMonitorStream": true,
"broadcastStreamDelayMs": 5
}
}
}
Result (copy and paste a JSON response you received)
Error on "enableEmbed": true,
{
"error": {
"code": 400,
"message": "Embed setting was invalid",
"errors": [
{
"message": "Embed setting was invalid",
"domain": "youtube.liveBroadcast",
"reason": "invalidEmbedSetting",
"extendedHelp": "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts#contentDetails.enableEmbed"
}
]
}
}
Expected result
{
"kind": "youtube#liveBroadcast",
"etag": "xxxx",
"id": "xxxxx",
"contentDetails": {
"boundStreamId": "xxxxxxxx",
"boundStreamLastUpdateTimeMs": "2022-10-31T21:57:29Z",
"monitorStream": {
"enableMonitorStream": true,
"broadcastStreamDelayMs": 5,
"embedHtml": ""
},
"enableEmbed": true,
"enableDvr": true,
"enableContentEncryption": false,
"startWithSlate": false,
"recordFromStart": true,
"enableClosedCaptions": false,
"closedCaptionsType": "closedCaptionsDisabled",
"enableLowLatency": false,
"latencyPreference": "normal",
"projection": "rectangular",
"enableAutoStart": true,
"enableAutoStop": true
}
}
Is it 100% reproducible?
I am testing with two accounts. On one account same code working fine but on another account it's giving error
Reproducible API explorer link
it's not Reproduciing on Every Account. It's giving error on some particular account don't know what's the issue
Trying to resolve error of "enableEmbed": true, Tried multiple things but no luck looking forward if someone can help on this. Having issue with some particular account not to every account

Related

How does loopback lb4 create the queries shown in the browser?

When I run my react app
I get err msg:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
and the browser line 158
let response = await ftch(url.toString(), options);
in C:...\node_modules\react-admin-lb4\index.js
lb4 generates a query in the webbrowser
{
"offset": 0,
"limit": 100,
"skip": 0,
"order": "string",
"where": {
"additionalProp1": {}
},
"fields": {
"id": true,
"name": true,
"average": true
}
}
I got an error with status code 500 even when I run the query from the browser
then I change the line:
"order": "string",
to:
"order": "",
now I get status code 200, and an array of the data table content
i.e. correct. so far so good.
BUT: I don't know where in the autogenerated *.ts code by lb4 I shall
modify so that it doesn't generate "order": "string",
tried to figure out where / which file is responsible
could not find

Forge - The category 'rfaFile' in '$(rfaFile)' is unrecognized

We are getting an error while executing a WorkItem in Forge's Design Automation API.
The error is this:
Error: The category 'rfaFile' in '$(rfaFile)' is unrecognized. Valid values are args, settings, appbundles, engine, engines.
And it happens right after the 'Start preparing script and command line parameters.' in the report.txt. We are not really sure why's this happening. It looks like the error is thrown in the activity. The activity looks like this:
function publishActivity() {
return $.ajax({
url: "/api/forge/design_automation/activities",
headers: {
"X-CSRF-Token": csrfToken,
"Forge-Token": forgeToken
},
method: "POST",
contentType: "application/json",
data: JSON.stringify({
activity: {
"id": "DeleteWallsActivity",
"commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[rfaFile].path)\" /al \"$(appbundles[TestAppId].path)\"" ],
"parameters": {
"rfaFile": {
"zip": false,
"ondemand": false,
"verb": "get",
"description": "Input Revit model",
"required": true,
"localName": "$(rfaFile)"
},
"result": {
"zip": false,
"ondemand": false,
"verb": "put",
"description": "Results",
"required": true,
"localName": "result.rfa"
},
"inputJson": {
"verb": "get",
"description": "input json",
"localName": "params.json",
"ondemand": false,
"required": false,
"zip": false
}
},
"engine": "Autodesk.Revit+2021",
"appbundles": [ "petar3db.TestAppId+test" ],
"description": "Deletes walls from Revit file."
}
})
}).done(function(data) {
console.log("Activity created");
bundleUploadData = data["uploadParameters"];
}).fail(function(jqXHR, textStatus) {
console.log("Failed to create activity", jqXHR.responseJSON);
console.log(jqXHR, textStatus);
});
}
and it looks like the "localName": "$(rfaFile)" is causing the trouble.
Let's take a look at our WorkItem code which we execute via websockets:
{
"headers": {
"Authorization" : "Bearer <token here>"
},
"action": "post-workitem",
"data": {
"activityId": "petar3db.DeleteWallsActivity+test",
"arguments": {
"rfaFile": {"url": "https://developer.api.autodesk.com/oss/v2/signedresources/da992c60-a3d7-469d-8c3e-d0f089e2e509?region=US", "pathInZip": "emptyfam.rfa"},
"result": {"verb": "put", "url": "https://developer.api.autodesk.com/oss/v2/signedresources/b78151c1-93aa-495f-96c8-183bca26e071?region=US"},
"inputJson": {"localName": "params.json", "url": "the url to the file"}
}
}
}
the really strange part is that this process worked just fine and started throwing this error when we added "inputJson" into the activity and workItem. (We want to send some JSON data to the AppBundle with the WorkItem)
What can be the issue? Are missing something?
As for "localName": "$(rfaFile)", to be noted that if the local name is defined like this, Design Automation will come up a valid name for this argument by its own logic. If you want to fully control the input file, such as accessing it in the addin(Appbundles)'s code, it is recommended to define a "real" localName instead, e.g. "localName": "input.rfa"
In your case above, you may need to:
Remove /i \"$(args[rfaFile].path)\" from commandLine in the Activity
Define "localName": "inputRFA", so the input will be downloaded, unzipped as a folder named as inputRFA. emptyfam.rfa should be under this folder.
Call OpenDocumentFile in the addin to open a Revit file, get document
Call document.LoadFamily(".\inputRFA\emptyfam.rfa", out family); in the adding to open/load rfa file. See this Revit API
There is a mismatch in parameter name in activity with the argument name in workitem. Correct way to post the workitem should be:
{
"headers": {
"Authorization" : "Bearer <token here>"
},
"action": "post-workitem",
"data": {
"activityId": "petar3db.DeleteWallsActivity+test",
"arguments": {
"rfaFile": {"url": "https://developer.api.autodesk.com/oss/v2/signedresources/da992c60-a3d7-469d-8c3e-d0f089e2e509?region=US", "pathInZip": "emptyfam.rfa"},
"result": {"verb": "put", "url": "https://developer.api.autodesk.com/oss/v2/signedresources/b78151c1-93aa-495f-96c8-183bca26e071?region=US"},
"inputJson": {"localName": "params.json", "url": "the url to the file"}
}
}
}
Change the argument field rvtFile to rfaFile.

AppSync request mapping template errors not logged in CloudWatch

Crosspost from: https://repost.aws/questions/QUp5jDZ6bsRkeXhIwHgQaWkg/app-sync-request-mapping-template-errors-not-logged-in-cloud-watch
I have a simple resolver that has a simple Lambda function as a data source. This function always throws an error (to test out logging).
The resolver has request mapping template enabled and it is configured as follows:
$util.error("request mapping error 1")
The API has logging configured to be as verbose as possible yet I cannot see this request mapping error 1 from my CloudWatch logs in RequestMapping log type:
{
"logType": "RequestMapping",
"path": [
"singlePost"
],
"fieldName": "singlePost",
"resolverArn": "xxx",
"requestId": "bab942c6-9ae7-4771-ba45-7911afd262ac",
"context": {
"arguments": {
"id": "123"
},
"stash": {},
"outErrors": []
},
"fieldInError": false,
"errors": [],
"parentType": "Query",
"graphQLAPIId": "xxx"
}
The error is not completely lost because I can see this error in the query response:
{
"data": {
"singlePost": null
},
"errors": [
{
"path": [
"singlePost"
],
"data": null,
"errorType": null,
"errorInfo": null,
"locations": [
{
"line": 2,
"column": 3,
"sourceName": null
}
],
"message": "request mapping error 1"
}
]
}
When I add $util.appendError("append request mapping error 1") to the request mapping template so it looks like this:
$util.appendError("append request mapping error 1")
$util.error("request mapping error 1")
Then the appended error appears in the RequestMapping log type but the errors array is still empty:
{
"logType": "RequestMapping",
"path": [
"singlePost"
],
"fieldName": "singlePost",
"resolverArn": "xxx",
"requestId": "f8eecff9-b211-44b7-8753-6cc6e269c938",
"context": {
"arguments": {
"id": "123"
},
"stash": {},
"outErrors": [
{
"message": "append request mapping error 1"
}
]
},
"fieldInError": false,
"errors": [],
"parentType": "Query",
"graphQLAPIId": "xxx"
}
When I do the same thing with response mapping template then everything works as expected (errors array contains $util.error(message) and outErrors array contains $util.appendError(message) messages.
Is this working as expected so the $util.error(message) will never show up in RequestMapping type CloudWatch logs?
Under what conditions will errors array in RequestMapping log type be populated?
Bonus question: can the errors array contain more than 1 item for either RequestMapping or ResponseMapping log types?

BigQuery: Routine deployment failing with error "Unknown option: description"

We use terraform to deploy BigQuery objects (datasets, tables, routines etc..) to region europe-west2 in GCP. We do this many many times a day and all of a sudden at "2021-08-18T21:15:44.033910202Z" our deployments starting failing when attempting to deploy BigQuery routines. They are all failing with errors of the form:
status: {
code: 3
message: "Unknown option: description"
}
Here is the first log message I can find pertaining to this error (I have redacted project names):
"protoPayload": {
"#type": "type.googleapis.com/google.cloud.audit.AuditLog",
"status": {
"code": 3,
"message": "Unknown option: description"
},
"authenticationInfo": {
"principalEmail": "deployer-dev#myadminproject.iam.gserviceaccount.com",
"serviceAccountDelegationInfo": [
{
"firstPartyPrincipal": {
"principalEmail": "deployer-dev#myadminproject.iam.gserviceaccount.com"
}
}
]
},
"requestMetadata": {
"callerIp": "10.51.0.116",
"callerSuppliedUserAgent": "Terraform/0.14.7 (+https://www.terraform.io) Terraform-Plugin-SDK/2.5.0 terraform-provider-google/3.69.0,gzip(gfe)",
"callerNetwork": "//compute.googleapis.com/projects/myadminproject/global/networks/__unknown__",
"requestAttributes": {},
"destinationAttributes": {}
},
"serviceName": "bigquery.googleapis.com",
"methodName": "google.cloud.bigquery.v2.RoutineService.InsertRoutine",
"authorizationInfo": [
{
"resource": "projects/myproject/datasets/p00003818_dp_model",
"permission": "bigquery.routines.create",
"granted": true,
"resourceAttributes": {}
}
],
"resourceName": "projects/myproject/datasets/p00003818_dp_model/routines/UserProfile_Events_AllCarData_Deployment",
"metadata": {
"routineCreation": {
"routine": {
"routineName": "projects/myproject/datasets/p00003818_dp_model/routines/UserProfile_Events_AllCarData_Deployment"
},
"reason": "ROUTINE_INSERT_REQUEST"
},
"#type": "type.googleapis.com/google.cloud.audit.BigQueryAuditMetadata"
}
},
"insertId": "ak27xdbke",
"resource": {
"type": "bigquery_dataset",
"labels": {
"dataset_id": "p00003818_dp_model",
"project_id": "myproject"
}
},
"timestamp": "2021-08-18T21:15:43.109609Z",
"severity": "ERROR",
"logName": "projects/myproject/logs/cloudaudit.googleapis.com%2Factivity",
"receiveTimestamp": "2021-08-18T21:15:44.033910202Z"
}
The fact that this occurred without any changes by ourselves indicates that this is a problem at the Google end. I also observe that whilst we witnessed this in a few projects it occurred first in one project and then a few minutes later in another - that may or may not be helpful information.
Posting here in case anyone else hits this problem and also hoping it might catch the attention of a googler.
UPDATE! I have reproduced the pproblem using the REST API https://cloud.google.com/bigquery/docs/reference/rest/v2/routines/insert
I have entered a payload that does not include a description and that successfully creates a routine:
However, if I include a description which, as this screenshot indicates, is a valid parameter:
then the request fails:

Update Account (PUT) Endpoint in new Yodlee API for MFA

Background
I am using the newer Yodlee Aggregation API that differs from what I was previously building off of.
I am currently using this endpoint in the account registration flow to put the MFA response:
PUT /{cobrandName}/v1/providers/{providerAccountId}
My request looks like this:
{
url: `${this.rest}providers/${providerAccountId}`,
headers: {
'Authorization': `cobSession=${self.appToken}, userSession=${token}`
},
form: {
'MFAChallenge': JSON.stringify(newMfa)
}
}
where this.rest is my personal rest url, providerAccountId is the appropriate providerAccountId for the refresh, self.appToken is the current cobrand session token, token is the current user's login token, and newMfa is a JSON object being stringified that matches this profile:
{
"loginForm": {
"mfaTimeout": 94650,
"formType": "questionAndAnswer",
"row": [
{
"id": "SQandA--QUESTION_1--Row--1",
"fieldRowChoice": "0001",
"form": "0001",
"label": "What is the name of your state?",
"field": [
{
"id": "SQandA_QUESTION_1_1",
"name": "QUESTION_1",
"isOptional": false,
"value": "Enter the answer",
"valueEditable": true,
"type": "text"
}
]
},
{
"id": "SQandA--QUESTION_2--Row--2",
"fieldRowChoice": "0001",
"form": "0001",
"label": "What is the name of your first school",
"field": [
{
"id": "SQandA_QUESTION_2_2",
"name": "QUESTION_2",
"isOptional": false,
"value": "Enter the answer",
"valueEditable": true,
"type": "text"
}
]
}
]
}
with the exeption being the value fields of the field object, which have been encrypted with PKI as per instructions.
Issue
However, when I carry out this PUT request, I get this error from Yodlee:
{ errorCode: 'Y803',
errorMessage: 'MFAChallenge or providerParam required',
referenceCode: 'p1460412835654A4Q24t' }
though I clearly have an MFAChallenge parameter in my form. Any ideas on why I could be getting this error if the MFAChallenge is present (and note that it is the only info that is passed through the PUT request other than through headers or url parameters)? I tried putting it through as body data, but that doesn't seem to work, and very few of the API endpoints actually seem to use body over form encoded strings, though there was at least one.
You have to send this information MFAChallenge as part of URL, see below example
https://developer.api.yodlee.com/ysl/restserver/v1/providers/10114184?MFAChallenge=%7B%20%22loginForm%22%3A%20%7B%20%20%20%20%20%22mfaTimeout%22%3A%2094650%2C%20%20%20%20%20%22formType%22%3A%20%22questionAndAnswer%22%2C%20%20%20%20%20%22row%22%3A%20%5B%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA--QUESTION_1--Row--1%22%2C%20%20%20%20%20%20%20%20%20%22fieldRowChoice%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22form%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22label%22%3A%20%22What%20is%20the%20name%20of%20your%20state%3F%22%2C%20%20%20%20%20%20%20%20%20%22field%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA_QUESTION_1_1%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22QUESTION_1%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22isOptional%22%3A%20false%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Enter%20the%20answer%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22valueEditable%22%3A%20true%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22text%22%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%5D%20%20%20%20%20%7D%2C%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA--QUESTION_2--Row--2%22%2C%20%20%20%20%20%20%20%20%20%22fieldRowChoice%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22form%22%3A%20%220001%22%2C%20%20%20%20%20%20%20%20%20%22label%22%3A%20%22What%20is%20the%20name%20of%20your%20first%20school%22%2C%20%20%20%20%20%20%20%20%20%22field%22%3A%20%5B%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%22SQandA_QUESTION_2_2%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22name%22%3A%20%22QUESTION_2%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22isOptional%22%3A%20false%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22Enter%20the%20answer%22%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22valueEditable%22%3A%20true%2C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22text%22%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%5D%20%20%20%20%20%7D%20%5D%20%7D