TheoBong / Store

An in-game substitute for a webstore with fully dynamic Menus and easy-to-use interface.
MIT License
7 stars 2 forks source link

Client Authentication failed error #2

Open Psykrot opened 2 years ago

Psykrot commented 2 years ago

Getting a "Client Authentication failed" error on a Minecraft 1.18.2 (Purpur) server whenever I try to click an item to purchase I double checked my credentials that were created with the app and they seem to be correct.

Console output I ***'d out my UUID because I didn't think it was necessary to post it. ```[01:19:46] [Server thread/INFO]: Psykrot issued server command: /store [01:19:46] [Server thread/WARN]: [Store] Loaded class me.clip.placeholderapi.PlaceholderAPI from PlaceholderAPI v2.11.1 which is not a depend or softdepend of this plugin. [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: com.paypal.http.exceptions.HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"} [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.parseResponse(HttpClient.java:200) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.execute(HttpClient.java:98) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.core.AuthorizationProvider.fetchAccessToken(AuthorizationProvider.java:55) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.core.AuthorizationProvider.authorize(AuthorizationProvider.java:35) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.core.PayPalHttpClient.signRequest(PayPalHttpClient.java:40) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.execute(HttpClient.java:93) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at Store.jar//io.github.paypal.DepositHandler.lambda$createDepositOrder$0(DepositHandler.java:63) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] New deposit! [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] UUID: *** [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] Item: MVP+ [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] Cost: $25 [01:20:03] [Craft Scheduler Thread - 34 - Store/INFO]: [Store] Total: $26.46 [01:20:03] [Craft Scheduler Thread - 34 - Store/WARN]: [Store] Plugin Store vgit-Store-627204f generated an exception while executing task 7624 java.lang.NullPointerException: Cannot invoke "com.paypal.http.HttpResponse.result()" because "finalRepsonse" is null at io.github.paypal.DepositHandler.lambda$createDepositOrder$0(DepositHandler.java:77) ~[Store.jar:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1609] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1609] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1609] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?] [01:20:43] [Server thread/INFO]: Psykrot issued server command: /timer [01:20:48] [Server thread/INFO]: Psykrot issued server command: /timer:expiration [01:20:52] [Server thread/INFO]: Psykrot issued server command: /cancel [01:20:59] [Server thread/INFO]: Psykrot issued server command: /store [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: com.paypal.http.exceptions.HttpException: {"error":"invalid_client","error_description":"Client Authentication failed"} [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.parseResponse(HttpClient.java:200) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.execute(HttpClient.java:98) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.core.AuthorizationProvider.fetchAccessToken(AuthorizationProvider.java:55) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.core.AuthorizationProvider.authorize(AuthorizationProvider.java:35) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.core.PayPalHttpClient.signRequest(PayPalHttpClient.java:40) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//com.paypal.http.HttpClient.execute(HttpClient.java:93) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at Store.jar//io.github.paypal.DepositHandler.lambda$createDepositOrder$0(DepositHandler.java:63) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] New deposit! [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] UUID: *** [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] Item: USA [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] Cost: $5 [01:21:08] [Craft Scheduler Thread - 11 - Store/INFO]: [Store] Total: $5.54 [01:21:08] [Craft Scheduler Thread - 11 - Store/WARN]: [Store] Plugin Store vgit-Store-627204f generated an exception while executing task 12582 java.lang.NullPointerException: Cannot invoke "com.paypal.http.HttpResponse.result()" because "finalRepsonse" is null at io.github.paypal.DepositHandler.lambda$createDepositOrder$0(DepositHandler.java:77) ~[Store.jar:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1609] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1609] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1609] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]```
TheoBong commented 2 years ago

Hmm, what Java version are you on?

Psykrot commented 2 years ago

17.0.1 is the only version installed on my machine

"java -version" output:


java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
Psykrot commented 2 years ago

Is it possible it has something to do with my server being behind TCPShield? I believe TCPShield proxies the connections so maybe that is messing with the authorization process.

I'll log on later to test.

Psykrot commented 2 years ago

~Is it possible it has something to do with my server being behind TCPShield? I believe TCPShield proxies the connections so maybe that is messing with the authorization process.~

I'll log on later to test.

It was not TCPShield. I also tried regenerating the API Secret key, still no luck.

TheoBong commented 2 years ago

The plugin honestly a proof of concept. It is poorly coded and is buggy. I plan on recoding this plugin sometime in the future for production use, but for now I would stay away from it.