Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

request failure with http statusCode:403,exception:Forbidden #304

Closed
lailalu opened this issue Jul 6, 2016 · 2 comments
Closed

request failure with http statusCode:403,exception:Forbidden #304

lailalu opened this issue Jul 6, 2016 · 2 comments

Comments

@lailalu
Copy link

lailalu commented Jul 6, 2016

Hi,

I get a problem when using paypal android SDK.
The environment is live and I'm sure I add the right cilentID.
The following is adb log.
The strange thing is the android SDK works well in china, but got this error message in India.
I've tried several devices, but all got the same error.

logcat -v time paypal.sdk:V *:S

shell@Q412:/ $ logcat -v time paypal.sdk:V *:S

--------- beginning of system
--------- beginning of main

---- exit ----logcat -v time paypal.sdk:V *:S

shell@E313:/ $ logcat -v time paypal.sdk:V *:S

--------- beginning of system
--------- beginning of main
07-05 12:39:58.832 W/paypal.sdk( 7285): PayPalService created. API:22 PayPalSDK/PayPal-Android-SDK 2.13.3 (Android 5.1; Micromax Micromax E313; )
07-05 12:40:00.465 E/paypal.sdk( 7285): request failure with http statusCode:403,exception:Forbidden
07-05 12:40:00.485 E/paypal.sdk( 7285): Exception parsing server response
07-05 12:40:00.485 E/paypal.sdk( 7285): org.json.JSONException: could not parse:<HTML><HEAD>
07-05 12:40:00.485 E/paypal.sdk( 7285): <TITLE>Access Denied</TITLE>
07-05 12:40:00.485 E/paypal.sdk( 7285): </HEAD><BODY>
07-05 12:40:00.485 E/paypal.sdk( 7285): <H1>Access Denied</H1>
07-05 12:40:00.485 E/paypal.sdk( 7285):  
07-05 12:40:00.485 E/paypal.sdk( 7285): You don't have permission to access "http&#58;&#47;&#47;api&#45;m&#46;paypal&#46;com&#47;v1&#47;oauth2&#47;token" on this server.<P>
07-05 12:40:00.485 E/paypal.sdk( 7285): Reference&#32;&#35;18&#46;5807c7c&#46;1467702600&#46;3359f419
07-05 12:40:00.485 E/paypal.sdk( 7285): </BODY>
07-05 12:40:00.485 E/paypal.sdk( 7285): </HTML>
07-05 12:40:00.485 E/paypal.sdk( 7285): 
07-05 12:40:00.485 E/paypal.sdk( 7285): nextValue:<HTML><HEAD>
07-05 12:40:00.485 E/paypal.sdk( 7285):     at com.paypal.android.sdk.da.m(Unknown Source)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at com.paypal.android.sdk.fv.d(Unknown Source)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at com.paypal.android.sdk.cm.a(Unknown Source)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at com.paypal.android.sdk.cq.a(Unknown Source)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at com.paypal.android.sdk.cu.onResponse(Unknown Source)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
07-05 12:40:00.485 E/paypal.sdk( 7285):     at java.lang.Thread.run(Thread.java:818)
07-05 12:40:00.485 E/paypal.sdk( 7285): request failed with server response:<HTML><HEAD>
07-05 12:40:00.485 E/paypal.sdk( 7285): <TITLE>Access Denied</TITLE>
07-05 12:40:00.485 E/paypal.sdk( 7285): </HEAD><BODY>
07-05 12:40:00.485 E/paypal.sdk( 7285): <H1>Access Denied</H1>
07-05 12:40:00.485 E/paypal.sdk( 7285):  
07-05 12:40:00.485 E/paypal.sdk( 7285): You don't have permission to access "http&#58;&#47;&#47;api&#45;m&#46;paypal&#46;com&#47;v1&#47;oauth2&#47;token" on this server.<P>
07-05 12:40:00.485 E/paypal.sdk( 7285): Reference&#32;&#35;18&#46;5807c7c&#46;1467702600&#46;3359f419
07-05 12:40:00.485 E/paypal.sdk( 7285): </BODY>
07-05 12:40:00.485 E/paypal.sdk( 7285): </HTML>
07-05 12:40:00.486 E/paypal.sdk( 7285): INTERNAL_SERVER_ERROR
07-05 12:40:18.158 E/paypal.sdk( 7285): request failure with http statusCode:403,exception:Forbidden
07-05 12:40:18.159 E/paypal.sdk( 7285): Exception parsing server response
07-05 12:40:18.159 E/paypal.sdk( 7285): org.json.JSONException: could not parse:<HTML><HEAD>
07-05 12:40:18.159 E/paypal.sdk( 7285): <TITLE>Access Denied</TITLE>
07-05 12:40:18.159 E/paypal.sdk( 7285): </HEAD><BODY>
07-05 12:40:18.159 E/paypal.sdk( 7285): <H1>Access Denied</H1>
07-05 12:40:18.159 E/paypal.sdk( 7285):  
07-05 12:40:18.159 E/paypal.sdk( 7285): You don't have permission to access "http&#58;&#47;&#47;api&#45;m&#46;paypal&#46;com&#47;v1&#47;oauth2&#47;token" on this server.<P>
@braebot
Copy link
Contributor

braebot commented Jul 6, 2016

Hmm, this is odd. That error is a webserver error. Are you using a proxy, or have you reconfigured your device hosts somehow? If not, then we'll need to figure out how your request is not getting routed correctly.

@jaypatel512
Copy link
Contributor

Closing this issue based on inactivity. Please re-open if you are still facing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants