fix(ios): devsupport IPv6 host parsing for packager and inspector#55923
fix(ios): devsupport IPv6 host parsing for packager and inspector#55923hannojg wants to merge 1 commit intofacebook:mainfrom
Conversation
cipolleschi
left a comment
There was a problem hiding this comment.
Code looks good to me.
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D95564862. |
|
Hey, anything i can do to help land this? 🙈 |
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
|
Weird, it does not 😅 (i guess somebody is testing that action right now) |
|
Out of curiousity @hannojg, have you tested Android also against IPv6 bundlers? |
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
No, I did not yet (my main use case are automated tests on AWS device farm which on iOS/macOS runners only support ipv6 for connections) |
|
@cipolleschi merged this pull request in 4a59f90. |
|
This pull request was successfully merged by @hannojg in 4a59f90 When will my fix make it into a release? | How to file a pick request? |
Summary:
When Metro host is an IPv6, iOS dev-support had two parsing issues, causing SIGABRTs:
RCTPackagerConnectionparsedhost:portby splitting on:, which breaks IPv6 literals and can build an invalid websocket URL for/message.RCTInspectorDevServerHelperusedNSURL.hostdirectly to composehost[:port]. For IPv6,NSURL.hostis unbracketed, producing an invalid authority for inspector endpoints.Changes:
RCTPackagerConnection: parse host/port viaNSURLComponentsfrom a synthesized URL instead of splitting by:.RCTInspectorDevServerHelper: re-add IPv6 brackets when composing authority strings fromNSURL.host.Changelog:
[IOS] [FIXED] - Fix iOS dev-support IPv6 handling for packager and inspector connections.
Test Plan:
RCT_METRO_PORT=8088 yarn --cwd packages/rn-tester start --host :: --port 8088RCT_packager_scheme = httpRCT_jsLocation = [2a02:...]:8088http://[2a02:...]:8088/statusreturns 200http://[2a02:...]:8088/js/RNTesterApp.ios.bundle?...