I get this error while retrofit want to get information from Api
but when I use VPN this error is gone
hi want Without VPN retrofit cant get information
how I can resolve this problem
this is my code
Related
I'm developing an application with authentication, and i need to provide a appropriate status code if there is any error when registering an user, for example a database-related error.
I've been researching but i haven't found an appropriate status code.
The purpose of all HTTP errors is to communicate the operation failed. To pick the right HTTP error, you need to know why it failed.
"database-related error" sounds like a server-side bug or problem, so this is likely just a 500.
While posting form data in nativescript-angular, I am getting below error
originalStack: Error: java.net.ConnectException: Connection refused\n at new ZoneAwareError
can any one help me?
NativeScript's Http Client doesn't support FormData. You will have to either use JSON request Or use nativescript-http-formdata plugin to send data.
tns plugin add nativescript-http-formdata
Note: If you use the plugin, you would loose the luxury of using Angular's HttpClient & features like interceptors etc.,
I followed the sound experience guideline to set up environment and authorization. When I try to get a new access token, this error keeps popping up. I wasn't sure what it means. I'm following exactly the same step as the guide, This is the error:-
An error occurred while processing your request.
Reference #97.6d06d217.1539357275.34c5f2e
I am creating an object in parse (using back4app parse server for this).
I get the following error when I run the choreo in temboo.
A HTTP Error has occurred: The remote server responded with a status
code of 401. Typically this indicates that an authorization error
occurred while attempting to access the remote resource. The data
returned from the remote server was: {"error":"unauthorized"} . The
error occurred in the HTTPSend (Parse) step.
That 401 error might indicate that the Id or Keys are not correct. Maybe it could be a good idea to double check them.
Also, what is the host and path for the API Request that you're doing with Temboo (I'm not acquainted with it)? If you're not using the correct ones it might cause problems too.
Make sure you're reaching something like this:
https://parseapi.back4app.com/classes/Your_Class_Name
Within the last few weeks a suite of our applications using Google's Oauth2 authentication system and the Apache Oltu library have stopped working.
All attempts to register or log in via Google meet with the same error:
Login/registration action failed: java.io.IOException: Attempted read from closed stream.
This was all working fine recently and we have made no code or application changes in the intervening time.
Has something changed at the Google end which is causing all these requests to fail?
I do no seem to have any logging or information available from my Google developer console.
Within my application the log entries indicate an attempt to authenticate which does not succeed.
The code which is now failing, which used to succeed is:
// obtain a AuthRequest message to be sent to the OpenID provider
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationLocation(discovery.getAuthzEndpoint())
.setClientId(Oauth2Util.getClientId())
.setRedirectURI(responseURL)
.setResponseType(ResponseType.CODE.toString())
.setScope(GOOGLE_SCOPE)
.setState(state)
.buildQueryMessage();
response.sendRedirect(oauthRequest.getLocationUri());
which triggers an exception:
java.io.IOException: Attempted read from closed stream.
all advice gratefully received
Google retired OpenID 2.0 on 20th April. See http://googledevelopers.blogspot.co.uk/2015/03/reminder-to-migrate-to-oauth-20-or.html
ok, I think i have understood what's going on. It is related to the OpenID retirement, but somewhat obliquely
In my code:
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationLocation(discovery.getAuthzEndpoint())
is using an internal 'discovery' module which is trying to source information in a way which has been deprecated as part of the turn off of OpenID
the preferred Oltu way appears to be
OAuthClientRequest oauthRequest = OAuthClientRequest
.authorizationProvider(OAuthProviderType.GOOGLE)
which works much better
rtm: https://cwiki.apache.org/confluence/display/OLTU/OAuth+2.0+Client+Quickstart