question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Web support example timeout

See original GitHub issue

Describe the bug

Using the web support example, autosuggestions work on ios, but not on the web. The web console shows a timeout

Reproduction - (required - issue will be closed without this)


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!
  
  

Please remember to remove you google API key from the code you provide here

Additional context

  • Library Version: [e.g. 1.4.2]

  • React Native Version: [e.g. 0.62.2]

  • iOS

  • Android

  • [x ] Web

If you are using expo please indicate here:

  • [x ] I am using expo

Add any other context about the problem here, screenshots etc

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
bell-stevencommented, Feb 12, 2021

Thanks @brforest. I am going to update the docs and the snack to remove any reference to cors-anywhere.

2reactions
brforestcommented, Feb 9, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

setTimeout() - Web APIs | MDN
The global setTimeout() method sets a timer which executes a function or specified piece of code once the timer expires.
Read more >
Web Pages - Session Timeout Redirects - OCLC Support
When a patron, institution or staff leaves a Relais web page inactive, the session times out and they will be redirected to a...
Read more >
Set a Timeout in Spring 5 Webflux WebClient - Baeldung
As above, we set a handshake timeout to 30 seconds (default: 10s), while close_notify flush (default: 3s) and read (default: 0s) timeouts to...
Read more >
Window setTimeout() Method - W3Schools
The setTimeout() method calls a function after a number of milliseconds. 1 second = 1000 milliseconds. Notes. The setTimeout() is executed only once....
Read more >
Session Timeout - OWASP Foundation
Session timeout represents the event occuring when a user does not perform any action on a web site during an interval (defined by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found