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

Place query hangs indefinitely on certain place_id #86

Closed
sumpton opened this issue Apr 24, 2017 · 5 comments
Closed

Place query hangs indefinitely on certain place_id #86

sumpton opened this issue Apr 24, 2017 · 5 comments

Comments

@sumpton
Copy link

sumpton commented Apr 24, 2017

For some strange reason, the following place_id hang silently and indefinitely for a place query. 32,000 succeeded fine. I don't know how to trap for the error. For me, it is consistently repeatable.

Using version 0.3.1 -- I didn't test an earlier release

const query = {
    placeid: 'EiJNYWdocmViLCA1NSBBZ2FkaXIsIFNhbMOpLCBNb3JvY2Nv' // any of the following place_id
};
googleMapsClient.place(query, (err, res) => {});

using any of the following place_id

const place_id = [
    'EiJNYWdocmViLCA1NSBBZ2FkaXIsIFNhbMOpLCBNb3JvY2Nv',
    'EitNYWdocmViLCA1NCBCb3VsZXZhcmQgQWhmaXIsIE91amRhLCBNb3JvY2Nv',
    'EjxNYWdocmViLCA1NCBSdWUgQWhmaXIsIENhc2FibGFuY2EsIEdyYW5kIENhc2FibGFuY2EsIE1vcm9jY28',
    'EhtNYWdocmViLCA1OSBSb3V0ZSBBa2hmZW5uaXI',
    'EkxUcnVuZyDEkMO0bmcsIEFra2F5YSBLw7Z5w7wgWW9sdSwgQWtrYXlhIEvDtnnDvC_EsGhzYW5nYXppL0thc3RhbW9udSwgVHVya2V5',
    'EjJNYWdocmViLCA1NSBBZGFyLCBrc2FyIGhhcnQgZWwgbW9yYWJpdGluZSwgTW9yb2Njbw',
    'Ej1NYWdocmViLCA1OCBSdWUgQWtub3VsLCBDYXNhYmxhbmNhLCBHcmFuZCBDYXNhYmxhbmNhLCBNb3JvY2Nv',
    'ElhUcnVuZyDEkMO0bmcsIEFrw6dhcMSxbmFyIEvDtnnDvCBZb2x1LCBBa8OnYXDEsW5hciBCdWNhxJ_EsS_Dh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WhhbGxlc2ksIEJhbGzEsSBLw7Z5w7wgxLDDpyBZb2x1LCBNYWxrYXJhL1Rla2lyZGHEnywgVHVya2V5',
    'EkhUcnVuZyDEkMO0bmcsIEJhbGzEsSBLw7Z5w7wgWW9sdSwgQmFsbMSxIEvDtnnDvC9VbHVkZXJlL8WexLFybmFrLCBUdXJrZXk',
    'ElZUcnVuZyDEkMO0bmcsIEJhbHDEsW5hciBLw7Z5w7wgWW9sdSwgQmFscMSxbmFyIEJlbGVkaXllc2kvQmF0bWFuIE1lcmtlei9CYXRtYW4sIFR1cmtleQ',
    'ChIJr33-GkkmzEAR203ZNme6tjc',
    'EmxUcnVuZyDEkMO0bmcsIEhhdGlwbGVyIE1haGFsbGVzaSwgQmFsdmVyZW4gS8O2ecO8IFlvbHUsIEJhbHZlcmVuIEJlbGVkaXllc2kvxZ7EsXJuYWsgTWVya2V6L8WexLFybmFrLCBUdXJrZXk',
    'ChIJOY2xfjhZIpQR_bkYu2G1acU',
    'ChIJ03fYmaO0GgcRLJ_N_L54dog',
];

@stephenmcd
Copy link
Contributor

I tried a couple of them and they all return a value for the "err" arg in the callback function, showing they're invalid place IDs.

Can you try using the latest commit on GitHub?

@sumpton
Copy link
Author

sumpton commented Apr 26, 2017

  1. That works.
  2. Thank you for the code!
  3. It failed for me with 0.3.1

I should have included that I was trying to catch the error

googleMapsClient.place(query, (err, res) => {
    if (err) {
        console.error(err);
        done(err);
    } else {
        console.log(util.inspect(res.json.result, { depth: null }));
        // stuff
    }
});

but the script was not returning -- anything :)

this worked:

"@google/maps": "git+https://github.com/googlemaps/google-maps-services-js.git",

@stephenmcd
Copy link
Contributor

Cool, we should have a new release out soon.

@sumpton
Copy link
Author

sumpton commented Apr 27, 2017

I am sorry to reopen this, I must be doing something wrong, because I am having the same problem today -- with the script not returning.

After I re-installed with npm with

"dependencies": {
    "@google/maps": "git+https://github.com/googlemaps/google-maps-services-js.git", 

I did see an error with "status", and changed my err test to

if (err) {
    if (res.json.status === 'NOT_FOUND') {
        console.log('skip not found');
        done();
    } else {
        console.error(err);
        done(err);
    }
} else {

and believe I process several place_id, but I am not sure how many.

Now if I try the problem examples, this one for instance,

'EjJNYWdocmViLCA1NSBBZGFyLCBrc2FyIGhhcnQgZWwgbW9yYWJpdGluZSwgTW9yb2Njbw'

they hang. I tried reinstalling the package with npm again. Any ideas what I am doing wrong?

@atrain0789
Copy link

+1 I am getting the same thing on certain IDs. Request just hangs indefinitely until (I think) the browser is timing out the request at 5 minutes. No matter the timeout settings etc. I use in the place request params it just hangs. For example a placeid of "foo" just hangs instead of sending back what I get when I do a request directly in browser which is "INVALID_REQUEST"

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

3 participants