You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've migrated to the new Macbook Pro M1 few weeks ago. Everything was ok but at some moment I got "could not connect to development server" error. I guess this error appeared after restarting my Wi-Fi router but I'm not sure. I managed to run app after deleting unused "expo-splash-screen" package and clearing project several times. But after several days this error appeared again and I cannot run my app anymore.
I've checked en0 in "ifconfig" and "networksetup -listallhardwareports". There is something interesting happens. When I set sourceURLForBridge in AppDelegate.m according to my ifconfig like this: return [NSURL URLWithString:@"http://192.168.1.3:8081/index.bundle?platform=ios&dev=true&minify=false"];
I get "could not connect to development server" error. When I try to set manually bundler in dev menu with the same options( ip 192.168.1.3, port 8081) app loads but with fast refresh disabled.
Index.bundle url is reachable in my browser and other computers in my network but not on iOS devices.
Sometimes app loads but without fast refresh. There is no "Enable/disable Fast Refresh" option in dev menu.
When I press on "Reload" app hangs.
But in most cases app just hangs on white screen after splashscreen (XCode errors below).
When I try to refresh app using terminal it says "No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB."
I created new default RN app. Fast refresh and reload don't work or app just hangs on white screen too.
I tried to run my project with my old Macbook Pro 2014 and same XCode version (12.5) and it works perfectly.
What I have already done:
checked that both devices are on the same Wi-Fi network
cleared tmp folders, watchman and build folders, restart npm with --reset-cache (million times)
cleaned project with react-native-clean-project
set recommended Flipper versions in Podfile: use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
restarted Macbook many times and iOS devices
deleted node modules and installed again, installed pod with "arch -x86_64 pod install"
run XCode with and without Rosetta
switch off/on Airplane mode on device to clear cache
uninstall/install node and watchman
uninstall/install XCode
switched on/off "Connect via network" in XCode Devices
placed just <View><Text>test</Text></View> in root component
I would be very grateful for any help.
React Native version:
System:
OS: macOS 11.4
CPU: (8) arm64 Apple M1
Memory: 129.41 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.3.0 - /opt/homebrew/bin/node
Yarn: Not Found
npm: 7.15.1 - /opt/homebrew/bin/npm
Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-macos: Not Found
npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Have no idea.
Expected Results
App runs on real devices.
Snack, code example, screenshot, or link to a repository:
There are examples of errors I get in XCode:
2021-06-13 05:59:46.882628+0300 Videoalphabet[4112:525410] Task <2DED2650-E464-40EA-9517-0A5A5FFFEB87>.<2> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "Превышен лимит времени на запрос." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x2821599b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <2DED2650-E464-40EA-9517-0A5A5FFFEB87>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <2DED2650-E464-40EA-9517-0A5A5FFFEB87>.<2>"
), NSLocalizedDescription=Превышен лимит времени на запрос., NSErrorFailingURLStringKey=http://192.168.1.3:8081/status, NSErrorFailingURLKey=http://192.168.1.3:8081/status, _kCFStreamErrorDomainKey=4}
2021-06-13 05:59:46.917050+0300 Videoalphabet[4112:525193] [native] Invalidating <RCTCxxBridge: 0x1063058e0> (parent: <RCTBridge: 0x280424150>, executor: RCTWebSocketExecutor)
2021-06-13 05:59:46.923752+0300 Videoalphabet[4112:525936] [connection] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]
2021-06-13 05:59:46.924001+0300 Videoalphabet[4112:525936] [connection] nw_socket_handle_socket_event [C4.1:1] Socket SO_ERROR [61: Connection refused]
2021-06-13 05:59:46.925632+0300 Videoalphabet[4112:525936] [connection] nw_socket_handle_socket_event [C3.2:1] Socket SO_ERROR [61: Connection refused]
2021-06-13 05:59:46.925801+0300 Videoalphabet[4112:525936] [connection] nw_socket_handle_socket_event [C4.2:1] Socket SO_ERROR [61: Connection refused]
2021-06-13 05:59:46.926186+0300 Videoalphabet[4112:525746] [connection] nw_connection_get_connected_socket [C3] Client called nw_connection_get_connected_socket on unconnected nw_connection
2021-06-13 05:59:46.926453+0300 Videoalphabet[4112:525746] TCP Conn 0x281834160 Failed : error 0:61 [61]
2021-06-13 05:59:46.927792+0300 Videoalphabet[4112:525410] [connection] nw_connection_get_connected_socket [C4] Client called nw_connection_get_connected_socket on unconnected nw_connection
2021-06-13 05:59:46.927852+0300 Videoalphabet[4112:525410] TCP Conn 0x281828160 Failed : error 0:61 [61]
2021-06-13 05:59:46.992274+0300 Videoalphabet[4112:525746] [connection] nw_endpoint_handler_set_adaptive_read_handler [C5.1 64.233.165.95:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, ipv6, dns)] unregister notification for read_timeout failed
2021-06-13 05:59:46.992311+0300 Videoalphabet[4112:525746] [connection] nw_endpoint_handler_set_adaptive_write_handler [C5.1 64.233.165.95:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, ipv6, dns)] unregister notification for write_timeout failed
2021-06-13 05:59:47.068105+0300 Videoalphabet[4112:525757] [javascript] Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'SourceCode' could not be found. Verify that a module by this name is registered in the native binary.
2021-06-13 05:59:47.073115+0300 Videoalphabet[4112:525757] [native] Attempted to invoke `5` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.
2021-06-13 05:59:47.084269+0300 Videoalphabet[4112:525757] [native] Attempted to invoke `0` (method ID) on `Timing` (NativeModule name) without a method queue.
2021-06-13 05:59:47.084305+0300 Videoalphabet[4112:525757] [native] Attempted to invoke `1` (method ID) on `Timing` (NativeModule name) without a method queue.
2021-06-13 05:59:47.084320+0300 Videoalphabet[4112:525757] [native] Attempted to invoke `0` (method ID) on `RNCAsyncStorage` (NativeModule name) without a method queue.
2021-06-13 05:59:47.100098+0300 Videoalphabet[4112:525757] [javascript] Error: Requiring module "node_modules/react-native/Libraries/Core/InitializeCore.js", which threw an exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'SourceCode' could not be found. Verify that a module by this name is registered in the native binary.
2021-06-13 05:59:47.101506+0300 Videoalphabet[4112:525757] [native] Attempted to invoke `5` (method ID) on `ExceptionsManager` (NativeModule name) without a method queue.
2021-06-13 05:59:47.105723+0300 Videoalphabet[4112:525757] [javascript] Error: Requiring module "node_modules/react-native/Libraries/Core/Devtools/getDevServer.js", which threw an exception: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'SourceCode' could not be found. Verify that a module by this name is registered in the native binary.
2021-06-13 06:52:56.176977+0300 Videoalphabet[4438:547107] [native] Connection to http://localhost:8081/debugger-proxy?role=client timed out. Are you running node proxy? If you are running on the device, check if you have the right IP address in `RCTWebSocketExecutor.m`.
2021-06-13 06:52:56.177090+0300 Videoalphabet[4438:545280] *** Assertion failure in -[RCTCxxBridge ensureOnJavaScriptThread:](), /Volumes/Seagate/dev/react/VideoAlphabet/VideoAlphabet/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:346
2021-06-13 06:52:56.178715+0300 Videoalphabet[4438:545280] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This method must not be called before the JS thread is created'
The text was updated successfully, but these errors were encountered:
Description
I've migrated to the new Macbook Pro M1 few weeks ago. Everything was ok but at some moment I got "could not connect to development server" error. I guess this error appeared after restarting my Wi-Fi router but I'm not sure. I managed to run app after deleting unused "expo-splash-screen" package and clearing project several times. But after several days this error appeared again and I cannot run my app anymore.
I've checked en0 in "ifconfig" and "networksetup -listallhardwareports". There is something interesting happens. When I set sourceURLForBridge in AppDelegate.m according to my ifconfig like this:
return [NSURL URLWithString:@"http://192.168.1.3:8081/index.bundle?platform=ios&dev=true&minify=false"];
I get "could not connect to development server" error. When I try to set manually bundler in dev menu with the same options( ip 192.168.1.3, port 8081) app loads but with fast refresh disabled.
Index.bundle url is reachable in my browser and other computers in my network but not on iOS devices.
If I set sourceURLForBridge this way :
Sometimes app loads but without fast refresh. There is no "Enable/disable Fast Refresh" option in dev menu.
When I press on "Reload" app hangs.
But in most cases app just hangs on white screen after splashscreen (XCode errors below).
When I try to refresh app using terminal it says "No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB."
I created new default RN app. Fast refresh and reload don't work or app just hangs on white screen too.
I tried to run my project with my old Macbook Pro 2014 and same XCode version (12.5) and it works perfectly.
What I have already done:
use_flipper!({ 'Flipper-Folly' => '2.5.3', 'Flipper' => '0.87.0', 'Flipper-RSocket' => '1.3.1' })
<View><Text>test</Text></View>
in root componentI would be very grateful for any help.
React Native version:
System:
OS: macOS 11.4
CPU: (8) arm64 Apple M1
Memory: 129.41 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.3.0 - /opt/homebrew/bin/node
Yarn: Not Found
npm: 7.15.1 - /opt/homebrew/bin/npm
Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Have no idea.
Expected Results
App runs on real devices.
Snack, code example, screenshot, or link to a repository:
There are examples of errors I get in XCode:
The text was updated successfully, but these errors were encountered: