Closed jaggerwang closed 10 months ago
+1
+1 not possible to fetch() remote json data on ios10 w/ RN 0.33
+1 ios 10.0.1 RN 0.33
+1
+1
+1
+1
Also happening with iOS 10.0.1 and RN 0.30
edit: I followed the recommendations here and am no longer getting the messages
Still an issue with: RN 0.34 XCode 8.0 iOS 10.0 simulator
It's working with the iOS 9.2 simulator, however.
@marcpechaitis I'm not able to get to the library file for RCTWebSocket how did you find it? RTCWebSocket doesn't show up in my targets.
@DrBeak1
Thanks for responding @marcpechaitis . Ah. OK - I think the issue is that react-native is integrated into my project, which was originally ONLY a native obj-c project. React was integrated in afterwards (using instructions here). So my project doesn't have a Libraries folder that contains each of the individual xcodeproj files. The files are in the project, just not contained within a target:
+1
I was able to track down the RCTWebSocket.xcodeproj, open it, and alter the warning flags but the annoying __nw_connection_get_connected_socket_block_invoke
log persists. The method mentioned by @marcpechaitis (ref from here) to fix this does not work for pre-existing apps that have integrated react-native (vs apps that started as react-native apps). I can't even find where this log call is being fired off (not in obj-c files, not in any node-modules). still investigating.
edit: this is only an issue when building against main.jsbundle ... if I build against localhost (debug) these logs go away. I suspect that because I'm building in debug mode RN assumes I want to connect to the debug localhost server; which in this case is not true. My RN development is finished, and that portion of the app is running using the main.jsbundle file I created.
The build error that @marcpechaitis mentioned was fixed in RN 0.33 This error is a runtime error. Interestingly, it works for me in ios 10 simulator but not on the actual device.
@matthiasdilger oops, thought @marcpechaitis was referencing the OP.
Hi, guys! This works for me (on simulator):
@HADB still fails on device for me
Got it working on device and simulator now by reassigning all signing certificates and entitlements in the project.
Xcode 8.0, ios10, iphone 5s
Below RCTWebSocket target's compiler settings works for me.
None of these solutions work for me at all. I've added in the exceptions in my info.plist and I just can't connect to my package server from my physical phone. I don't want to turn off errors like @HADB mentioned with OS_ACTIVITY_MODE as well, this is a legitimate error.
Any fix for this issue ?
+1
RN 0.34.0 iOS 10.0.1 iPhone 5S
In the iOS 10 simulator, I'm also getting a ton of __nw
related log messages.
+1
RN 0.35.0-rc.0 IOS 10.1 Iphone 7 Plus
+1
This seems to be an iOS 10 issue, and not a React Native one.
https://twitter.com/xenadu02/status/776669668404629504
Using OS_ACTIVITY_MODE=disable
(as HADB suggests) is the only current workaround.
@aleclarson I agreed with the log part but react-native still fail to fetch the bundle file on IOS 10
@frnk94 Are you talking about the .jsbundle
? The packager is serving my development bundle just fine.
You might be using an outdated AppDelegate.m
if it doesn't have this:
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
@alanchenup I think its an issue with my AppDelegate.m not connecting to my actual device thanks for the reply i'l fix my code ! :). It working great in simulator
i got it solved by xcode menu commands: product -> clean and (hold down option key) product -> 'clean build folder'
+1
RN 0.34.0 iOS 10.0.1 iPhone 5S
working in iOS 10 simulator but not work in real iphone 5S
@pietgk No such luck with that solution for me.
OS_ACTIVITY_MODE=disable
works but it's more of a nuclear option given that it hides all your NSLog statements when running on a device. Perhaps it's better to just live with the log pollution for now when running on device.
@aleclarson @frnk94 Actually, the real error we get I think is :
Sending websocketFailed with no listeners registered.
I cannot reload js from server either, on the physical device that is.
+1
+1
@marcpechaitis Thanks for sharing my article!
+1
I get this when I have both remote debugging and console debugging (via react-native log-ios
). Disabling remote debugging solves the problem.
@warrenronsiek how to disable remote debugging?
@JansenLi If you don't know what it is, this probably isn't causing the problem. In your simulator hit command+D and a menu will pop up where you can enable or disable 'Debug JS Remotely'.
+1
+1
Got this error when my phone was not connected to Wifi.. 🙈
The solution from HADB above worked for me, but it's missing a few steps in XCode8, which are added here for clarity:
+1
not helpful, trying to figure out what's going on
Still present on
RN 0.40.0 iOS 10.1 iPhone 6+
(Clean install with react-native init
)
Disabling the logs work, or I can just filter and ignore them, but does anyone know what/if something is actually broken from this?
+1
+1
+1
Workaround
Edit by @hramos, maintainer:
Several solutions have been presented in this thread:
OS_ACTIVITY_MODE
@HADB proposed:
OS_ACTIVITY_MODE
Value:disable
Using
react-devtools
Alternatively, ensure
react-devtools
is installed on your system.Resolution
This is a known issue in the iOS Simulator. The issue will remain open to increase visibility. We are limited comments on this thread to core contributors. Pull requests with proposed fixes are welcome.
Original Issue
ENV
RN 0.32 iOS 10, iPhone 6 Plus
Problem
The console of Xcode continue print "__nw_connection_get_connected_socket_block_invoke 6 Connection has no connected handler".
Screen