react-native-map-clustering
react-native-map-clustering copied to clipboard
TypeError: undefined is not an object (evaluating 'tree.range') iOS App
Hi there, perhaps someone can help me, if I use react-native-map-clustering instead of react-native-maps my application refuses to load the home page (which has the map on it) I am presented with this error, I have no other issues apart from this one which is hard crash.
react-native-map-clustering works perfectly when running the app via expo managed workflow, but when I eject the app to the bare workflow this happens, I could even build the app with expo before and the react-native-map-clustering worked, its only when ejected to bare workflow, I am completely at my wits end trying to figure this out, can anyone please shed some light on this? thank you so much.

TypeError: undefined is not an object (evaluating 'tree.range')
This error is located at: in NavigationContainer (at App.js:64) in Provider (at App.js:61) in App (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39) [Thu Apr 01 2021 17:34:49.133] WARN Possible Unhandled Promise Rejection (id: 1): TypeError: undefined is not an object (evaluating 'tree.range') getClusters@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:273990:21 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:273514:45 commitHookEffectListMount@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:24145:38 commitPassiveHookEffects@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:24180:44 invokeGuardedCallbackImpl@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:13701:21 invokeGuardedCallback@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:13795:42 flushPassiveEffectsImpl@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26524:36 unstable_runWithPriority@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:48114:30 performSyncWorkOnRoot@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:25649:28 performSyncWorkOnRoot@[native code] http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:16952:38 unstable_runWithPriority@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:48114:30 flushSyncCallbackQueueImpl@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:16947:28 flushSyncCallbackQueue@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:16936:35 scheduleUpdateOnFiber@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:25289:37 enqueueSetState@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:18456:23 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:9284:37 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:228874:27 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:224515:35 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:235285:42 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:149143:36 tryCallOne@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:4373:16 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:4474:27 _callTimer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:31522:17 _callImmediatesPass@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:31561:17 callImmediates@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:31778:33 __callImmediates@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3661:35 http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3447:34 __guard@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3644:15 flushedQueue@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3446:21 flushedQueue@[native code] callFunctionReturnFlushedQueue@[native code]
For me this error happens when longitudeDelta
or latitudeDelta
are missing in the initialRegion
prop
For me, the solution was supplying latitude and longitude in initialRegion
in Number
format
I have a very similar error: "undefined is not an object (evaluating 'l.range')" . I cannot replicate it but it happens on production . I have already latitude & longitude in Number format and latitudeDelta & longitudeDelta set on initialRegion .
Any help is welcome :)