why my webtile keeps fetching error when I use a static json file as datasource? - microsoft-band

The json looks like:
{
"status": "ok",
"posts": [{
"id": 0,
"title": "test"
}]
}
and the response header:
Accept-Ranges:bytes
Connection:Keep-Alive
Content-Length:57
Content-Type:application/json
Date:Wed, 16 Sep 2015 00:47:36 GMT
ETag:"39-51fd2713995fd"
Keep-Alive:timeout=5, max=100
Last-Modified:Wed, 16 Sep 2015 00:33:06 GMT
Server:Apache/2.4.16 (Unix) PHP/5.6.13
while my tile keeps showing 'something wrong with the data'
my manifest.json:
https://jsonblob.com/55f8c4a9e4b01190df38996b

Do you have the manifest of the WebTile to share? If so I could take a look at it and see if I can find the problem.
The most likely problem is that the text bindings are incorrectly configured.

Related

Google Developers OAuth 2.0 Playground with Firebase Messaging: error 500, Internal error encountered

I am testing a Firebase Message to my project. I am using the OAuth 2.0 playground to send the payload to the "messages:send" rest API.
However, when sending the request it is returns with "500 internet server error".
I do the same thing on another identical project (with a different project ID naturally) and it works with no problem. Does anyone know why?
I have enabled the API service in Google cloud.
The only difference is that I am logged in to a different Firebase Google account as they are 2 different projects for 2 separate clients.
EDIT: Additional information - this is only occurring when using Tokens generated from the Microsoft Edge browser. User tokens provided through Firefox and Chrome work fine.
HTTP Method: POST
Request URI: https://fcm.googleapis.com/v1/projects/myprojectnamehere/messages:send
Request:
POST /v1/projects/myprojectnamehere/messages:send HTTP/1.1
Host: fcm.googleapis.com
Content-length: 867
Content-type: application/json
Authorization: Bearer yj29.a0AV...........(removed for example code)
{
"message": {
"token": "thetokenId...(removed for example code)",
"data": {
"body":"Body of Your Notification in data",
"title":"Title of Your Notification in data",
"image":"http://image.shutterstock.com/image-vector/sample-stamp-rubber-style-red-260nw-1811246308.jpg",
"icon":"http://image.shutterstock.com/image-vector/sample-stamp-rubber-style-red-260nw-1811246308.jpg",
}
}
}
Response:
HTTP/1.1 500 Internal Server Error
Content-length: 253
X-xss-protection: 0
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: scaffolding on HTTPServer2
-content-encoding: gzip
Cache-control: private
Date: Wed, 24 Aug 2022 14:17:43 GMT
X-frame-options: SAMEORIGIN
Alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-type: application/json; charset=UTF-8
{
"error": {
"status": "INTERNAL",
"message": "Internal error encountered.",
"code": 500,
"details": [
{
"errorCode": "INTERNAL",
"#type": "type.googleapis.com/google.firebase.fcm.v1.FcmError"
}
]
}
}

Google Analytics API call frequently returns expected data but occasionally the same call returns error 500

we have been running Google Analytics(GA) API for several accounts .
It works well for all the accounts except for one which occasionally(not always) fails and returns the error 500.
Regarding the account with the problem, the error 500 started to happen since last year(2020/DEC).
The occurrence of this error(500) shows a tendency to happen when the API CALL is made to fetch reports for periods over 3 days (However the chance of this error for periods shorter than 3 days so far has not been zero.)
Regarding the explanation above↑ the problem seems to be in GA side.
May we ask your assistance to check up the situation and help us to solve the problem.
We deeply appreciate all your help and kindness.
Below, As an example I paste the returned response(error 500) for the API call we made in 2021/JULY/8.
Best regards,
Shahin
I, [2021-07-09T18:11:44.314945 #13000] INFO -- : get https://analytics.googleapis.com/analytics/v3/data/ga?dimensions=ga%3Adate%2Cga%3AadDistributionNetwork%2Cga%3AsourceMedium%2Cga%3AadKeywordMatchType%2Cga%3Akeyword%2Cga%3AadContent%2Cga%3Acampaign&end-date=2021-07-08&ids=ga%3A61390358&max-results=1000&metrics=ga%3Agoal11Completions%2Cga%3Agoal12Completions%2Cga%3Agoal13Completions%2Cga%3Agoal14Completions%2Cga%3Agoal15Completions%2Cga%3Agoal16Completions%2Cga%3Agoal17Completions%2Cga%3Agoal18Completions%2Cga%3Agoal19Completions%2Cga%3Agoal20Completions&samplingLevel=HIGHER_PRECISION&start-date=2021-07-04&start-index=2001
D, [2021-07-09T18:11:48.813256 #13000] DEBUG -- request: User-Agent: "analytics/v3 google-api-ruby-client/0.8.6 Linux/2.6.32-431.el6.x86_64\n (gzip)"
Accept-Encoding: "gzip"
Content-Type: ""
Authorization: "Bearer ya29.a0ARrdaM9m7nl7eZ40UtyNPMLo-quMyknO5gC6d60ucF2zhN3WgO_YcsHtldGyqpjuTsHUJAFurvcC3cryutiB2U2P_Wf-gM6DtnhkAqEjoPfCKwsWeuz8wrFgXfa7M3QknRcFDFrWO0CNrEKeDG7caf0B1R49Rws"
Cache-Control: "no-store"
D, [2021-07-09T18:11:48.813315 #13000] DEBUG -- request:
I, [2021-07-09T18:12:48.790970 #13000] INFO -- Status: 500
D, [2021-07-09T18:12:48.791044 #13000] DEBUG -- response: vary: "Origin, X-Origin, Referer"
content-type: "application/json; charset=UTF-8"
date: "Fri, 09 Jul 2021 09:12:48 GMT"
server: "ESF"
cache-control: "private"
x-xss-protection: "0"
x-frame-options: "SAMEORIGIN"
x-content-type-options: "nosniff"
alt-svc: "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
connection: "close"
transfer-encoding: "chunked"
D, [2021-07-09T18:12:48.791065 #13000] DEBUG -- response: {
"error": {
"code": 500,
"message": "There was an internal error.",
"errors": [
{
"message": "There was an internal error.",
"domain": "global",
"reason": "internalError"
}
]
}
}

Google Calendar API returns a rate limit exceeded error during batch processing

Following my previous question ... I changed the Google Calendar API call to batch, but some requests in the batch return a 403 - rateLimitExceeded "Rate Limit Exceeded" error. There is always a maximum of 50 requests of the same type in the batch, most often PATCH. But errors occur even if the batch contains less than 10 requests. On average, only about 50% of all requests are successful.
Example request (part with one reguest):
--googlebatch_20200513_171515_647
Content-Type: application/http
Content-ID: <item:0>
PATCH /calendar/v3/calendars/XXX/YYY
Content-Type: application/json
Content-Length: 449
{
"summary": "Opakovaná aktivita 2",
"description": "",
"id": "XXX",
"start": { "dateTime": "2020-05-07T09:00:00+02:00" },
"end": { "dateTime": "2020-05-07T09:30:00+02:00" },
"location": "",
"visibility": "default",
"reminders": {"useDefault": false},
"transparency": "opaque",
"extendedProperties": {
"private": {
"X-QIID": "29037717,10",
"X-QISyncOn": "1"
}
}
}
...
next requests
...
--googlebatch_20200513_171515_647--
Example response:
--batch_preSx1sqdvk_AAP51GVWcoo
Content-Type: application/http
Content-ID: <response-item:0>
HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=UTF-8
Date: Mon, 13 May 2020 15:15:16 GMT
Expires: Mon, 13 May 2020 15:15:16 GMT
Cache-Control: private, max-age=0
Content-Length: 199
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "rateLimitExceeded",
"message": "Rate Limit Exceeded"
}
],
"code": 403,
"message": "Rate Limit Exceeded"
}
}
--batch_preSx1sqdvk_AAP51GVWcoo--
I don't understand why the Google API returns this error, because when I send a batch request, I just send the batch and the execution of individual requests is controlled by Google itself. So I have no way to influence the speed of their launch. If batch execution is too fast, why doesn't Google slow it down and complete all requests successfully?
What else could I do? Where could be the mistake? What do you recommend me?
Thank you. Regards, Petr.
There are known issues with the Calendar API throwing 403 error sooner than expected when using a service account
The workaround would be using impersonation, that is to make the service-account act on behalf of a user. This allows to avoid the 403 errors.
See here for code samples.

How to specify the correct USER_ID in analyticsreporting.userActivity.search?

I am trying to retrieve data linked to USER_ID by analyticsreporting.userActivity.search of Analytics Reporting API v4 using Google APIs Explorer.
But, when I make a Request body according to the official sample, the result that USER_ID does not exist is returned.
The Request sent and the Response returned are below.
(ViewID was omitted.)
POST https://analyticsreporting.googleapis.com/v4/userActivity:search?key={YOUR_API_KEY}
{
"viewId": "(Omitted)",
"user": {
"type": "USER_ID",
"userId": "28"
},
"dateRange": {
"startDate": "2019-05-20",
"endDate": "2019-05-26"
}
}
400
- Hide headers -
cache-control: private
content-encoding: gzip
content-length: 114
content-type: application/json; charset=UTF-8
date: Mon, 27 May 2019 11:14:44 GMT
server: ESF
vary: Origin, X-Origin, Referer
{
"error": {
"code": 400,
"message": "USER_ID: 28 not found.",
"status": "INVALID_ARGUMENT"
}
}
The specified USER_ID uses a User-ID value that can be verified in the Google Analytics User Explorer.
I tried to specify numbers such as 1 or 2 and other IDs displayed in User Explorer for the value of USER_ID, but the result was the same.
And I deleted the dateRange but the result was the same.
As with changing the ViewID, the error message is changed to "No permission to view", so the ViewID is not a problem.
Please tell me the correct specification method of USER_ID.
thank you.

Language detection always returns 1 result

I'm having troubles with getting Language Detection to work. According to the documentation on Microsoft's website I should be able to get multiple languages when the service is not sure about which language the input string was. However, I am always receiving only one language. In my example below I used "Hallo" which is "Hello" in both German and Dutch. Also with other words like "Bier" which is "Beer" in German and Dutch, the service gives only one result, despite the numberOfLanguages Query parameter value of 5.
Am I missing something?
Is the service malfunctioning?
Can someone provide an example which delivers multiple languages as a result?
Thank you for all your help.
Request:
POST https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/languages?numberOfLanguagesToDetect=5 HTTP/1.1
Content-Type: application/json
Host: westus.api.cognitive.microsoft.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
{
"documents": [
{
"id": "Test",
"text": "Hallo"
}
]
}
With this response:
Transfer-Encoding: chunked
x-ms-transaction-count: 0
x-aml-ta-request-id: 4bb2e01e-59a1-4f66-bb31-8ca2c32d262b
X-Content-Type-Options: nosniff
apim-request-id: 65a8d5f5-1394-43cf-89e1-83d7188cb81a
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Date: Tue, 25 Apr 2017 15:18:34 GMT
Content-Type: application/json; charset=utf-8
{
"documents": [
{
"id": "Test",
"detectedLanguages": [
{
"name": "German",
"iso6391Name": "de",
"score": 1.0
}
]
}
],
"errors": []
}
The documentation has been updated to explain this.
numberOfLanguagesToDetect: Format - int32. (Optional. Deprecated) Number of languages to detect. Set to 1 by default. Irrespective of
the value, the language with the highest score is returned.

Resources