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

address_components_of_type nil when setting Google Maps API key restrictions #1608

Open
RyanTG opened this issue Mar 1, 2023 · 0 comments
Open

Comments

@RyanTG
Copy link

RyanTG commented Mar 1, 2023

Expected behavior

Expecting success when using address_components_of_type while having a key restriction (either domain restriction or API restriction) on my Google Maps API key.

Actual behavior

Works fine when I do not set any restrictions on the Google Maps key.

If I restrict it to example.com/* and *.example.com/* then I get this error: undefined method address_components_of_type' for nil:NilClass`

If I remove the domain restrictions and instead restrict it by API type (and enable only the Places API, Geocoding API, and Javascript API), I get the same error.

I cannot tell if this is a google maps issue or a geocoder issue. But my assumption is that address_components_of_type is using a resource that is outside of those key restrictions.

Environment info

  • Geocoder version: 1.8.0
  • Rails version: 6.1.7.1
  • Database (if applicable):
  • Lookup (if applicable): Google
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

1 participant