Skip to content

detoxURLBlacklistRegex in launchArgs not working (always nil) #1861

@michaelgmcd

Description

@michaelgmcd
  • I have tested this issue on the latest Detox release and it still reproduces

Description

No matter what value I set detoxURLBlacklistRegex to in launchArgs when launching the app, it is always nil when picked up in the native code.

If I replace [options arrayForKey:@"detoxURLBlacklistRegex"];with @[@".*"]; my tests run as expected. I've tried setting the values to all of the following:

  • The example: '\\("http://192.168.1.253:19001/onchange","https://e.crashlytics.com/spi/v2/events"\\)'
  • '\\(".*"\\)'
  • '\\(.*\\)'
  • ['.*']

Reproduction

  1. Update detox/ios/Detox/DetoxManager.m to print out "blacklistRegex"
  2. Run detox tests using detoxURLBlacklistRegex in launchApp (as mentioned in the docs)

Expected behavior

The value should be set to what is passed in detoxURLBlacklistRegex

Environment (please complete the following information):

  • Detox: 15.1.2
  • React Native: 0.61.5
  • Node: 12.14.1
  • Device: iPhone 8 (tried on multiple)
  • Xcode: 11.3.1
  • iOS: 13.3
  • macOS: 10.14.5

Logs

If you are experiencing a timeout in your test

Omitting the log for brevity. It shows a lot of App State -> busy Waiting for network requests to finish: ... logs while launching

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions