bramus / bramus/react-native-maps-directions
Additional error on `Error on GMAPS route request, ZERO_RESULTS`
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
```js
react-native-maps-directions Error on GMAPS route request, ZERO_RESULTS
- node_modules\react-native\Libraries\YellowBox\YellowBox.js:71:8 in console.warn
- node_modules\expo\build\environment\muteWarnings.fx.js:18:23 in warn
- node_modules\react-native-maps-directions\src\MapViewDirections.js:266:10 in fetch.then.then._catch$argument_0
- node_modules\promise\setimmediate\core.js:37:14 in tryCallOne
- node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates
* [native code]:null in callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_ref.distance')]
- node_modules\react-native-maps-directions\src\MapViewDirections.js:184:26 in Promise.all.then$argument_0
* [native code]:null in reduce
- node_modules\react-native-maps-directions\src\MapViewDirections.js:182:22 in Promise.all.then$argument_0
- node_modules\promise\setimmediate\core.js:37:14 in tryCallOne
- node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates
* [native code]:null in callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue
```
This error is happening when you try to use a directions from one island to another
```js
```
The onError isn't called else I would just handle the error there.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/MapViewDirections.js at the Promise.all handling around lines 182-184 and the warning path around line 266. Reproduce a directions request between islands and inspect the ZERO_RESULTS response. Done means the reported route error is handled without the undefined distance rejection and the onError behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100