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.

NSInvalidArgumentException on iOS, React 0.40

See original GitHub issue

Hi, I’m getting this issue thrown. Is this occurring for anyone else?

Setup:
“react”: “15.4.2”, “react-native”: “^0.40.0”, “react-native-progress”: “^3.2.0”,

Error:

[__NSArrayI length]: unrecognized selector sent to instance 0x131a20af0
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI length]: unrecognized selector sent to instance 0x131a20af0'

Code;

- (instancetype) initWithPathString:(NSString *)d
{
    if (self = [super init]) {
        NSRegularExpression* decimalRegularExpression = [[NSRegularExpression alloc] initWithPattern:@"(\\.\\d+)(?=\\-?\\.)" options:0 error:nil];
        _originD = d;

         // ERROR ON THE LINE BELOW //
        _d = [decimalRegularExpression stringByReplacingMatchesInString:d options:0 range:NSMakeRange(0, [d length]) withTemplate:@"$1\,"];
         // ERROR ON THE LINE ABOVE // 


        _pathRegularExpression = [[NSRegularExpression alloc] initWithPattern:@"[a-df-z]|[\\-+]?(?:[\\d.]e[\\-+]?|[^\\s\\-+,a-z])+" options:NSRegularExpressionCaseInsensitive error:nil];
    }
    return self;
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
azhararmarcommented, Mar 9, 2019

It turns out the issue is when I use width={‘100%’}, I had missed the documentation, when I looked back again and set the width value to null, it is working again.

1reaction
amsulcommented, Jan 19, 2017

I’m having the exact same issue, but with https://github.com/bgryszko/react-native-circular-progress

Not sure if it’s a ReactNativeART related issue, but it definitely only started to appear after upgrading to RN 0.40

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native IOS: "Terminating app due to uncaught ...
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.
Read more >
NSCFString objectForKeyedSubscript unrecognized selector ...
When I run it, it crashes and gives this error: NSCFString objectForKeyedSubscript unrecognized selector sent to instance. I want to show ...
Read more >
[Solved]-React Native on M1 Air fails to build for iOS
In my podfile I updated my use_flipper to use_flipper!('Flipper' => '0.75.1', 'Flipper-Folly' => '2.5.1', 'Flipper-RSocket' => '1.3.1').
Read more >
react-native-in-app-utils - npm
A react-native wrapper for handling in-app purchases in iOS. Breaking Change. Due to a major breaking change in RN 0.40+, use version 5...
Read more >
unrecognized selector sent to instance 0x1dae7dbf8
I am a React native developer I don't have knowledge on IOS app development. ... app due to uncaught exception 'NSInvalidArgumentException', ...
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