I get the following response from the Watson Vision API Explorer, after it churns on my request for about 20 minutes:
{
"X-Backside-Transport": "FAIL FAIL",
"Connection": "Keep-Alive",
"Transfer-Encoding": "chunked",
"Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept, Authorization",
"Access-Control-Allow-Origin": "*",
"Cache-Control": "max-age=0, private, must-revalidate",
"Date": "Fri, 29 Jul 2016 07:39:58 GMT",
"Server": "nginx",
"x-powered-by": "Express",
"x-request-id": "g7bi4ql7pjiiukt62slb19a5oua4lumh",
"X-Vcap-Request-Id": "b53d9197-4d7f-45f5-57c9-7dadf08e60f5",
"x-client-ip": "195.176.20.45",
"X-Global-Transaction-ID": "2915345487"
}
I figure that the request to train a new classifier has Failed ("FAIL FAIL") but can anyone decypher this message as to WHY it has failed?
Any quilified insight are highly welcome !
This is ALL I got, and finally figured that "backside-transport" failed, possibly because the amount of training image data was too large... it is said is has to be < 100MB, I only succeeded when it was < 20MB. Oh well, just a metter of imprecise documentation - and no, there was NO error-code given.
Related
When updating the certificates via the Appengine Admin API I consistently get an unknown error. I've moved to the API explorer (https://developers.google.com/apis-explorer/) to rule out any other errors.
I populate all the fields (appsId, authorizedCertificatesId, updateMask, and patch body) with relevant data.
The Result is a 200 accepted, but an unknown error javascript dialog box is popped as a response. Additionally the new certificate doesn't get utilized.
Actual response
200 OK - Hide headers - cache-control: private content-type: application/json; charset=UTF-8 date: Thu, 20 Jul 2017 10:24:42 GMT server: ESF transfer-encoding: chunked vary: Origin, X-Origin, Referer { "name": "apps/xxx-162220/authorizedCertificates/34643", "id": "34643", "displayName": "Try3", "domainNames": [ "xxx.de", "www.xxx.de" ], "expireTime": "2017-11-18T09:22:00Z", "certificateRawData": { "publicCertificate": "-----BEGIN CERTIFICATE-----\nMIIFDTCCAxxx\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIEkjCCAxxx\n-----END CERTIFICATE-----\n" }}
Is this a bug as it's in beta or is someone able to complete this successfully? The api is appengine.apps.authorizedCertificates.patch
AngularJs $http.post() request is not working properly
I want to store one task to my db. If amount of data in assignedMember is more than 175 it will not send got 404 error but If amount of data in assignedMember is less than 175 it will send success and store my db. Any idea about this. I dont what wrong with me. Please help me thank you
This is my json data
$scope.task=
{
"title": "My Title",
"description": "My Description",
"assignedMember": [
{
"userId": "51b701dae4b0dd92df2c32d1",
"status": "ASSIGNED"
},
{
"userId": "52de0811e4b04615ce7ed6bd",
"status": "ASSIGNED"
},
{
"userId": "559f8e97e4b0a5cdcd66bb76",
"status": "ASSIGNED"
},
.
.
.
.
.
.etc upto 500 data
]
}
This is my post request api
var responsePromise = $http.post("api/tasks",$scope.task);
responsePromise.success(function(data, status, headers, config) {
alert("Data created successfully");
});
responsePromise.error(function(data, status, headers, config) {
alert("Error")
});
If assigned member size is more than 175 or Content Length in browser is greater than 24580 when i send this json i got 404 error
If assigned member size is less than 175 or Content Length in browser is lesser than 10080 when i send this json it will success
If i getting 404 error my browser console is like this
Request header
-------------
Host: localhost
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: application/json, text/plain, /
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
Referer: http://localhost/login.do
Content-Length: 24580
Response header
--------------
Connection: close
Content-Encoding: gzip
Content-Type: text/html
Date: Thu, 15 Dec 2016 14:21:56 GMT
Server: nginx/1.10.1
Transfer-Encoding: chunked
Is it any restriction in my nginx server? Please help me
Post request have no restriction rit? and get request is limited to 2048KB
Actually I am sending via post so what problem i am facing?
Connection: close, I think your server have not accept large count of data.
nginx "fails fast" when the client informs it that it's going to send a body larger than the client_max_body_size by sending a 413 response and closing the connection.
Most clients don't read responses until the entire request body is sent. Because nginx closes the connection, the client sends data to the closed socket, causing a TCP RST.
If your HTTP client supports it, the best way to handle this is to send an Expect: 100-Continue header. Nginx supports this correctly as of 1.2.7, and will reply with a 413 Request Entity Too Large response rather than 100 Continue if Content-Length exceeds the maximum body size.
Referred from
We run a service that synchronizes with Gmail using the REST API. Since last Wednesday, some of our (unchanged) Gmail tests have begun sporadically failing. The cause appears to be on the Gmail REST API side.
One failing test involves creating a label, creating a message, tagging a message with the label, and then renaming the label. When the tests fail, the POST request to change the label name returns a 404 error. A GET on that label or on the label list, either before or after the first 404, will successfully return the label in question. Retrying the POST keeps resulting in a 404 for at least 30 seconds, even with a 5-second gap between retries. Adding a 15-second delay before trying the POST doesn’t help.
Is this a known issue? If so, are there any known workarounds? What can we provide to help diagnose and fix this? We’re using the Google-HTTP-Java-Client/1.22.0 client library.
Here's the request/response from a successful POST:
POST https://www.googleapis.com/gmail/v1/users/me/labels/Label_4311
Accept-Encoding: gzip
Authorization: <Not Logged>
User-Agent: pexlabs Google-API-Java-Client Google-HTTP-Java-Client/1.22.0 (gzip)
x-http-method-override: PATCH
Content-Type: application/json; charset=UTF-8
Content-Encoding: gzip
Content-Length: 38
{"name":"mystery"}
HTTP/1.1 204 No Content
Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32"
Server: GSE
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
ETag: "SJIjOPuAzi7meWvLIr4rJgaI0K4/vyGp6PvFo4RvsFtPoIWeCReyIC8"
Vary: X-Origin
Vary: Origin
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Date: Tue, 20 Sep 2016 15:30:51 GMT
Here's the request/response from a failed POST:
POST https://www.googleapis.com/gmail/v1/users/me/labels/Label_4317
Accept-Encoding: gzip
Authorization: <Not Logged>
User-Agent: pexlabs Google-API-Java-Client Google-HTTP-Java-Client/1.22.0 (gzip)
x-http-method-override: PATCH
Content-Type: application/json; charset=UTF-8
Content-Encoding: gzip
Content-Length: 38
{"name":"mystery"}
HTTP/1.1 404 Not Found
X-Frame-Options: SAMEORIGIN
Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32"
Server: ESF
X-XSS-Protection: 1; mode=block
Content-Length: 1596
Date: Tue, 20 Sep 2016 15:44:08 GMT
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/gmail/v1/users/me/labels/Label_4317</code> was not found on this server. <ins>That’s all we know.</ins>
Looking at a few runs, the Server response header value differs between successes and failures (though that may be by design).
This is a very peculiar error. Patching of labels seem to be broken. I also get Error 404 (Not Found)!!1. What on earth?!
In the mean time your could just get the label data, and then update the fields that can be changed, but just changing the name to your liking:
Request 1
GET https://www.googleapis.com/gmail/v1/users/me/labels/Label_203?access_token={access_token}
Response 1
{
"id": "Label_203",
"name": "test1234",
"messageListVisibility": "show",
"labelListVisibility": "labelShow",
"type": "user",
"messagesTotal": 0,
"messagesUnread": 0,
"threadsTotal": 0,
"threadsUnread": 0
}
Request 2
PUT https://www.googleapis.com/gmail/v1/users/me/labels/Label_203?access_token={access_token}
{
"id": "Label_203",
"labelListVisibility": "labelShow",
"messageListVisibility": "show",
"name": "test12345"
}
Response 2
{
"id": "Label_203",
"name": "test12345",
"messageListVisibility": "show",
"labelListVisibility": "labelShow"
}
Update
The API Explorer does not work for some odd reason. However, if you change from POST to PATCH in your request, it will work:
Request
PATCH https://www.googleapis.com/gmail/v1/users/me/labels/Label_203?access_token={access_token}
{
"name": "wow123"
}
Response
{
"id": "Label_203",
"name": "wow123",
"messageListVisibility": "show",
"labelListVisibility": "labelShow",
"type": "user",
"messagesTotal": 0,
"messagesUnread": 0,
"threadsTotal": 0,
"threadsUnread": 0
}
I've got some Angular code where I am attempting to send a POST to a dev server.
var url = 'http://someDevUrl.com',
data = { 'someKey': 'some value' };
$http.post(url, data);
It sends the OPTIONS preflight request. I can see it hit the server, and the server gives it a happy response.
OPTIONS Response Headers:
HTTP/1.1 200 OK
Server: Cowboy
Date: Mon, 08 Dec 2014 18:20:44 GMT
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 30
Access-Control-Allow-Headers: x-requested-with, content-type, accept, origin, authorization, x-csrftoken
Content-Type: text/html; charset=utf-8
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Via: 1.1 vegur
but then Angular never sends the POST after that...
Typically when $http.post() only sends an OPTIONS request, that means the OPTIONS request returned an error (usually a CORS issue). But in this case, all is fine with the OPTIONS request & response, but it still won't send the POST.
Has anyone seen this before or have an idea of what might be preventing it from sending the POST?
EDIT:
I've got around the issue by adding a Content-Type: text/plain header to the request:
var url = 'http://someDevUrl.com',
data = { 'someKey': 'some value' },
config = {
headers: {
'Content-Type': 'text/plain'
}
}
};
$http.post(url, data, config);
which causes it to skip the OPTIONS preflight, thus avoiding the issue. I'm still curious to know why it was not working in the first place, since there was/is no CORS issue and the OPTIONS request was not sending back an error response.
I know this has been asked time and time again but I cannot seem to fix my issue no matter what solution I try.
I'm trying to create a new user using AngularJS within Ionic. I have set up a small REST server on my localhost along with my testing of the app. So they are on the same server but are just in different folders. Nevertheless, I still need to apply CORS for some reason...
Using the $http method in AngularJS in a service I can do GET requests. However, when I try a PUT, POST or DELETE request I get an OPTIONS error in the console. Below are the settings I have...
API index.php File
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
My UsersSvc
app.factory('UsersSvc', function($http, $location){
return {
/**
* Adds a user to the database
*
* #param user
* #returns {*}
*/
addUser: function(user){
// User Format...
// user.user_email, user.user_password
return $http.post($location.apiUrl + '/credentials/add_user',
{user: user}).
success(function(data){return data});
}
};
});
Rest Server API method (I am using CodeIgniter and using Phil Sturgeon's REST server)
class Credentials extends REST_Controller {
public function add_user_post(){
$user = $this->user_model->add_user($this->post('user'));
if($user){
$this->response($user, 200);
}
else{
$this->response(
ENVIRONMENT == 'development' ? $this->db->last_query(): null,
ENVIRONMENT == 'development' ? 404 : 204
);
}
}
}
The Error in the Chrome Console
OPTIONS http://localhost/z-projects/git-motostatsfree/MotoStats/MotoStatsAPI/credentials/add_user
(index):1 XMLHttpRequest cannot load http://localhost/z-projects/git-motostatsfree/MotoStats/MotoStatsAPI/credentials/add_user. Invalid HTTP status code 404
Request Headers
Accept:*/*
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8,en-GB;q=0.6
Access-Control-Request-Headers:accept, content-type
Access-Control-Request-Method:POST
Cache-Control:no-cache
Connection:keep-alive
Host:localhost
Origin:http://localhost:8100
Pragma:no-cache
Referer:http://localhost:8100/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.65 Safari/537.36
Response Headers
Access-Control-Allow-Headers:Origin, X-Requested-With, content-type, accept
Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Origin:*
Connection:Keep-Alive
Content-Length:42
Content-Type:application/json; charset=utf-8
Date:Thu, 20 Nov 2014 23:04:35 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.4.7 (Unix) PHP/5.5.9 OpenSSL/1.0.1f mod_perl/2.0.8-dev Perl/v5.16.3
Set-Cookie:ci_session=a%3A5%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%22326db0454f2f256da6b6a526ed62cd2d%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A3%3A%22%3A%3A1%22%3Bs%3A10%3A%22user_agent%22%3Bs%3A120%3A%22Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_10_1%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F39.0.2171.65+Safari%2F537.36%22%3Bs%3A13%3A%22last_activity%22%3Bi%3A1416524675%3Bs%3A9%3A%22user_data%22%3Bs%3A0%3A%22%22%3B%7D3a3dfab89040b0df83c80eef434d063f; expires=Fri, 21-Nov-2014 01:04:35 GMT; Max-Age=7200; path=/
X-Powered-By:PHP/5.5.9
Any solution or a nudge in the right direction would be a massive help. I've been working on this for 4 hours already and still cannot figure it out.