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

Lost over $300 in GCP billing becoz this package pulls all fields in result, my bad I was unaware #119

Open
SujaYuga opened this issue May 27, 2020 · 7 comments

Comments

@SujaYuga
Copy link

While this package is good and is working with no issues for me, I recently had a GCP billing issue where it charged me over $300-$400 without me querying for Contact or Atmosphere data. I was only accessing the Basic fields all the time like Name, Address, and Photos through getDetailsByPlaceId() method but I am unaware that this method pulls all fields and GCP Billing works such a way that its billing is based on the response (PlacesDetailsResponse) object fields rather than the fields that I fetch from PlacesDetailsResponse object.

After several emails and phone calls with GCP support, I came to know that the issues lie with this package and I had already lost over $300 to $400 over 2 months. Any new users please be aware that this API does not have a way to set Fields like Basic fields, Contact fields, Atmosphere fields separately but it returns all fields which you requesting for it.

Having said that, I like this package otherwise and I hope this package includes a way to set fields. For now, I am moving away from this package due to this missing field restrictions feature. I am now considering flutter_places_autocomplete package which has the feature that I am looking for, please suggest me any other package available which is good and also has a field restriction feature.

Also, correct me if there is already a way available in flutter_google_places to restrict the response to certain fields falling under Basic, Contact, or Atmosphere pricing plan.

PlacesDetailsResponse detail = await _places.getDetailsByPlaceId(p.placeId);

@travisjayday
Copy link

I'd like to use this package in my project but this issue is scaring me a bit. If a dev could say something about this, I'd really appreciate it.

@GursheeshSingh
Copy link

Setting budgets should be a must.
Learned that the hard way.

@fatimahossny
Copy link

@SujaYuga , what about using new fileds filter , I think this could be better

PlacesDetailsResponse detail =
          await _places.getDetailsByPlaceId(p.placeId, fields: ["geometry"]);

@kinex
Copy link

kinex commented Sep 15, 2020

I think you are now talking about other plugin google_maps_webservice, this plugin only references it but it doesn't even call getDetailsByPlaceId. Also as there seems to be the fields parameter in the getDetailsByPlaceId, I don't think there are any issues in that other plugin either.

@lepepper
Copy link

lepepper commented Feb 7, 2023

google_maps_webservice plugin has this issue

@SujaYuga , what about using new fileds filter , I think this could be better

PlacesDetailsResponse detail =
          await _places.getDetailsByPlaceId(p.placeId, fields: ["geometry"]);

this does not work
fields: ["geometry"] - gives the error
This plugin was last updated 2 years ago and has zero support - Best to avoid it
Even I have faced the billing issue

If anyone has a solution, please share

@lepepper
Copy link

lepepper commented Feb 7, 2023

While this package is good and is working with no issues for me, I recently had a GCP billing issue where it charged me over $300-$400 without me querying for Contact or Atmosphere data. I was only accessing the Basic fields all the time like Name, Address, and Photos through getDetailsByPlaceId() method but I am unaware that this method pulls all fields and GCP Billing works such a way that its billing is based on the response (PlacesDetailsResponse) object fields rather than the fields that I fetch from PlacesDetailsResponse object.

After several emails and phone calls with GCP support, I came to know that the issues lie with this package and I had already lost over $300 to $400 over 2 months. Any new users please be aware that this API does not have a way to set Fields like Basic fields, Contact fields, Atmosphere fields separately but it returns all fields which you requesting for it.

Having said that, I like this package otherwise and I hope this package includes a way to set fields. For now, I am moving away from this package due to this missing field restrictions feature. I am now considering flutter_places_autocomplete package which has the feature that I am looking for, please suggest me any other package available which is good and also has a field restriction feature.

Also, correct me if there is already a way available in flutter_google_places to restrict the response to certain fields falling under Basic, Contact, or Atmosphere pricing plan.

PlacesDetailsResponse detail = await _places.getDetailsByPlaceId(p.placeId);

@SujaYuga
Were you able to overcome the "fields" issue? using this package"flutter_places_autocomplete"
Right now i am stuck in same situation

@samuCodelers
Copy link

samuCodelers commented Apr 15, 2024

I have the same problem, getting a huge billing cost in GCP. I also notice that the problem happens when you get the full information for getting details for a place. However, I tried to use fields and does not work.

According to the documentation https://developers.google.com/maps/documentation/places/web-service/details, only it is necessary to add the fields as a query param in the url:

https://maps.googleapis.com/maps/api/place/details/json?fields=name%2Crating%2Cformatted_phone_number&place_id=ChIJN1t_tDeuEmsRUsoyG83frY4&key=YOUR_API_KEY

However if you try with the plugin, adding the parameter fields: [ "name", "geometry"] for example, does not work, and the problem seem to be when trying to parse placeId from PlaceDetail class, because when you request fields, this parameter does not come in the google play api detailed place response

placeId: json['place_id'] as String?,

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

7 participants