Skip to content

XCTests and XCUITests failing on url_launcher package iOS 17 XCode RC1 #134971

Closed
flutter/packages
#5071

Description

@rzambroni

Is there an existing issue for this?

Steps to reproduce

Steps to reproduce

Install XCode RC1 and iOS 17.0 Simulator

git clone

cd packages

cd url_launcher/url_launcher_ios/example/ios

flutter pub get

pod install

Run the test using command (Replace $simulator_id):


xcodebuild test -workspace Runner.xcworkspace -scheme Runner \

-destination 'platform=iOS Simulator,id=$simulator_id' > logs.txt

9- Alternatively, you can run test inside Xcode in the Test Navigator

Expected results

Expected results

Running all tests should succeed

Actual results

Actual results

image

[Screenshot 1]: Xcode test navigator showing failing tests.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
Test Case '-[RunnerUITests.URLLauncherUITests testLaunch]' failed (42.205 seconds).

Test Suite 'URLLauncherUITests' failed at 2023-09-18 15:33:34.376.

Executed 1 test, with 1 failure (0 unexpected) in 42.205 (42.207) seconds

Test Suite 'RunnerUITests.xctest' failed at 2023-09-18 15:33:34.377.

Executed 1 test, with 1 failure (0 unexpected) in 42.205 (42.209) seconds

Test Suite 'Selected tests' failed at 2023-09-18 15:33:34.378.

Executed 1 test, with 1 failure (0 unexpected) in 42.205 (42.215) seconds

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.14.0-14.0.pre.333, on macOS 13.5.2 22G91 darwin-x64, locale en-UY)

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)

[✓] Chrome - develop for the web

[✓] VS Code (version 1.82.2)

[✓] Connected device (3 available)

[✓] Network resources

Activity

  1. added
    platform-iosiOS applications specifically
    P2Important issues not at the top of the work list
    team-iosOwned by iOS platform team
    from: manual-qaIssue caught from manual QA process
    on Sep 18, 2023
  2. stuartmorgan-g commented on Sep 19, 2023

    @stuartmorgan-g
    Contributor

    The XCTests are no longer valid due to an NSURL behavioral change:

    For apps linked on or after iOS 17 and aligned OS versions, NSURL parsing has updated from the obsolete RFC 1738/1808 parsing to the same RFC 3986 parsing as NSURLComponents. This unifies the parsing behaviors of the NSURL and NSURLComponents APIs. Now, NSURL automatically percent- and IDNA-encodes invalid characters to help create a valid URL.

    We'll need to see if we can find a different way to create invalid URLs, or we'll have to relax the test expectations (and lose some edge case coverage).

    The XCUITest seems to be tapping Done without effect, causing the test to get stuck. That seems like it may be an XCUITest bug, but I'll have to investigate further.

  3. added
    p: url_launcherPlugin to launch external applications
    packageflutter/packages repository. See also p: labels.
    on Sep 19, 2023
  4. github-actions commented on Oct 18, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work listfrom: manual-qaIssue caught from manual QA processp: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions