JSON value '3' of type NSNumber cannot be converted to CGSize
See original GitHub issueGetting this error while added MapView inside swiper.
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:
- Created 5 years ago
- Comments:7
Top GitHub Comments
@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 😸
@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.