jaing / react-native-places-input

MIT License
46 stars 18 forks source link

Possible Unhandled Promise Rejection (id: 1): TypeError: Network request failed #20

Closed thiagomarzagao closed 4 years ago

thiagomarzagao commented 4 years ago

I'm just trying the example in the README - there is basically no other code on my app other than minimal boilerplate and imports. The build succeeds, but when I click the autocomplete box and start typing something I get the above error. Here is what I see on my terminal:

Possible Unhandled Promise Rejection (id: 1): TypeError: Network request failed onerror@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:28001:31 dispatchEvent@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:34129:31 setReadyState@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:33213:33 didCompleteResponse@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:33040:29 emit@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:3416:42 callFunction@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2744:49 http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2466:31 __guard@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2698:15 callFunctionReturnFlushedQueue@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false:2465:21 callFunctionReturnFlushedQueue@[native code]

I'm using Android 9.0 on Pixel 2 API 28 emulator, with react-native 0.62.0, on macOS Catalina.

I've tried using a proxy and tweaking network-security-config. Nothing worked. I doubled checked that my Places API key works by using it directly on the browser. Since what I have now is a really barebones app, with nothing else on it, I'm guessing it could be an issue with the react-native-places-input itself. So, anyone else is experiencing this?

thiagomarzagao commented 4 years ago

Sorry, my mistake - my emulator couldn't connect to the internet at all, it had nothing to do with your package. I found the solution here. I'm closing this.