Using the web support example, autosuggestions work on ios, but not on the web. The web console shows a timeout
import React from 'react';
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete';
const GooglePlacesInput = () => {
return (
<GooglePlacesAutocomplete
placeholder='Search'
onPress={(data, details = null) => {
// 'details' is provided when fetchDetails = true
console.log(data, details);
}}
query={{
key: 'YOUR API KEY',
language: 'en',
}}
requestUrl={{
useOnPlatform: 'web', // or "all"
url:
'https://cors-anywhere.herokuapp.com/https://maps.googleapis.com/maps/api', // or any proxy server that hits https://maps.googleapis.com/maps/api
}}
/>
);
};
export default GooglePlacesInput;
Please provide a FULLY REPRODUCIBLE example.
Click to expand!
```javascript
```
_Please remember to remove you google API key from the code you provide here_
React Native Version: [e.g. 0.62.2]
[ ] iOS
If you are using expo please indicate here:
Add any other context about the problem here, screenshots etc
I just double checked this on expo-web. Please make sure your key has billing enabled etc
I just double checked this on expo-web. Please make sure your key has billing enabled etc
billing is enabled, and is working correctly on other platforms, just not web.
Are you using expo-web or some other (react) framework?
Without a reproducible example, it's hard to determine if the issue is a bug in the library vs a bug elsewhere in the code.
Perhaps this could be related - the number of allowed requests on the cors-anywhere.herokuapp.com server went down about a month or two ago, and as of Feb 1 it is no longer an open server:
https://github.com/Rob--W/cors-anywhere/issues/301
I found this very helpful in setting up my own CORS server
https://stackoverflow.com/questions/47076743/cors-anywhere-herokuapp-com-not-working-503-what-else-can-i-try
Thanks @brforest. I am going to update the docs and the snack to remove any reference to cors-anywhere.
Most helpful comment
Thanks @brforest. I am going to update the docs and the snack to remove any reference to
cors-anywhere.