Skip to content

[iOS] CookieManager.get with useWebKit crash if argument is not a url #9

@yilinjuang

Description

@yilinjuang

Bug

This crashes.

CookieManager.get("google.com", true);

Environment info

React native info output:

System:
    OS: macOS 10.15.2
    CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
    Memory: 539.84 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.6.0 - /var/folders/z1/7nfybp6x3ns9gzz58cm53m480000gn/T/yarn--1579114313928-0.6154963038500227/node
    Yarn: 1.21.1 - /var/folders/z1/7nfybp6x3ns9gzz58cm53m480000gn/T/yarn--1579114313928-0.6154963038500227/yarn
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 27, 28, 29
      Build Tools: 27.0.3, 28.0.3, 29.0.2
      System Images: android-23 | Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5

Library version: 1.0.1

Steps To Reproduce

Run this and crash. Won't crash if it's a url like https://google.com

CookieManager.get("google.com", true);

Reproducible sample code

CookieManager.get("google.com", true);

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingiOS

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions