Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make request with fetch after authorizing with certificate on iOS native side #26388

Closed
ashotosipyan opened this issue Sep 9, 2019 · 2 comments
Labels
Bug 🌐Networking Related to a networking API. Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@ashotosipyan
Copy link

I have project which needs to authorize client with personal certificate, as react-native cannot do that request I have a bridge module and do that on objective-c, after successful authorization I get session in NSURLSession dataTask and cookies. I send cookies to js for next REST request with fetch, but get error of certificate. On native side all requests works fine. I'm just wondering if anybody can give an advice how to solve that problem, I think that with fetch I'm just losing my current session or something like that.

React Native version:

React Native Environment Info:
System:
OS: macOS 10.14.6
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 113.96 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.8.0 - /usr/local/bin/node
npm: 6.10.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 27, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.9 => 0.59.9
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. Request with NSURLSession on native side
  2. Got cookies in that session
  3. Send cookies to react-native
  4. REST request with fetch including cookies in header
  5. Failed authorization

Expected to happen:
Get data in response from active session.

@react-native-bot react-native-bot added Platform: iOS iOS applications. 🌐Networking Related to a networking API. labels Sep 9, 2019
@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.60 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Oct 11, 2019
@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 3, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug 🌐Networking Related to a networking API. Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants