Skip to content

fetch: Failed to connect to localhost/127.0.0.1:PORT  #76

@lucaslenz

Description

@lucaslenz

react-native: 0.72.4
react-native-file-access: 3.0.4
Platform: Android

Bug
I am using react-native-image-cache which utilizes this library. I am running in some errors on android when trying to load an image. I get the error from this call (FileSystem.fetch) with the following arguments:

source:  http://localhost:3000/some/path/over/here?someQueryParameter=true
path:  /data/user/0/<app-identifier>/cache/<...>/images/1d331f734be348d78fe4a71a2f8aeb4493a14338.jpg

The error message i get is

Maximum retries exceeded: Failed to connect to localhost/127.0.0.1:3000

This error is android only and also only occurs with the given parameters. When using another image and hence other parameters it's just working fine. I don't know if I'm missing anything but it seems like a bug. Working for the following parameters:

source: https://images.pexels.com/photos/36717/amazing-animal-beautiful-beautifull.jpg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1
path: /data/user/0/<appp-identifier>/cache/pingr/images/3486045310072102e400cc40bcab227cd0a7811a.jpg

The image does exist btw. and loads on iOS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions