Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all 28476 articles
Browse latest View live

Android java.lang.UnsatisfiedLinkError: couldn't find DSO to load

$
0
0

I just set up a brand new react-native project (0.62). Running a fresh debug build works just fine.

I set up signing following the documentation: https://reactnative.dev/docs/signed-apk-android, and ensured that I'm using the following ABIs: "armeabi-v7a", "x86", "arm64-v8a", "x86_64".

To test out a release build, I run the following: npx react-native run-android --variant release

Problem

After running the above command, the app attempts to start and crashes immediately with the following stack trace:

    --------- beginning of crash2020-05-01 09:34:26.707 19961-19976/? E/AndroidRuntime: FATAL EXCEPTION: create_react_context    Process: <BUNDLE_ID>, PID: 19961    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)

Sure enough, when I unpackage the APK there is no libhermes.so in /lib/x86_64 (I am testing at the moment on pixel 2 API 28).

I'm not sure why hermes wasn't enabled to start out with, but just to be sure I set the following in my build.grade:

project.ext.react = [    enableHermes: true,  // clean and rebuild if changing]

Now after cleaning and building I do see libhermes.so. Unfortunately, I am still seeing the same exact issue. But I can see that the file exists.

At this point, I'm pretty stuck. I've followed a number of threads reporting the same issue (for example, this). It sounds like an underlying issue with soloader has been fixed and is being used with the latest version of react native.

Question

Not being terribly familiar with Android development, what steps might I take to investigate this issue further?


Sign Request with X509 Certificate from Keychain

$
0
0

Our users have Android devices managed through MobileIron which installs an X509Certificate chain on the user's device. We also have a DataPower instance that issues a certificate challenge to return a SAML token. We are trying to make a request to DataPower using an SSL signed request with the X509Certificate, but I haven't been able to figure out how to do this. I can get the certificate chain itself:

KeyChainAliasCallback keyChainAliasCallback = new KeyChainAliasCallback() {  @Override  public void alias(String s) {    try {      X509Certificate[] certChain = KeyChain.getCertificateChain(reactContext, s);    }    catch (Exception e) {      Log.d(TAG, "ERROR GETTING CERTIFICATE CHAIN "+ e);    }  }};KeyChain.choosePrivateKeyAlias(getCurrentActivity(), keyChainAliasCallback,  null, null, null, -1, null);

This does work, and certChain is an array of X509Certificate objects (on my device it's of length 4).

Next, I want to use the certificate to make an SSL request. Based on the documentation here: https://chariotsolutions.com/blog/post/https-with-client-certificates-on/ we can do this if we have a certificate file. However, where I'm stuck is actually converting the X509Certificate chain to a file or InputStream that the KeyStore will actually accept:

KeyManagerFactory kmf = KeyManagerFactory.getInstance("X509");KeyStore keyStore = KeyStore.getInstance("PKCS12");keyStore.load(new ByteArrayInputStream(certChain[certChain.length - 1].getEncoded()),"test".toCharArray());kmf.init(keyStore, "test".toCharArray());KeyManager[] keyManagers = kmf.getKeyManagers();SSLContext sslContext = SSLContext.getInstance("TLS");sslContext.init(keyManagers, null, null);

I have also tried with certChain[0], and I also tried using Base64.encode on the byte array returned from getEncoded. However, this yields an error: java.io.IOException: illegal object in getInstance: com.android.org.bouncycastle.asn1.DLSequence. The culprit seems to be the .load method which indicates to me that I'm not passing the X509Certificate properly. I've also tried using certChain[0], and I get the same error.

Is there any way to have the KeyStore load an X509Certificate chain?

How to get current country of Device in React Native (iOS and Android)?

$
0
0

I am trying to get current country of device in but didn't find anything. Is there something to do so in React Native?I tried using react-native-device-info but it is also not supporting but in previous version it can be get by getDeviceCountry(). Now for the latest version it is showing error:

TypeError: _reactNativeDeviceInfo.default.getDeviceCountry is not a function. (In '_reactNativeDeviceInfo.default.getDeviceCountry()','_reactNativeDeviceInfo.default.getDeviceCountry' is undefined)

Connecting bluetooth devices with React-Native App

$
0
0

I am using react-native-bluetooth-serial. I get this error whenever I try to connect a bluetooth device via my react native app:

Error: read failed, socket might closed or timeout, read ret: -1Unable to connect to device

Here's what I'm trying to do:

 connectToDevice () {    if (this.state.discovering) {      return false    } else {      this.setState({ discovering: true })      console.log("searching");      BluetoothSerial.list()      .then((Devices) => {        this.setState({ Devices, discovering: false })        for(var i = 0; 1; i++)        {          if(Devices[i]["name"] == "JBL Flip 3 SE")          {            console.log(Devices[i]["id"]);            BluetoothSerial.connect(Devices[i]["id"]).then((res) => {              console.log(res);            }).catch(err => {              console.log(err);            })            break;          }        }        // console.log(unpairedDevices);      })      .catch((err) => console.log(err.message))    }}

Same happens even when I clone the example repository.

Any idea why this is happening?

How to Fix 'VirtualizedLists should never be nested inside plain ScrollViews' Warning

$
0
0

Am getting this warning 'VirtualizedLists should never be nested inside plain ScrollViews' on my react native application, cause am I have some elements in my scroll view . I have looked around for a solution and I found that in order to fix this I have to simply use ListFooterComponent and ListHeaderComponent but I can't since the Flat List is in a separate component as you can see in the code.

I didn't use to get a warning when I showed only two horizontal flat lists inside my scroll view, but when I added a third vertical Flat List the warning popped.

This is my scroll view inside the MainScreen.js file :

<ScrollView showsVerticalScrollIndicator={false}><ResutlsList results={filterResultsByPrice("$")} title="Top News" /><ResutlsList results={filterResultsByPrice("$$")} title="Hot Topics" /><ResutlsListVer          results={filterResultsByPrice("$$")}          title="Latest News"        /></ScrollView>

This is the jsx the ResultsList component is returning in order to showing the Horizental FlatList:

 return (<View style={styles.container}><Text style={styles.title}>{title}</Text><FlatList        horizontal={true}        showsHorizontalScrollIndicator={false}        data={results}        keyExtractor={(result) => result.id}        renderItem={({ item }) => {          return (<TouchableOpacity              onPress={() =>                navigation.navigate("ResultsShow", {                  id: item.id,                })              }><ResutlsDetail result={item} /></TouchableOpacity>          );        }}      /></View>  );

This is the jsx the ResultsListVer component is returning in order to showing the Vertical FlatList:

return (<View style={styles.container}><Text style={styles.title}>{title}</Text><FlatList        data={results}        keyExtractor={(result) => result.id}        renderItem={({ item }) => {          return (<TouchableOpacity              onPress={() =>                navigation.navigate("ResultsShow", {                  id: item.id,                })              }><ResutlsDetail result={item} /></TouchableOpacity>          );        }}      /></View>  );

Google sign in API inconsistently returns givenName and familyName as "null"

$
0
0

We have an app in Google Play that has been working just fine. It is built with react-native and the iOS version is still working just fine. Starting this morning, when users sign in with google sign in, SOME of them return the givenName and familyName as "null". Not a null value, but a string of "null".

Returned JSON with familyName: "null"

This is happening to our existing app in Google Play, as well as our new version. We are using a deprecated version of react native google sign in (v2.0.0), which we are trying to switch off of, but we still need to deal with the versions already in the wild. Also, the behavior is not consistent. As I said, no issues on iOS, and even on Android, signing in with a given account returns "null" strings one minute, and the normal data five minutes later.

I should have mentioned, it is treated as a successful login. The email is returned correct. Oddly, the name field, which should be the full name, is not "null", but just the email again.

Anyone else seeing this issue, or aware of what we may be doing wrong?

Thanks!

libMailCore.so has text relocations

$
0
0

I made a mail application with react-native and expo.I did a eject to install a component (react-native-mailcore). all the building is fine but, when I try to use the library to access the mail server, I obtain an error

libMailCore.so" has text relocations

I attach here the full output

 Process: trusttech.tim.timpec, PID: 4319    java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/trusttech.tim.timpec-ypVZ3hN-Tghf5ZHJM30ajw==/lib/x86/libMailCore.so" has text relocations (https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23)        at java.lang.Runtime.loadLibrary0(Runtime.java:1016)        at java.lang.System.loadLibrary(System.java:1669)        at com.libmailcore.MainThreadUtils.<init>(MainThreadUtils.java:19)        at com.libmailcore.MainThreadUtils.<clinit>(MainThreadUtils.java:9)        at com.libmailcore.MainThreadUtils.singleton(MainThreadUtils.java:14)        at com.libmailcore.NativeObject.<clinit>(NativeObject.java:42)        at com.reactlibrary.MailClient.initSMTPSession(MailClient.java:90)        at com.reactlibrary.RNMailCoreModule$2.run(RNMailCoreModule.java:56)        at android.os.Handler.handleCallback(Handler.java:873)        at android.os.Handler.dispatchMessage(Handler.java:99)        at android.os.Looper.loop(Looper.java:193)        at android.app.ActivityThread.main(ActivityThread.java:6669)        at java.lang.reflect.Method.invoke(Native Method)        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Could someone help me about this? thank you.My gradle settings are the following

 buildToolsVersion = "28.0.3"        minSdkVersion = 21        compileSdkVersion = 28        targetSdkVersion = 28

Thank you for the help

How do I force an expo app to update

$
0
0

I have an app written in expo, and can't figure out how to push a new build. On the expo site if I run the app from the QR code the app is correct, but the native app from the app store doesn't update.

The steps I've been using are 1) exp build:android2) exp publish

How do I make the app actually update?


TypeError undefined is not an object (evaluating 'value.replace')

$
0
0

The strange thing is that it works on my web browser when I run it on Firefox using the Metro Bundler, but when I try to do it on an Android phone I get the error: TypeError undefined is not an object (evaluating 'value.replace')

const setMyString = (value) => {    let string = value.replace(/\D/g,'');    setString(string);}

It seems that this function sets the error.

const [myString, setString] = useState('');<Input       value={myString}    onChange={e => setMyString(e.target.value)} />

Here's the rest of the relevant code. The error happens when I use the virtual keyboard and enter a number.

Should gradle.properties be in gitignore for a react native project to hide release password?

$
0
0

I'm working on a react native app on windows. To be able to generate a signed release apk I've added MYAPP_RELEASE_STORE_PASSWORD=*** and MYAPP_RELEASE_KEY_PASSWORD=*** to my /projectname/android/gradle.properties file (Like it says so here). Now I wonder if I should add the file to gitignore to prevent it from being uploaded to github, or is there a way to store the password in a different file?

React native navigation dont work after build expo

$
0
0

App navigation dont work after build by expo. But in dev mode all work good.

For build I use comande expo build:android and expo start. After that I download app from expo site and install apk file. App work correct, but after press the button nothing is happen.

"@react-navigation/native": "^5.1.6",

"@react-navigation/stack": "^5.2.13",

"expo": "~37.0.3"

"react": "~16.9.0",

app.json

{"expo": {"name": "How to leave","slug": "how-to-leave","platforms": ["ios","android","web"    ],"version": "1.0.0","orientation": "portrait","icon": "./assets/icon.png","splash": {"image": "./assets/splash.png","resizeMode": "cover","backgroundColor": "#ffffff"    },"android": {"package": "com.yourcompany.yourappname","versionCode": 1    }  }}

app.ts

import React from "react";import "react-native-gesture-handler";import { AppLoading } from "expo";import { NavigationContainer } from "@react-navigation/native";import { createStackNavigator } from "@react-navigation/stack";import { getFonts } from "./assets/assets";import { Home } from "./src/screens/Home";import { Details } from "./src/screens/Details";const Stack = createStackNavigator();export default function App() {  const [fontsLoaded, setFontsLoaded] = React.useState<boolean>(false);  if (fontsLoaded) {    return (<NavigationContainer><Stack.Navigator initialRouteName="Home"><Stack.Screen            name="Home"            component={Home}            options={{ headerShown: false }}          /><Stack.Screen            name="Details"            component={Details}            options={{ title: 'Подробнее', headerStyle:{backgroundColor:"#FF8D27"} }}          /></Stack.Navigator></NavigationContainer>    );  } else {    return (<AppLoading startAsync={getFonts} onFinish={() => setFontsLoaded(true)} />    );  }}

Home.tsx

import { useNavigation } from "@react-navigation/native";  const navigation = useNavigation();  ...<TouchableOpacity onPress={() => {navigation.navigate('Details', country)}}><Text>Подробнее</Text></TouchableOpacity>  ...

Push Notifications not working on RN0.62.2

$
0
0

In JS, using firebase.messaging().getToken();, I'm able to successfully get an FCM token.

I'm going into our project in Firebase and sending a test notification to this device.

The notification does not appear on my device.

So:

1.I'm able to generate an FCM token and correctly access it2.No errors in Android Studio or during the build3.No errors in my JS console4.I'm not able to RECEIVE the push notification. Nothing happens. I've tried looking in the logs in android studio, but I'm not seeing anything (and the logs seem to stop running when my app is closed/in the background)

React Native: borderRadius and padding styling for nested text

$
0
0

I want to apply a different borderRadius and padding styling to nested texts, but as far as I could understand this is not supported by react native yet. Is there a workaround for this ?

What I tried so far is :

<Text><Text          style={{            backgroundColor: 'green',            borderRadius: 12,          }}>          Text1</Text><Text          style={{            backgroundColor: 'blue',            borderRadius: 12,          }}>          Text2</Text></Text>

Expected Result: Text with different backgrounds and with a borderRadius.

Actual Result: backgrounds are differnet but no borderRadius is applied

"React Native,Android" I am unable to run android project after ejecting it ,my build stopped working whenever i run cmd react-native run-android

$
0
0

I have build a project using expo ,it is working fine using expo when i eject it and run using android studio.Whenever i entered npm run android or react-native run-android commands it shows me error that given below Can you help anyone help me regarding this matter.

  The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not   supported and may break the build.  This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins {    ... }' DSL if they specify explicit versions, even if the versions are equal.  Please add the Kotlin plugin to the common parent project or the root project, then remove   the versions in the subprojects.   If the parent project does not need the plugin, add 'apply false' to the plugin line.   See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl    The Kotlin plugin was loaded in the following projects: ':expo-error-recovery', ':expo-    permissions'> Task :app:installDebug  11:01:12 V/ddms: execute: running am get-config  11:01:13 V/ddms: execute 'am get-config' on 'emulator-5554' : EOF hit. Read: -1  11:01:13 V/ddms: execute: returning  Installing APK 'app-debug.apk' on 'Nexus_5X_API_23(AVD) - 6.0' for app:debug  11:01:13 D/app-debug.apk: Uploading app-debug.apk onto device 'emulator-5554'  11:01:13 D/Device: Uploading file onto device 'emulator-5554'  11:01:13 D/ddms: Reading file permision of   C:\xampp\htdocs\MyTest2App\android\app\build\outputs\apk\debug\app-debug.apk as: rwx------  11:01:14 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"  11:01:15 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'emulator-   5554' :   EOF hit. Read: -1  11:01:15 V/ddms: execute: returning> Task :app:installDebug FAILED  Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.  Use '--warning-mode all' to show the individual deprecation warnings.

JS scripts not loading in WebView on Android when testing with Expo

$
0
0

SDK Version: 3.15.4

Platforms: Android

I’m testing my app on Android with Expo. One of my screens is a WebView loading a site from a URL. JavaScript in <script></script> tags doesn’t seem to be loading. Inline Javascript, on the other hand, loads fine. Also, the entire WebView works perfectly fine when testing with Expo on iOS.

Here’s my WebView component:

<WebView    source={{ uri: "www.website.com"}}      renderLoading={this.renderLoading}>    startInLoadingState    javaScriptEnabled    onMessage={ event => { alert("hello") }} />

Is there a chance Android doesn’t load JS scripts in WebView when testing on Expo while it would work in production?

I have done the usual googling around and have implemented some recommended fixes like editing android/gradle.properties.

Thanks a lot for any suggestions!


@react-native-firebase/auth: app not authorized Error in signInWithPhoneNumber

$
0
0

I am trying to set up a react-native project with firebase to signInWithPhoneNumber functionality. I am receiving an error:

NativeFirebaseError: [auth/app-not-authorized] This app is not authorized to use Firebase Authentication. Please verify that the correct package name and SHA-1 are configured in the Firebase Console. [ App validation failed. Is app running on a physical device? ]

My Function call is as follows:

import auth from '@react-native-firebase/auth';Screen Class....getOtp = async () => {....auth()      .signInWithPhoneNumber(`+91${phonenumber}`)      .then(confirmResult =>      ....}

I have tried all the setup instructions for the Firebase connection.

The Steps I have tried are:

  • I have the same package name in the react-native android project and firebase console.
  • Added the SHA1 from signingReport to Firebase Console.
  • Copied the google-services.json to android/app Folder.
  • Linked the Firebase to Android Studio via Google Analytics.

Giving Dummy Mobile Number for Testing works and has no issue but not with actual mobile number.In android studio debugger, I am getting error issue displaying:

I/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@8b3312cD/Auth: signInWithPhoneNumber:verification:failed

package details in package.json:

"@react-native-firebase/app": "^6.3.3","@react-native-firebase/auth": "^6.3.3","@react-native-firebase/firestore": "^6.3.3","@react-native-firebase/functions": "^6.3.3","@react-native-firebase/messaging": "^6.3.3","@react-native-firebase/storage": "^6.3.3","react": "^16.12.0","react-native": "^0.61.5",

config in build.gradle(app):

...dependencies {    implementation "com.google.firebase:firebase-auth:19.2.0"    //implementation "com.google.firebase:firebase-messaging"    implementation "com.google.firebase:firebase-storage:17.0.0"    implementation "com.google.firebase:firebase-firestore:17.1.5"    implementation 'com.google.firebase:firebase-analytics:17.2.2'    implementation 'com.android.support:multidex:1.0.3'    implementation 'org.webkit:android-jsc:+'    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.0'    implementation fileTree(dir: "libs", include: ["*.jar"])    implementation "com.facebook.react:react-native:0.61.5"  // From node_modules    implementation "com.google.android.gms:play-services-base:17.1.0"    implementation 'com.google.android.gms:play-services-maps:17.0.0'    implementation "com.google.firebase:firebase-core:17.2.2"}...

config in build.gradle(projectname):

...buildscript {    ext {        buildToolsVersion = "28.0.3"        minSdkVersion = 16        compileSdkVersion = 28        targetSdkVersion = 28        // googlePlayServicesVersion = "16.1.0"        androidMapsUtilsVersion = "0.5+"    }    repositories {        mavenLocal()        google()        jcenter()        maven { url "https://jitpack.io" }        maven { url "https://maven.google.com" }    }    dependencies {        classpath('com.android.tools.build:gradle:3.5.3')        classpath 'com.google.gms:google-services:4.3.3'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}...

React-Native failed to install app due to android developement environment

$
0
0

After messing up with my .zshrc file, and fixing it to working fine, I am beginning to have issues starting a react-native app, if I should run a flutter app using android studio, it opens in the android emulator, but if I should do react-native run-android it fails, giving me the below error

error Failed to install the app. Make sure you have the Android development environment set up

Here is my .zshrc config

export ANDROID_HOME=/Users/squarelabs/Library/Android/sdkexport PATH=$ANDROID_HOME/emulators:$PATHexport PATH=$ANDROID_HOME/tools:$PATH export PATH=$ANDROID_HOME/tools/bin:$PATHexport PATH=$ANDROID_HOME/platform-tools:$PATH```

React-Native Native UI component doen't resize (Android)

$
0
0

I have issues with React Native respecting the height of an Android Native UI Component. I have created a very simple use-case to demonstrate the issue.

React Native version = 0.61.5.

Android, React Native ViewManager:

public class CustomTextViewManager extends SimpleViewManager<TextView> {    @NonNull    @Override    protected TextView createViewInstance(@NonNull ThemedReactContext reactContext) {        return new TextView(reactContext);    }    @NonNull    @Override    public String getName() {        return "CustomTextView";    }    @ReactProp(name = "text")    public void setText(TextView view, String text) {        view.setText(text);    }}

JavaScript, native view reference:

import {requireNativeComponent} from 'react-native';const CustomTextView = requireNativeComponent('CustomTextView')export default CustomTextView;

JavaScript, simple app:

import React from 'react';import CustomTextView from './CustomTextView';const App: () => React$Node = () => {  return (<CustomTextView      text={'Some test text'}    />  );};export default App;

When you run this code nothing is shown. After adding style={{height: 100}} the view is shown at the provided fixed height.

I actually expected that the height of the Android View would be reflected in React Native. Apparently this is not the case.

Note: height: "auto" doesn't work.I hope that someone can tell me what I'm missing.

How to hook viewpager swipe event up to update state react-native android?

$
0
0

My js is abit rusty and im abit confused about how to update the state after a swipe event in my react-native android app. Im trying to hookup this ViewPager based on the official ViewPager and i just want to get the pagenum to update when the slider slides to that page. Any help on how?

The slider itself works, but im confused about how to update state based on events or callbacks. What i really wish to do is update the background color styling of the parent view after each page slide.

Welcome Page

import {IndicatorViewPager, PagerDotIndicator} from 'rn-viewpager';var AboutPage1 = require('../about/AboutPage1');var AboutPage2 = require('../about/AboutPage2');class WelcomeScreen extends Component {    state = {        pagenum: 0    };  render() {<View >            // the parent view i wish to change bgcolor<View style={{flex:1}}>                // this is the viewpager<IndicatorViewPager                        indicator={this._renderDotIndicator()}                        onPageScroll={this.onPageScroll}                        onPageSelected={this.onPageSelected}                        onPageScrollStateChanged={this.onPageScrollStateChanged}                        ref={viewPager => { this.viewPager = viewPager;                }}>                    // some components in this first view<View onPress={this.onPageSelected.bind(this,this.pagenum)}>                        // some components</View>      //  these are just views wrapping pages that are themselves views<View onPress={this.onPageSelected.bind(this,this.pagenum)}><AboutPage1 onPress={this.onPageSelected.bind(this, this.pagenum)}/><Text>{'count'+ this.state.pagenum}</Text></View><View><AboutPage2 onPress={this.onPageSelected.bind(this, this.pagenum)}/><Text>{'count'+ this.state.pagenum}</Text></View></IndicatorViewPager></View></View>    );}    _renderDotIndicator() {        return (<PagerDotIndicator                pageCount={5}            />        );    } // callback that is called when viewpager page is finished selection onPageSelected(e) {     console.log('state is: '+this.state)     this.SetState({pagenum: this.state.pagenum+1});    console.log('state is: '+this.state) }}

About Page

<View><Text>Welcome to My App</Text></View>

Errorerror: 'undefined is not an object when evaluating this.state.pagecount

How to specify Metro Bundler IP adress in my React-Native dev-environment?

$
0
0

Not sure if this is even possible, but here goes:

Setup

  • I have a React-Native app setup using react-native cli
  • I'm trying to make network requests to my application backend
    • say, stage.foo.com/graphql
  • I start my android emulator and start the dev-server:
react-native run-android
  • This starts my metro-bundler dev-server at localhost:8081

The Problem

  • Since company foo has excellent infra and security, they've setup CORS to block all requests originating from localhost.
  • However, they've also setup a public loop-back domain local.foo.com for just such an occasion.
    • local.foo.com redirects back to localhost
  • if I access local.foo.com/graphql, it points to the endpoint I want
  • When I access local.foo.com:8081/debugger-ui (the remote-debugging URL), it correctly connects to the Metro Bundler service that's running there.

The remaining piece:

So after all this, here's my question:

  • My react-native setup is configured to load the app from locahost:8081
  • Is there a way to edit the setup to load the Application from local.foo.com:8081 instead?

Note: This is not a problem with the application code, I need some way to change the source that the application hits when it's looking for the Metro Bundler service.

Viewing all 28476 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>