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.

JSON value '3' of type NSNumber cannot be converted to CGSize

See original GitHub issue

Getting this error while added MapView inside swiper. image

Full error:

JSON value ‘3’ of type NSNumber cannot be converted to CGSize

convertCGStruct RCTConvert.m:444 +[RCTConvert CGSize:] invoking_ -[NSInvocation invoke] __createNSInvocationSetter_block_invoke __49-[RCTComponentData createPropBlock:isShadowView:]_block_invoke.162 __49-[RCTComponentData propBlockForKey:isShadowView:]_block_invoke_2 RCTPerformBlockWithLogFunction RCTPerformBlockWithLogPrefix __49-[RCTComponentData propBlockForKey:isShadowView:]_block_invoke __37-[RCTComponentData setProps:forView:]_block_invoke -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] -[RCTComponentData setProps:forView:] __50-[RCTUIManager createView:viewName:rootTag:props:]_block_invoke.467 __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.544 __RCTExecuteOnMainQueue_block_invoke _dispatch_call_block_and_release _dispatch_client_callout _dispatch_main_queue_callback_4CF CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE __CFRunLoopRun CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main start

Tried to set every prop but still not working. there are total 4 swipe screen, 1st one is map view and rest are simple screens. <Swiper showsButtons={true} index={0} loop={false} nextButton={<Text style={{fontSize:20,color:colors.colorPrimary,backgroundColor:'#fff',paddingHorizontal:10,paddingVertical:10,borderRadius:5}}>{translate('next')}</Text>} prevButton={<Text style={{fontSize:20,color:colors.colorPrimary}}> {translate('previous')} </Text>} scrollEnabled={false} buttonWrapperStyle={{backgroundColor: 'transparent', flexDirection: 'row', position: 'absolute', bottom: 0, left: 0, flex: 1, paddingHorizontal: 10, paddingVertical: 10, justifyContent: 'space-between', alignItems: 'flex-end'}} activeDotColor={colors.colorPrimary} loadMinimal={true} loadMinimalSize={3} dot={<View style={{backgroundColor:'rgba(0,0,0,.2)', width: 8, height: 8,borderRadius: 4, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 0}} />} activeDot={<View style={{backgroundColor:colors.colorPrimary, width: 8, height: 8,borderRadius: 4, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 0}} />} >

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Ravi448commented, Nov 17, 2019

@ashwingattani Basically I had swiper in my app. In the last screen of swiper, I got the error, then I investigated each component in last screen and found the exact error. It took me 1 week to trace the error 😸

1reaction
Ravi448commented, Oct 20, 2019

@anastely It was a type error. I had mistakenly converted string into number. Basically I had an input and that was taking number inputs, but I entered string input in that input. That was the mistake.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native - json value '0' of type nsnumber cannot be ...
I am getting this error in the ios simulator however: json value '0' of type nsnumber cannot be converted to nsstring' Has anyone...
Read more >
Fixing an error: JSON value '1' of type NSNumber cannot be ...
After having upgraded React Native to 0.62.2, it got the following error: JSON value '1' of type NSNumber cannot be converted to NSString ......
Read more >
JSON value of '1' of type NSNumber cannot be converted to a ...
HomeJSON value of '1' of type NSNumber cannot be converted to a valid URL'. JSON value of '1' of type NSNumber cannot be...
Read more >
React Native - Json Value '1311' Of Type Nsnumber Cannot ...
representable json values that require no conversion. / for NSNumber number in json {. NSInteger @Values of HTTP headers passed must be of...
Read more >
React Native - Value of type NSString cannot be converted to ...
[Solved]-React Native - Value of type NSString cannot be converted to a ABI44_0_0YGValue-React Native. Search. score:3. Accepted answer.
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