{"action":"created","issue":{"url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/121","repository_url":"https://api.github.com/repos/stoffern/pokemongo-api","labels_url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/121/comments","events_url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/121/events","html_url":"https://github.com/stoffern/pokemongo-api/issues/121","id":168798282,"number":121,"title":"FetchError: error with the api calls","user":{"login":"syrys","id":5236811,"avatar_url":"https://avatars.githubusercontent.com/u/5236811?v=3","gravatar_id":"","url":"https://api.github.com/users/syrys","html_url":"https://github.com/syrys","followers_url":"https://api.github.com/users/syrys/followers","following_url":"https://api.github.com/users/syrys/following{/other_user}","gists_url":"https://api.github.com/users/syrys/gists{/gist_id}","starred_url":"https://api.github.com/users/syrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syrys/subscriptions","organizations_url":"https://api.github.com/users/syrys/orgs","repos_url":"https://api.github.com/users/syrys/repos","events_url":"https://api.github.com/users/syrys/events{/privacy}","received_events_url":"https://api.github.com/users/syrys/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-08-02T04:44:28Z","updated_at":"2016-08-03T07:54:40Z","closed_at":"2016-08-02T16:30:11Z","body":"Hey Guys,\r\n\r\nWas trying out this library and found that there are lot of errors coming through. For example, if i simply run the example file with correct login info and lat/lng, it pretty much crashes at about the 2nd api request (debugged using console/logs). \r\n\r\nSo on the example, i commented out everything after the login call to the while loop. Then chucked all the content within the while loop inside a `try{/*code here*/}catch(e){console.log(e)};` except for the set timeout line. This is so i can debug. So, that means the api call resulting from `GetMapOnjects()` is getting called every 3 secs. About every 2nd time, i get an error that looks like this:\r\n\r\n````\r\n{ FetchError: request to https://pgorelease.nianticlabs.com/plfe/532/rpc failed, reason: read ECONNRESET\r\n    at ClientRequest.<anonymous> (E:\\LBDrive\\Testing\\pokemon-apis\\2\\node_modules\\node-fetch\\index.js:127:11)\r\n    at emitOne (events.js:101:20)\r\n    at ClientRequest.emit (events.js:188:7)\r\n    at TLSSocket.socketErrorListener (_http_client.js:308:9)\r\n    at emitOne (events.js:96:13)\r\n    at TLSSocket.emit (events.js:188:7)\r\n    at emitErrorNT (net.js:1271:8)\r\n    at _combinedTickCallback (internal/process/next_tick.js:74:11)\r\n    at process._tickDomainCallback (internal/process/next_tick.js:122:9)\r\n  name: 'FetchError',\r\n  message: 'request to https://pgorelease.nianticlabs.com/plfe/532/rpc failed, reason: read ECONNRESET',\r\n  type: 'system',\r\n  errno: 'ECONNRESET',\r\n  code: 'ECONNRESET' }\r\n````\r\n\r\nThoughts? Is this expected?"},"comment":{"url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/comments/237168670","html_url":"https://github.com/stoffern/pokemongo-api/issues/121#issuecomment-237168670","issue_url":"https://api.github.com/repos/stoffern/pokemongo-api/issues/121","id":237168670,"user":{"login":"syrys","id":5236811,"avatar_url":"https://avatars.githubusercontent.com/u/5236811?v=3","gravatar_id":"","url":"https://api.github.com/users/syrys","html_url":"https://github.com/syrys","followers_url":"https://api.github.com/users/syrys/followers","following_url":"https://api.github.com/users/syrys/following{/other_user}","gists_url":"https://api.github.com/users/syrys/gists{/gist_id}","starred_url":"https://api.github.com/users/syrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syrys/subscriptions","organizations_url":"https://api.github.com/users/syrys/orgs","repos_url":"https://api.github.com/users/syrys/repos","events_url":"https://api.github.com/users/syrys/events{/privacy}","received_events_url":"https://api.github.com/users/syrys/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T07:54:40Z","updated_at":"2016-08-03T07:54:40Z","body":"@gallexme yes, that works fine. about 26ms in that ping, no failures (tried few times).\r\nRemember the code doesnt fail every time. I tested this requests on a loop with a slight delay (maybe 2-3 secs on each call, and restarted when ever it failed), so after couple of errors, it logges in and gets the endpoint, but sometimes it gets stuck in getting endpoint and i get something like this `Endpoint missing in request, lets try again.. in 5 seconds` few times in a row and it eventually fails with a `Too many consecutive \"Missing endpoint\" failures. Abandoning login`.\r\n\r\nWhat i said above isnt 100% the case. The failure happens randomly (maybe 50% chance to fail on every request). Anyway, i just ran it again, the login and endpoint/inventory calls went through, then the `GetMapObjects()` ran few times before finally throwing an error. Started again from the beginning and this time it crashed on the first call.\r\n\r\nany ideas?"}}
{"actor":{"display_login":"syrys"}}