title: Axios network error (Invalid imageTag) when querying a Flask resource from React Native iOS app
body: <p>I have a Flask app set up with a few endpoints. These endpoints work fine when accessed from postman or a browser.</p>
  <p>I also have a React Native app set up (using an Expo template), in which I try to query this resource from iOS:</p>
  <pre><code>const testApiCall = async (): Promise&lt;string&gt; =&gt; {
    try {
      const url = `${baseUrl}/users`;
      const response = await axios.get(url);
      console.log(response.data);
      return response.data.toString();
    } catch (error) {
      console.log(error.request)
      console.log(&quot; a &quot; + error.request?._response);
      console.log(error);
    }
  }
  </code></pre>
  <p><code>baseUrl</code> is the full IP, not just <code>localhost</code>.</p>
  <p>The <code>/users</code> endpoint returns json of the app's users. However, when calling this, I get the following output:</p>
  <pre><code>a Invalid imageTag: 192.168.1.191:80/users
  [AxiosError: Network Error]
  </code></pre>
  <p>(excluding the <code>error.request</code> since it's long and probably doesn't provide any additional context - will edit this post if it would be useful!)</p>
  <p>I can't find any reason for the &quot;invalid imageTag&quot; error. Intermittently, the flask app will get logs including a 404 request for the favicon:</p>
  <pre><code>[06/May/2022 21:55:05] &quot;GET /users HTTP/1.1&quot; 200 -
  [06/May/2022 21:55:05] &quot;GET /favicon.ico HTTP/1.1&quot; 404 -
  [06/May/2022 21:56:15] &quot;GET /users HTTP/1.1&quot; 200 -
  [06/May/2022 21:56:16] &quot;GET /favicon.ico HTTP/1.1&quot; 404 -
  </code></pre>
  <p>I even tried to make an endpoint in the flask app to return a generic .ico file when requesting <code>/favicon.ico</code> but behavior didn't change. Now, I stopped getting any kind of request on my flask app when using my React Native app. I still get logs when accessing the endpoints from postman, though.</p>
  <p>I also used <code>flask_cors</code>:</p>
  <p><code>CORS(app, resources={r'/*': {'origins': '*'}})</code></p>
  <p>This one has been a real head-scratcher for me and I'm having trouble finding any similar issues, so I'd really appreciate any help! Happy to provide additional context that could be useful, too.</p>
  <p>A request to <a href="https://jsonplaceholder.typicode.com/todos/1" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com/todos/1</a> worked without an issue. Tried with http:// and that worked too.</p>
  <p>Added this to <code>app.json</code> but it didn't help:</p>
  <pre><code>&quot;ios&quot;: {
        &quot;supportsTablet&quot;: true,
        &quot;infoPlist&quot;: {
          &quot;NSAppTransportSecurity&quot; : {
            &quot;NSAllowsArbitraryLoads&quot; : true,
            &quot;NSAllowsLocalNetworking&quot;: true
          }
        }
      },
  </code></pre>