React-native: [NSURLResponse allHeaderFields]: unrecognized selector sent to instance

Created on 4 Apr 2020  路  10Comments  路  Source: facebook/react-native

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed.
Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html

erminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLResponse allHeaderFields]: unrecognized selector sent to instance 0x6000019548a0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff23e3dcce __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x00007fff50b3b9b2 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff23e5e9f4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
    3   CoreFoundation                      0x00007fff23e426cc ___forwarding___ + 1436
    4   CoreFoundation                      0x00007fff23e449b8 _CF_forwarding_prep_0 + 120
    5   Resume                              0x000000010b3debfc +[SKResponseInfo shouldStripReponseBodyWithResponse:] + 76
    6   Resume                              0x000000010b3dead1 -[SKResponseInfo initWithIndentifier:timestamp:response:data:] + 241
    7   Resume                              0x000000010b3b88a9 __71-[FLEXNetworkRecorder recordLoadingFinishedWithRequestID:responseBody:]_block_invoke + 825
    8   libdispatch.dylib                   0x000000010e935f11 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x000000010e936e8e _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x000000010e93d6fd _dispatch_lane_serial_drain + 788
    11  libdispatch.dylib                   0x000000010e93e28f _dispatch_lane_invoke + 422
    12  libdispatch.dylib                   0x000000010e949b65 _dispatch_workloop_worker_thread + 719
    13  libsystem_pthread.dylib             0x00007fff51b9ea3d _pthread_wqthread + 290
    14  libsystem_pthread.dylib             0x00007fff51b9db77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

React Native version:

System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 138.75 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 13.11.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6241897
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
Languages:
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.0 => 0.62.0 || 0.62.1
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

1.ios run
2.this.props.navigation.navigate("LOGIN")
3:not yellow box

android OK

Expected Results

Describe what you expected to happen.

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem.
You may provide a screenshot of the application if you think it is relevant to your bug report.
Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

Author Feedback Repro Verify on Latest Version

Most helpful comment

@stevelizcano I did it in ios/Podfile:

def add_flipper_pods!
  version = '~> 0.41.1'
  pod 'FlipperKit', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
end

and android/gradle.properties:

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.37.0

can't remember why I ended up picking different version between the two. May have been another error that popped up.

All 10 comments

:warning: Missing Reproducible Example
:information_source: It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.
:warning: Using Old Version
:information_source: It looks like you are using an older version of React Native. Please upgrade to the latest version, and verify if the issue persists. If it does not, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the current release.

Similar error while using react-native-maps

image

Also happens with react-native-image-resizer:
9C0FDCDD-1CD2-490E-9603-3D0DB685F12F

Bumping Flipper fixed it for me

Bumping Flipper fixed it for me

Same

@samrenick What was your method for bumping flipper? Just updating react-native-flipper in your package.json, or in the Podfile? I'm on 0.63-rc1 where it's in the react-native package itself.

@stevelizcano I did it in ios/Podfile:

def add_flipper_pods!
  version = '~> 0.41.1'
  pod 'FlipperKit', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
end

and android/gradle.properties:

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.37.0

can't remember why I ended up picking different version between the two. May have been another error that popped up.

@stevelizcano ah that might be one difference. I'm still on 0.62.2, haven't tried to upgrade to the release candidate yet.

@stevelizcano I did it in ios/Podfile:

def add_flipper_pods!
  version = '~> 0.41.1'
  pod 'FlipperKit', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
  pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
end

and android/gradle.properties:

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.37.0

can't remember why I ended up picking different version between the two. May have been another error that popped up.

work for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlongster picture jlongster  路  3Comments

ghost picture ghost  路  3Comments

aniss picture aniss  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

oney picture oney  路  3Comments