pavel-corsaghin / react-native-leaflet

A LeafletView component using WebView and Leaflet map for React Native applications
MIT License
114 stars 46 forks source link

Expo/Android: ERR_FILE_NOT_FOUND #18

Closed Productivix closed 1 year ago

Productivix commented 2 years ago

hi, my issue seems similar as the others, I am on Expo / android 10

no error message in console but only on the screen : leaflet

code :

return isLoading ? (
    <ActivityIndicator />
  ) : (
    <LeafletView
      onError={() => message.log(error)}
      /* loadingIndicator={() => {
        return <ActivityIndicator />;
      }} do not work */
      mapCenterPosition={{ lat: [lat], lng: [long] }}
    />
  );
};

Remark on installation : I had to add the module : "react-native-webview"

remark doc : I did not understand what to put to catch the error and also for the loading indicator

packkson.js : joined

package.zip

tell what simple to do to help. regards William

Productivix commented 2 years ago

I had called that with the coodinates of Paris : "lat": 45.5563131, "lng": 5.5238953,

ubrainrepo commented 2 years ago

I had called that with the coodinates of Paris : "lat": 45.5563131, "lng": 5.5238953,

+1

Productivix commented 2 years ago

if we remove the onError catch, we have the following warning in console : coming from the navigation I have installed ("canGoBack" comes from navigation.route) " Encountered an error loading page, Object {

"canGoBack": false, "canGoForward": false, "code": -1, "description": "net::ERR_FILE_NOT_FOUND", "loading": false, "target": 835, "title": "", "url": "file:///android_asset/leaflet.html", } at node_modules\react-native\Libraries\LogBox\LogBox.js:118:10 in registerWarning at node_modules\react-native\Libraries\LogBox\LogBox.js:64:8 in warnImpl at node_modules\react-native\Libraries\LogBox\LogBox.js:37:4 in console.warn at node_modules\expo\build\environment\react-native-logs.fx.js:18:4 in warn at http://192.168.0.29:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:160928:22 in onLoadingError at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:93:4 in invokeGuardedCallbackProd
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:318:2 in invokeGuardedCallback at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:342:2 in invokeGuardedCallbackAndCatchFirstError at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:439:41 in executeDispatch at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:463:19 in executeDispatchesInOrder
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2563:28 in executeDispatchesAndRelease
at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:1214:4 in forEachAccumulated at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2588:20 in runEventsInBatch at node_modules\react-native\Libraries\Renderer\implementations\ReactNativeRenderer-dev.js:2735:18 in runExtractedPluginEventsInBatch.. "

miallo commented 2 years ago

https://github.com/pavel-corsaghin/react-native-leaflet/issues/15 also had this issue. It was closed because of the workaround of not using expo. Currently I am unfortunately too busy to look into this in more depth...

miallo commented 2 years ago

I think you misunderstood me: There is an issue here and we should at least investigate if using this library with Expo is feasable. I think it would be a good idea to reopen this issue (and maybe change the name to "Expo/Android: ERR_FILE_NOT_FOUND" or something similar), so that other people will also see it and that it is not forgotten (until the next person runs into it)

kharalanova commented 2 years ago

Hi, are there any news on the above issue ERR_FILE_NOT_FOUND - I am facing the same Thanks

rohaniictemp commented 1 year ago

Hi , Is this issue resolved ? I am still facing same error with expo android

kharalanova commented 1 year ago

I stopped trying to resolve it (and I did really try) when I discovered that when I actually build the app and run it on Android it doesn't result in the ERR_FILE_NOT_FOUND error

Productivix commented 1 year ago

too old, not working any more on those modules - no result - stop

kharalanova commented 1 year ago

This is a shame. There is really no viable open source alternative out there. So I am using this module. Maybe you could give us some directions where the problem lies and what may be the solution and one of us that are facing the issue could work on a fix. Thanks

lichtmetzger commented 1 year ago

Found a solution here: https://github.com/pavel-corsaghin/react-native-leaflet/issues/8#issuecomment-1435787897