How to solve SocketTimeoutException in ionic 3 - sockets

Problem.
Get a connection error as below in the ionic 3 in HTTP post API call.
Error in detail.
{"status":-4,"error":"Request timed out:java.net.SocketTimeoutException:timeout}

this.http.setRequestTimeout(300);//Time is in seconds here it is 5 minutes you can adjust it.
Add this code before the HTTP post request. This solved my problem.

Related

isomorphic-unfetch 302 response working slow in IE11

I am using next.js and I need to send an AJAX request (I am using isomorphic-unfetch). Some cases the response is with 302 HTTP status code and I need to redirect to the URL that comes in response. For redirecting, I have tried with Router.push(url) and window.location.href=url due is a client redirection.
The problem is that in IE11 appears the error (other browsers works well)
The redirection is done but it takes about 10 seconds. I was googling and found this SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3 that describe a bit my problem but none of the proposed solutions fixed my problem.
Other posts suggest changing the status response but I have no control to the requested endpoint so I can't change anything.
Any ideas on how to solve this?

Cannot verify facebook messenger webhook, curl_errno = 28

i want to configure webhook for facebook application.during the development process i was using ngrock, which was working perfectly, today i cann't establish connection. Address is
https://.........ngrok.io , which works and returns ok
i try to add webhook https://.......ngrok.io/webhook to the facebook application , getting error like this
The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 28; curl_error = Operation timed out after 6001 milliseconds with 0 out of 0 bytes received; HTTP Message = Unknown Response Code
Can you help, what can i do?
I've spend 2 hours to fix it. And final, I find it is a bug :)
Facebook fixed it.

500 Internal Server Error for my facebook app link

I see that this question has been asked before but no solution has been provided.
I am getting nothing but 500 Internal Server Error since yesterday when I use following link:
http://apps.facebook.com/myappID
Yes, I already tried clearing up my cache & cookies so don't even bother asking me this. I have added my app link in the Canvas URL which should show up after I click on the app URL but nothing but that 500 HTTP error. I tried on all browsers and even asked few of my friends too and they said same error.
I thought it was an error on Facebook but I don't see how it's not being fixed for a day now.
Any help? Thank you.
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.
So its a "server-side" error, meaning the problem is not with your PC or Internet connection but instead is a problem with the web site's server.
Maybe you should contact facebook help center.
I just ran into a similar situation and found that when I reduced the limit in my GET call to 20 rather than 500 the server responded well.
https://graph.facebook.com/v2.0/6558867050/posts?limit=20

Facebook error: Encountered an error while processing the request: 502 Error parsing server response. Got EOF while waiting for outstanding responses

Today I started receiving errors from Facebook when my app tries to post a message.
The app successfully authorised, Facebook message window pops up, everything looks fine (links, pics, description) , but when I press post. it times out with this message
Encountered an error while processing the request: 502 Error parsing server response. Got EOF while waiting for outstanding responses Please try resending your request. This is probably not a bug in proxygen. Based on experience, either intern or latest is temporarily down due to a SEV or push. Please check in e FYI or #e first. If the error persists through retries, or if you have good reason to suspect this is a bug in proxygen, please report the issue to ti-bugs#lists or #ti with the following debug information: 2012-05-20 22:24:40 slb010.02.snc5 1585267068836963531
UPDATE: It is a Facebook issue. There is an opened and assigned bug report here You can subscribe there to follow the process.
It looks like Facebook fixed the issue. My apps work fine.
If you still experience the same problem, you can check out the progress here: http://developers.facebook.com/bugs/411849912170144?browse=search_4fb9fb43db2468a28526107
If this issue comes up again check whether there is an already submitted bug here: http://developers.facebook.com/bugs/ if there isn't submit one

Bad Request Piwik

I get this error when I try to call a PIWIK API.
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cookie: piwik_visitor2=1%3DMjQ2NzVkZWQzNWE2NmVmZTg0MDAzYjcxNDVjMWNkYjM%3D%3A2%3....
How can I get ride of this. Piwik is hosted on one of our server. Is there anything to do with Apache config?
By the way, it has been working for quite a while. But it has suddenly stopped working.
Please advise.
Thanks,
Imran
This is a known bug in Piwik, that will be fixed at some point in the future: http://dev.piwik.org/trac/ticket/409
However as per info in the ticket, the team will release a fix to stop causing the error for 1.0, in next weeks probably.