Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVED] API key gives invalid response #10

Closed
Leejit opened this issue Feb 6, 2017 · 32 comments
Closed

[RESOLVED] API key gives invalid response #10

Leejit opened this issue Feb 6, 2017 · 32 comments

Comments

@Leejit
Copy link

Leejit commented Feb 6, 2017

To be honest, and I apologize... I didn't think StatsPE & TopVoter (Two beautiful plugins I use !) were both yours.

Well, this is the plugin I'm having issues with ... I get a "invalid response" from the server, when configured the exact same on Tess as was on PocketMine.

Any help ? I can show you a screen shot, or directly get some log clips of the error.

@Leejit
Copy link
Author

Leejit commented Feb 6, 2017

Removed API-Key due to security reasons - Salmon

@Leejit
Copy link
Author

Leejit commented Feb 6, 2017

lol, t.y Salmon.... but how is it a security risk ? j.w. :$

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 6, 2017

@LordJoshie As far as I know the serverlist claimed that you should never post it somewhere. Anyway, it seems like your API key is invalid.

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 6, 2017

I'll try to make the plugin show the response of the serverlist

@SalmonDE SalmonDE self-assigned this Feb 6, 2017
@Leejit
Copy link
Author

Leejit commented Feb 6, 2017 via email

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 6, 2017

@LordJoshie Try using this link:
https://minecraftpocket-servers.com/api/?object=servers&element=voters&month=current&format=json&key= insert-your-key-here!

@Leejit
Copy link
Author

Leejit commented Feb 6, 2017

you suggest I use the whole link with my key in the spot without the *'s ?

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 6, 2017

@LordJoshie you can test your key with that link. It won't make it work, I just wanted to tell you how I tested it.

@Leejit
Copy link
Author

Leejit commented Feb 6, 2017 via email

SalmonDE referenced this issue Feb 6, 2017
and support API:
- 2.0.0
- 3.0.0-ALPHA1
- 3.0.0-ALPHA2
- 3.0.0-ALPHA3
@SalmonDE
Copy link
Owner

SalmonDE commented Feb 6, 2017

Hope this won't happen again! :) Added a console message to let people know if their API key is invalid.

@SalmonDE SalmonDE closed this as completed Feb 6, 2017
@Leejit
Copy link
Author

Leejit commented Feb 6, 2017 via email

@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

Hey Salmon, I am home from work now and able to provide anything from my end needed for you to help me resolve this issue...

And my apologies about lastnights/thismornings little messup with the plugin confusion... I was super tired :P

@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

capture

@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

after you updated the plugin, this was the new information it gave me... if there is a way I can personally show you my logs and .yml's to compare, and for you to point out what my problem is, I am all for doing that, so my personal information isn't shared here in a public place.

@Aericio
Copy link
Collaborator

Aericio commented Feb 7, 2017

You could contact him via Telegram or email him (salmonde@salmonde.de)

@Aericio
Copy link
Collaborator

Aericio commented Feb 7, 2017

Oh, try resetting your config.yml for TopVoter and type everything back in (don't cp). I am not sure if this matters, but make sure there is no space in the begging or the end inside the API-Key: 'supersecretkey'

@Aericio Aericio changed the title ...weird ! API key gives invalid response Feb 7, 2017
@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

I don't care much about the api-key being shown, but here... I downloaded Tess, I downloaded TopVoter, and ran it... still get the same issue. so I'm stupid :)
capture

@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

Sorry to be a bother Salmon, I've literally gone through this way more than I ever thought I would.

With my very small amount of knowledge, I went ahead and picked apart the plugin and it seems that no matter what I do, I will always receive the same errors.

:S

@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

As you can see here, with some changes to the source plugin, and a test on Tesseract, it DOES in fact work.... however, something due to the way the plugin is calling to/handling the information is the issue I'm having.

Have you made any changes in the past Salmon ?

capture1
capture2

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 7, 2017

@LordJoshie Yup, I also came to the same solution when I saw that the Updater also failed for you. It seems like the way the plugin connects to the internet is broken. I'll guess the Utils::getURL() function has to do with this issue.

@Leejit Leejit changed the title API key gives invalid response [RESOLVED] API key gives invalid response Feb 7, 2017
@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

Hey.... Salmon, my friend and I figured it out.

ALL CREDIT GOES TO MY FRIEND... but change the https to just be http. wallah. have a good day.

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 7, 2017

@LordJoshie In normal cases https shouldn't cause such issues. But I can't offer another solution yet, so I'll close this now.

@SalmonDE SalmonDE closed this as completed Feb 7, 2017
@Leejit
Copy link
Author

Leejit commented Feb 7, 2017

Hey man, if it ain't broke... don't fix it !

And fortunately, you're plugin wasn't broken... just the laws of the internet... so we had to lie a little. :)

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 7, 2017

@LordJoshie I asked dktapps about a feature which could return the cURL error in Utils::getURL(). I hope the idea gets accepted. That could help to truly find out what this issue was caused by.

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 14, 2017

The feature was added into the branch issues/332 at pmmp. As soon as the updater crash of pmmp is fixed, could you test this again with this version of pmmp? I am really interested to fix this issue or just find out, what the cause was.

@Leejit
Copy link
Author

Leejit commented Feb 14, 2017

Yeah, I'll give this a go now and report my findings.

@Leejit
Copy link
Author

Leejit commented Feb 14, 2017

I realize why I don't use PocketMine, besides having nothing to offer, it's slow, uses too much resource, and you need to compile the spl/raklib& lang files... holy garbage.

My server is currently frozen because of launching PocketMine. doesn't help I'm doing this off the server I host my public server on... so... whoops.

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 14, 2017

@LordJoshie Oh well, I'd always suggest to test things on a test server. Do you need a phar compiled or will you be able to compile from branch issues/332?

Oh and the thing is, you're actually supposed to recursivly download the repository (git clone --recursive https://github.com/pmmp/PocketMine-MP should work). This way submodules will be downloaded, too.

@Leejit
Copy link
Author

Leejit commented Feb 14, 2017

its compiled... derp. hence when booting it lagged the shit out of my server.

also, I only own one vps... so I create new folders for my test servers... not expecting a program that is default set to use only 512mb of ram, to take up 3gb fro a world generation, and lag up my vps so hard...

still waiting for a response from it.

@Leejit
Copy link
Author

Leejit commented Feb 14, 2017

Okay, things are fine now...

Regardless, I'm still curious why this needs to be tested... or what you're expecting to get from it.

@SalmonDE
Copy link
Owner

SalmonDE commented Feb 14, 2017

@LordJoshie Since I didn't change anything or fix it it could be possible that other people could encounter this issue. If it is avoidable by the code I'd like to change it properly.

I hope Utils::getURL() will return an error message from cURL. It should do with the new pmmp branch when cURL fails.

@ShotDead7297 ShotDead7297 mentioned this issue Jun 7, 2018
Closed
@SalmonDE
Copy link
Owner

SalmonDE commented Aug 3, 2018

Seems to be connected to #26 in retrospective.

@ShotDead7297 ShotDead7297 mentioned this issue Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants