question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS 14 Time picker crash

See original GitHub issue

Bug report

Summary

On iOS 14 when pressing the time picker and trying to change the time with the keyboard, the system crashes. Error: Argument 0 (NSNumber) of UIManager.measure must not be null

Environment info

react-native info output:

    OS: macOS 10.15.6
    CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
    Memory: 45.46 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 13.8.0 - /usr/local/bin/node
    Yarn: 1.22.0 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
  Languages:
    Java: 13.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.9.0 => 16.9.0 
    react-native: ^0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Library version: x.x.x

Steps to reproduce

  1. Create a DateTimePicker only with mode=“time”
  2. Press on the default time
  3. Press on the time again to open keyboard.
  4. System crashes

Describe what you expected to happen:

  1. no Crash

Reproducible sample code

IMG_F4B5C2C40C2A-1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
harveyconnorcommented, Sep 27, 2020

Yep text color is the cause.

5reactions
gentleecommented, Sep 24, 2020

textColor is the cause.

Workaround:

<DateTimePicker
  value={value}
  mode={'date'}
  is24Hour={true}
  onChange={onChangeDatepicker}
  {...(Platform.OS === 'ios' && parseFloat(Platform.Version) >= 14
    ? null
   : { textColor: theme.colors.black })} // on ios 14+ causes crash
/>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Datepicker iOS 14 crashes on completely empty project
Hi, In my project I noticed that date-picker component keeps crashing on a specific dates. Sending this error message: "Invalid calculation: number of ......
Read more >
iOS 14 Datepicker issue with preferredDatePickerStyle set to ...
Crashlytics is reporting this crash in our live app, on iOS 14.4.0 (18D52). Will have to move back to wheels style date picker...
Read more >
Crash when user tap “Reset” button of datetime picker in ios ...
How to remove/Hide Reset button, I am using Ionic v1 with IOS 14 when I click on reset button my app crashes every...
Read more >
react-native-community/datetimepicker - npm
React Native date & time picker component for iOS, Android and Windows. ... "spinner" - the usual pre-iOS 14 appearance with a wheel...
Read more >
Datepicker crashes apps on iOS 14 when timezone set to Beirut : r ...
This started happening when i upgraded to iOS 14 and the old wheel style is replaced with a newer compact datepicker. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found