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

API Endpoint sometimes is null #112

Closed
WiS3 opened this issue Jul 24, 2016 · 6 comments
Closed

API Endpoint sometimes is null #112

WiS3 opened this issue Jul 24, 2016 · 6 comments

Comments

@WiS3
Copy link

WiS3 commented Jul 24, 2016

Hello, sometimes i get [i] Received API Endpoint: https://null/rpc
I don't know how to reproduce it or what could be the cause, but it should be handled.

Currently when it happens, the server crashes on Heartbeat.

@klisman
Copy link

klisman commented Jul 24, 2016

I got this sometimes, but i think was my modifications.

@WiS3
Copy link
Author

WiS3 commented Jul 24, 2016

This is my implementation of the api.
I have a WebSocket server and Go is unique for each connection, when the client connect i call Go.Connect(...);
I don't think that there are issues with my code, because sometimes i get the correct end point.
It is totally random.

var Go = {
    Status: GO_STATUS_DISCONNECTED,
    Instance: null,
    Connect: function(type, user, password, location){
        if(this.Status == GO_STATUS_CONNECTED || this.Status == GO_STATUS_CONNECTING){
            //TODO handle connected/connecting status
            return;
        }
        this.Instance = new PokemonGO.Pokeio();
        this.Status = GO_STATUS_CONNECTING;
        this.Instance.init(user,password,location,type,function(error){
            if(error){
                Go.Status = GO_STATUS_DISCONNECTED;
                throw error;
            }else{
                Go.Status = GO_STATUS_CONNECTED;
            }
        });
    },
    FetchPokemons: function(){
        if(this.Status == GO_STATUS_CONNECTED){
            this.Instance.Heartbeat(function (err, hb) {
                // ........
            }
        }
    }
}

@Armax
Copy link
Owner

Armax commented Jul 25, 2016

we are fixing the GetApiEndpoint function, the https://null/rpc is caused by niantic's servers problem

@Armax Armax closed this as completed Jul 25, 2016
@WiS3
Copy link
Author

WiS3 commented Jul 27, 2016

@Armax Please reopen the issue because is still not fixed.
As someone else said, issues should not be closed until fixed or figured out.

@gallexme
Copy link

the https://null/rpc is caused by niantic's servers problem

@WiS3
Copy link
Author

WiS3 commented Jul 27, 2016

@gallexme I know that. But it should at least be handled and throw an error when it happens.

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

No branches or pull requests

4 participants