When creating a broadcast using Youtube api, the youtube api return error.
But in youtube studio was able to check embbed video
The problem is when set attribute setEnableEmbed to true
LiveBroadcastContentDetails contentDetails = liveBroadcast.getContentDetails();
contentDetails.setEnableDvr(updateLiveDTO.isCreateVideoOnDemand());
contentDetails.setEnableEmbed(Boolean.TRUE);
POST https://www.googleapis.com/youtube/v3/liveBroadcasts?part=snippet,contentDetails,status
{
"code" : 400,
"errors" : [ {
"domain" : "youtube.liveBroadcast",
"message" : "Embed setting was invalid",
"reason" : "invalidEmbedSetting",
"extendedHelp" : "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts#contentDetails.enableEmbed"
} ],
"message" : "Embed setting was invalid"
}
Related
I am currently creating a passcard for my app but unfortunately, it is not working. Passcard is not showing in the simulator when dragging it or event downloading it from my email. My pass.json codes are below.
"formatVersion" : 1,
"passTypeIdentifier" : "pass.com.example",
"serialNumber" : "0000000",
"teamIdentifier" : "xxxxxxxx",
"barcode" : {
"message" : "123456789",
"format" : "PKBarcodeFormatPDF417",
"messageEncoding" : "iso-8859-1",
},
"organizationName" : "companyname",
"description" : "companytagline",
"logoText" : "companyname",
"foregroundColor" : "rgb(255,255,255)",
"backgroundColor": "rgb(0,100,0)",
"generic" : {
"auxiliaryFields" : [
{
"key" : "patientName",
"label" : "NAME",
"value" : "Retail Pharmacy 1, Test Patient"
},
{
"key" : "gender",
"label" : "GENDER",
"value" : "Female"
}
],
}
}
This is what I have in my Terminal
hopprlabs-iMac:Desktop developer1$ ./signpass -p healthpass.raw/
2019-02-19 10:10:39.483 signpass[2096:231781] {
".DS_Store" = df2fbeb1400acda0909a32c1cf6bf492f1121e07;
"Icon.png" = 295cb779e5e185efefd6c5e9a2a94c3352e51b2a;
"Icon#2x.png" = 987db966ddc28a72d6bfd15a6565d191be06d0f0;
"pass.json" = 3e66cf17f758939547932654c3394e42470d1c94;
"thumbnail.png" = 2a616d4490d1e12d81ddb0610df6b992ad79aeca;
}
Thanks for emailing that through. Having looked at the package, it seems there is a problem with your icon file.
The iPhone reports this error like this:
Invalid data error reading pass pass.com./0000000. Pass does not contain icon.png/icon#2x.png/icon#3x.png
I suggest making your icon file names lower case, so icon.png instead of Icon.png.
I would also include the #3x size file too.
I am using elasticsearch 6.1 and I am trying to add a basic synonym filter to my settings following this doc : https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html
Here is my code :
curl -XPUT 'localhost:9200/test_index?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"index" : {
"analysis" : {
"analyzer" : {
"search_synonyms" : {
"type": "custom",
"tokenizer" : "keyword",
"filter" : ["lowercase","synonyms"]
}
},
"filter" : {
"synonyms" : {
"type" : "synonym",
"synonyms_path" : "analysis/synonyms.txt"
}
}
}
}
}
}'
And I get the following error message :
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "IOException while reading synonyms_path_path: /usr/share/elasticsearch/config/analysis/synonyms.txt"
}
],
"type" : "illegal_argument_exception",
"reason" : "IOException while reading synonyms_path_path: /usr/share/elasticsearch/config/analysis/synonyms.txt",
"caused_by" : {
"type" : "no_such_file_exception",
"reason" : "/usr/share/elasticsearch/config/analysis/synonyms.txt"
}
},
"status" : 400
}
I believe the issue comes from the "... reading synonyms_path_path:" which should probably be just "... reading synonyms_path:".
However, I believe I respected all features as mentioned in the doc.
Moreover, if I try just to put :
"filter" : {
"synonyms" : {
"type" : "synonym",
"synonyms" : "analysis/synonyms.txt"
}
}
It just does not read the file then...
My synonyms.txt is the exact same file as shown in the doc for solr format.
Any thoughts or suggestion on how to fix this?
Thank you very much in advance for you time.
By using the following command on file, I fixed the error message :
sudo chmod 777 synonyms.txt
But the analyzer still does not recognize the synonyms present in the file.
Indeed synonyms.txt contains : i-pod, i pod => ipod
And if I try :
curl -XGET 'localhost:9200/test_index/_analyze?pretty' -H 'Content-Type: application/json' -d'
{
"analyzer": "search_synonyms",
"text": "i pod"
}'
I get :
{
"tokens" : [
{
"token" : "i pod",
"start_offset" : 0,
"end_offset" : 5,
"type" : "word",
"position" : 0
}
]
}
Problem not yet entirely solved, but getting there :).
"filter" : {
"synonyms" : {
"type" : "synonym",
"synonyms" : "synonyms.txt"
}
}
Try this. It worked for me.
Little late, but I had the same issue with docker, as Aurelien Quillet pointed out.
You probably need something like
services:
elasticsearch_container:
volumes:
- ${APPLICATION}/config/packages/synonyms.txt:/usr/share/elasticsearch/config/synonyms.txt
In my case ${APPLICATION}/config/packages/synonyms.txt is the path in my project code.
The path shown in the error (/usr/share/elasticsearch/config/synonyms.txt) is the path in my elasticsearch container.
I am attempting to add Implementation Notes and Description to my Swagger UI. However, neither show up on the UI when implemented as below:
{
"swagger" : "2.0",
"info" : {
"description" : "The definition of the Rest API to service plugin over https on port 9443.",
"version" : "1.0",
"title" : "Plugin Rest API",
"contact" : {
"name" : "John Doe",
"email" : "john.doe#gmail.com"
}
},
"basePath" : "/service",
"tags" : [ {
"name" : "service"
} ],
"schemes" : [ "https" ],
"paths" : {
"/entry" : {
"get" : {
"notes" : "This is a note",
"method" : "get",
"tags" : [ "service" ],
"summary" : "Get an entry by first name and last name",
"description" : "This is a description",
"operationId" : "getEntry",
"produces" : [ "application/xml", "application/json" ],
"parameters" : [ {
"name" : "first",
"in" : "query",
"description" : "The first name",
"required" : true,
"type" : "string"
}, {
"name" : "last",
"in" : "query",
"description" : "The last name",
"required" : true,
"type" : "string"
} ],
"responses" : {
"200" : {
"description" : "Matching entry, or entries, if any, were returned",
"schema" : {
"$ref" : "#/definitions/Service"
}
}
}
},
I am not sure what I am doing wrong in my code. I've tested it on various sample swagger.json files and I cannot seem to get it to work.
notes is not a swagger field. See the documentation
Your description field is written twice, so the first one has been overridden.
you can add implementation notes using notes tag in #ApiOperation annotation as shown below,
#ApiOperation(notes = "Your Implementation Notes will show here[![enter image description here][1]][1]", value = "Add Customer Payment Details and Generate Payment Link through Batch.", nickname = "insertPaymentBatch", tags =
"Insert Payment" )
I have created own CAS server and client. Both of them are located on localhost.
I have added following json service definition:
{
"#class" : "org.jasig.cas.services.RegexRegisteredService",
"serviceId":"^(https?|imaps?)://.*",
"name" : "localhost",
"theme" : "localhost",
"id" : 1,
"description" : "localhost test CAS client",
"proxyPolicy" : {
"allowedToProxy": true,
"#class" : "org.jasig.cas.services.RefuseRegisteredServiceProxyPolicy"
},
"evaluationOrder" : 1,
"usernameAttributeProvider" : {
"#class" : "org.jasig.cas.services.DefaultRegisteredServiceUsernameProvider"
},
"logoutType" : "BACK_CHANNEL",
"attributeReleasePolicy" : {
"#class" : "org.jasig.cas.services.ReturnAllowedAttributeReleasePolicy",
"principalAttributesRepository" : {
"#class" : "org.jasig.cas.authentication.principal.DefaultPrincipalAttributesRepository"
},
"authorizedToReleaseCredentialPassword" : false,
"authorizedToReleaseProxyGrantingTicket" : false
},
"accessStrategy" : {
"#class" : "org.jasig.cas.services.DefaultRegisteredServiceAccessStrategy",
"enabled" : true,
"ssoEnabled" : true
}
}
but I continuously getting a following exception:
17:43:23.513 [http-nio-8443-exec-2] DEBUG o.j.c.c.v.Cas20ProxyTicketValidator - Server response:
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationFailure code='UNAUTHORIZED_SERVICE_PROXY'>
The supplied service 'https://localhost:8443/cas-sample/login/cas' is not authorized to use CAS proxy authentication.
</cas:authenticationFailure>
</cas:serviceResponse>
17:43:23.515 [http-nio-8443-exec-2] DEBUG o.s.s.c.web.CasAuthenticationFilter - Authentication request failed: org.springframework.security.authentication.BadCredentialsException:
The supplied service 'https://localhost:8443/cas-sample/login/cas' is not authorized to use CAS proxy authentication.
What can be wrong with my config ?
I got it working by changing policy class to :
"proxyPolicy" : {
"#class" : "org.jasig.cas.services.RegexMatchingRegisteredServiceProxyPolicy",
"pattern" : "^https://.+"
}
My app implements GCM, but the notifications only receive by topics and not by specific token app.
This it's a example:
{
"registration_ids" : ["dh"],
"content_available" : true,
"priority": "high",
"notification" : {
"body" : "Winter is coming!",
"title" : "John Snow"
}
}
The response:
{
"multicast_id":000000,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "InternalServerError"
}
]
}
But the device receives the notifications while they was sent by topics.
2015-09-16 22:54:50.931 ExamplePush[1622:379584] Notification received:
{
"collapse_key" = "do_not_collapse";
from = "/topics/global";
message = "{\"id\":102}";
}
Please see this:
Postman 1
Postman 2
You need to add parameter "to" into your request in order to get notification and look at the gcm document as well for more information.
{
"to" : " mh7PX-ODCIE:APA91bEdBMCxTJ45SEcCWRyCfzkkZ74YnJl0q0-J8zgIdcZySgR3wu46RXwBHmSzscI6AuI9inYT145C5j30UPMD7soDKRgTGbrcdgZPUahm_Ik-oIUKoUSLLzGNXBeNqnWKDhpHlBfn",
"content_available" : true,
"priority": "high",
"notification" : {
"body" : "Winter is coming!",
"title" : "John Snow"
}
}
are you checking on postman
If not then try to check in postman
By this url and append the parameters.
https://gcm-http.googleapis.com/gcm/send
set the header also with your api key of gcm.