From 17759c5ce987ec26de40193a373b56f478b5c6b5 Mon Sep 17 00:00:00 2001 From: Ashwin Phatak Date: Wed, 20 Sep 2017 10:24:45 +0530 Subject: [PATCH] Fix port conflict between RN >= 0.48 and RPC server (#1294) --- CHANGELOG.md | 12 ++++++++++++ react-native/android/publish_android_template | 8 ++++---- .../main/java/io/realm/react/RealmReactModule.java | 2 +- react-native/ios/RealmReact/RealmReact.mm | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9501068d..5923f128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +X.Y.Z Release notes +============================================================= +### Breaking changes +* None + +### Enhancements +* None + +### Bug fixes +* Fixed port conflict between RN >= 0.48 inspector proxy and RPC server used for Chrome debugging (#1294). + + 1.12.0 Release notes (2017-9-14) ============================================================= ### Breaking changes diff --git a/react-native/android/publish_android_template b/react-native/android/publish_android_template index c4c0670b..7d1e6686 100644 --- a/react-native/android/publish_android_template +++ b/react-native/android/publish_android_template @@ -22,17 +22,17 @@ apply plugin: 'com.android.library' task forwardDebugPort(type: Exec) { def adb = android.getAdbExe()?.toString() ?: 'false' - commandLine adb, 'forward', 'tcp:8082', 'tcp:8082' + commandLine adb, 'forward', 'tcp:8083', 'tcp:8083' ignoreExitValue true doLast { if (execResult.getExitValue() != 0) { logger.error( '===========================================================================\n' + - 'WARNING: Failed to automatically forward port 8082.\n' + - 'In order to use Realm in Chrome debugging mode, port 8082 must be forwarded\n' + + 'WARNING: Failed to automatically forward port 8083.\n' + + 'In order to use Realm in Chrome debugging mode, port 8083 must be forwarded\n' + 'from localhost to the device or emulator being used to run the application.\n' + 'You may need to add the appropriate flags to the command that failed:\n' + - ' adb forward tcp:8082 tcp:8082\n' + + ' adb forward tcp:8083 tcp:8083\n' + '===========================================================================\n' ) } diff --git a/react-native/android/src/main/java/io/realm/react/RealmReactModule.java b/react-native/android/src/main/java/io/realm/react/RealmReactModule.java index 696b978d..0ad49a2a 100644 --- a/react-native/android/src/main/java/io/realm/react/RealmReactModule.java +++ b/react-native/android/src/main/java/io/realm/react/RealmReactModule.java @@ -23,7 +23,7 @@ import java.util.Map; import fi.iki.elonen.NanoHTTPD; class RealmReactModule extends ReactContextBaseJavaModule { - private static final int DEFAULT_PORT = 8082; + private static final int DEFAULT_PORT = 8083; private static boolean sentAnalytics = false; private AndroidWebServer webServer; diff --git a/react-native/ios/RealmReact/RealmReact.mm b/react-native/ios/RealmReact/RealmReact.mm index 62be7893..26da98e2 100644 --- a/react-native/ios/RealmReact/RealmReact.mm +++ b/react-native/ios/RealmReact/RealmReact.mm @@ -38,7 +38,7 @@ #import "GCDWebServerErrorResponse.h" #import "rpc.hpp" -#define WEB_SERVER_PORT 8082 +#define WEB_SERVER_PORT 8083 using namespace realm::rpc; #endif