question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

in react-native & apollo-boost client & android, network request fail in builded apk

See original GitHub issue

when i try request to apiserver, it is not problem in android just running by react-native(script: react-native run-android)

but, in builded apk, i got a error

Network error: Network request failed]

only in apk.

i guessed that the reason is http/https. but, in https same. runned by react-native => ok, but apk => fail.

ApolloClient.js

export default new ApolloClient({
    uri: 'https://domain',
    cache: new InMemoryCache(),

    clientState: {
        defaults: defaults,
        resolvers: resolvers
    }
})

let me know the reason and solution please.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
vidyasagarmettacommented, Dec 26, 2019

If your link is having http then add the following line in your android manifest file android:usesCleartextTraffic=“true”

0reactions
ghyath5commented, May 1, 2021

Any solution here !??? I’m facing same issue on some of android devices.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Apollo error - Network request failed
I tried to set ip address, it's working on real device. But on android emulator, it's not working. – linhnh. Sep 4, 2017...
Read more >
Integrating with React Native - Apollo GraphQL Docs
You can use Apollo Client with React Native exactly as you do with React.js. Install it with npm like so: Bash. 1. npm...
Read more >
React Native for Mobile Development - EBooksWorld
This chapter describes how to beta test a React Native application with the distribution systems available for iOS and Android. We also cover...
Read more >
Troubleshooting build errors and crashes - Expo Documentation
A reference for troubleshooting build errors and crashes when using EAS Build. This document is under active development; the topic it covers is...
Read more >
native part of mapbox react native libraries were not registered ...
I am trying to configure for Android a react-native app which uses Mapbox and works ... universalApk false // If true, also generate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found