inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

배달앱 클론코딩 [with React Native]

회원가입시 아래의 에러 메시지가 나타납니다.

해결된 질문

1134

강용석

작성한 질문수 12

0

Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[46,46,48,26,23],[0,1,1,0,5],[[301,2000,1661137034418,false],[301],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"[AxiosError: Network Error]\"]}",1],[203,"RCTRawText",41,{"text":"회원가입"}]],620]
ios에서 실 기기를 갖고 테스트 중인데 위와 같은 에러가 나타나네요..ㅠㅠ 어떤 부분을 보면 좋을까요?

react-native

답변 1

0

제로초(조현영)

저 부분만 봐서는 저도 모릅니다. 질문 공지에도 말씀드렸지만 코드 없으면 저도 파악이 안됩니다. 백엔드 서버 콘솔에 더 정확한 에러가 있을것같긴 합니다.

0

강용석

 

2022-08-22 14:29:18.205576+0900 FoodDeliveryApp[91055:2266755] [javascript] Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.[[46,46,48,26,23],[0,1,1,0,5],[[231,2000,1661146158155,false],[231],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"[AxiosError: Network Error]\"]}",1],[865,"RCTRawText",1,{"text":"회원가입"}]],978]

This error is located at:

    in RCTText (at Text.js:184)

    in Text (at SignUp.tsx:142)

    in RCTView (at View.js:32)

    in View (at SignUp.tsx:123)

    in RCTScrollContentView (at ScrollView.js:1682)

    in RCTScrollView (at ScrollView.js:1800)

    in ScrollView (at ScrollView.js:1826)

    in ScrollView (at KeyboardAwareScrollView.js:14)

    in KeyboardAwareScrollView (at DismissKeyboardView.tsx:18)

    in TouchableWithoutFeedback (at DismissKeyboardView.tsx:17)

    in DismissKeyboardView (at SignUp.tsx:90)

    in SignUp (at SceneView.tsx:132)

    in StaticContainer

    in EnsureSingleNavigator (at SceneView.tsx:124)

    in SceneView (at useDescriptors.tsx:217)

    in RCTView (at View.js:32)

    in View (at DebugContainer.native.tsx:27)

    in DebugContainer (at NativeStackView.native.tsx:76)

    in MaybeNestedStack (at NativeStackView.native.tsx:288)

    in RNSScreen (at createAnimatedComponent.js:211)

    in AnimatedComponent (at createAnimatedComponent.js:264)

    in AnimatedComponentWrapper (at src/index.native.tsx:257)

    in MaybeFreeze (at src/index.native.tsx:256)

    in Screen (at NativeStackView.native.tsx:214)

    in SceneView (at NativeStackView.native.tsx:342)

    in RNSScreenStack (at src/index.native.tsx:188)

    in ScreenStack (at NativeStackView.native.tsx:331)

    in NativeStackViewInner (at NativeStackView.native.tsx:388)

    in RNCSafeAreaProvider (at SafeAreaContext.tsx:87)

    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)

    in SafeAreaProviderCompat (at NativeStackView.native.tsx:387)

    in NativeStackView (at createNativeStackNavigator.tsx:72)

    in Unknown (at createNativeStackNavigator.tsx:71)

    in NativeStackNavigator (at AppInner.tsx:46)

    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)

    in BaseNavigationContainer (at NavigationContainer.tsx:132)

    in ThemeProvider (at NavigationContainer.tsx:131)

    in NavigationContainerInner (at AppInner.tsx:26)

    in AppInner (at App.tsx:27)

    in Provider (at App.tsx:26)

    in App (at renderApplication.js:50)

    in RCTView (at View.js:32)

    in View (at AppContainer.js:92)

    in RCTView (at View.js:32)

    in View (at AppContainer.js:119)

    in AppContainer (at renderApplication.js:43)

    in FoodDeliveryApp(RootComponent) (at renderApplication.js:60)

2022-08-22 14:29:18.313214+0900 FoodDeliveryApp[91055:2266521] [native] Running surface LogBox ({

    initialProps =     {

    };

    rootTag = 21;

})

2022-08-22 14:29:20.250838+0900 FoodDeliveryApp[91055:2266755] [javascript] Possible Unhandled Promise Rejection (id: 1):

Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.

 

[[46,46,48,26,23],[0,1,1,0,5],[[231,2000,1661146158155,false],[231],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"[AxiosError: Network Error]\"]}",1],[865,"RCTRawText",1,{"text":"회원가입"}]],978]

@[native code]

enqueueNativeCall@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:2975:43

nonPromiseMethodWrapper@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:2609:78

createView@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:55345:42

createTextInstance@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:7001:57

completeWork@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:13307:64

completeUnitOfWork@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:18032:34

performUnitOfWork@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:18009:29

workLoopSync@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:17938:28

renderRootSync@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:17916:25

performSyncWorkOnRoot@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:17661:40

performSyncWorkOnRoot@[native code]

flushSyncCallbacks@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:7634:36

flushSyncCallbacksOnlyInLegacyMode@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:7615:29

scheduleUpdateOnFiber@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:17245:47

dispatchSetState@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:11614:43

dispatchSetState@[native code]

@http://192.168.1.78:8081/src/pages/SignUp.bundle?platform=ios&modulesOnly=true&app=kr.co.touchtop&dev=true&minify=false&runModule=true&shallow=true:114:19

generatorResume@[native code]

asyncGeneratorStep@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:24430:26

_throw@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:24456:29

tryCallOne@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:28646:16

@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:28747:27

@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:29911:26

_callTimer@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:29811:17

_callReactNativeMicrotasksPass@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:29846:17

callReactNativeMicrotasks@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:30054:44

__callReactNativeMicrotasks@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:3033:46

@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:2811:45

__guard@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:3016:15

flushedQueue@http://192.168.1.78:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=kr.co.touchtop:2810:21

flushedQueue@[native code]

callFunctionReturnFlushedQueue@[native code]

2022-08-22 14:29:22.659426+0900 FoodDeliveryApp[91055:2266521] [EventDispatcher] Found no UIEvent for backing event of type: 11; contextId: 0x209D010E; Event will not be dispatched

2022-08-22 14:29:22.659774+0900 FoodDeliveryApp[91055:2266521] [EventDispatcher] Found no UIEvent for backing event of type: 11; contextId: 0x209D010E; Event will not be dispatched

 

소스코드는 아래와 같습니다.

try{

      setLoading(true);

      Alert.alert("email",email);

      Alert.alert("name",name);

      Alert.alert("password",password);

      //await은 비동기라는걸 표시해 주는것임 promise

      //http method : get put patch post delete head options

      const response = await axios.post(`${Config.API_URL}/user`,{email,name,password});      

      console.log(response);      

      Alert.alert('알림', '회원가입 되었습니다.');

      //tsc 4.4부터 변경됨.

    }catch(e:any){

      console.log(e);

      Alert.alert('알림', e);      

    } finally{

      setLoading(false);

    }

참고 로 현재 IOS에서 빌드하고 있습니다.

그리고 http기반이라  Allow Arbitrary Loads은 YES로 추가해 놓은 상태입니다.

뭐가 문제인지 알수가 없어서 문의 드립니다. 

 

 

0

제로초(조현영)

이 부분말고 백엔드 서버 켜놓은 콘솔에는 에러가 없나요?

0

강용석

없습니다. postman으로 테스트 결과 정상적으로 200 status code가 출력됩니다.

 

 

0

제로초(조현영)

시뮬레이터 사파리에서 192.168.1.78:3105 로 접속하면 정상적으로 화면 뜨시나요? 안 뜬다면 localhost:3105로도 해보세요.

그리고 소스코드에서 Alert에서 email, name, password 전부 다 정상적으로 뜬 뒤에 catch 쪽에 Alert가 뜨는 건가요?

0

강용석

이상하네요 아래와 같이 세팅했는데
console.log("log",Config.API_URL); -> undefined라고 뜹니다.

이렇게 설정되어 있는데 위치가 잘못된걸까요? 실기기에서 하다가 하도 안되서 시뮬레이터 띄우고 localhost로 해도 똑같이 뜨네요...ㅠㅠ 역시나 Config안쓰고 강제로 하드코딩해서 url을 넣으니 잘 작동하네요. 내일은 왜 정상작동안하는지 꼼꼼히 살펴봐야 할듯 합니다.

0

제로초(조현영)

좀 찾아봤는데 Podfile에

pod 'react-native-config', :path => '../node_modules/react-native-config/react-native-config.podspec'

넣고 pod install(또는 npx pod-install) 해서 재설치해보라고 하는 것 같습니다.

0

강용석

와우 고맙습니다. 잘됩니다. 근데 프로젝트할때 이렇게 설치가 안된 모듈을 어떻게 찾을수 있을까요?

import할때 에러도 없고 혹시 방법 알고 계시면 말씀좀 부탁드립니다.

0

제로초(조현영)

알기 어려워서 실행 중에 에러난 상황으로 추측합니다. 보통 제일 먼저 라이브러리를 다시 설치해보는 걸로 시작합니다.

0

강용석

아넵 감사합니다. 강사님 덕분에 하루에 출발이 좋네요 좋은 하루 되시기 바랍니다.

앱실행시 네이버맵 [401] 에러

0

1063

2

스타일링 라이브러리

0

160

2

expo, cli 선택 중에 고민이 있습니다.

0

180

2

JDK 버전이 달라도 괜찮나요?

0

240

2

dimenstion usewindowdeminstion

0

130

3

[맥 전용]환경 설정하기 1편 & [맥 전용]환경 설정하기 2편의 영상이 안나옵니다.

0

217

1

jdk11 버전과 gradle 버전의 호환성 관련 질문드립니다.

0

407

2

강의 외 질문입니다!

0

164

2

react native랑 맞는 ui 라이브러리 어떤게 좋을까요?

0

1552

2

react native와 spring boot 연결

0

365

1

java가 아닌 .kt에서 code push 에러가 발생합니다.

0

222

2

flipper 239 에러가 발생합니다.

0

172

2

package.json에 /lib/panino.js 문제입니다.

0

480

2

window - mac 협업 과정 질문합니다

0

221

1

ios 빌드 중 RCTBridgeDelegate.h import 오류

0

294

2

ios 앱 빌드 중 hermesEnabled 관련 오류발생

0

249

2

Socket 연결시 질문 드립니다.!

0

157

2

wifi 환경에서 axios 통신이 로컬서버에서 안됩니다.

0

430

2

iOS render error 질문드립니다.

0

417

2

iOS 가상머신 오류

0

173

2

npc react init 명령어 실행시 발생되는 오류

0

224

1

nom start 시 오류

0

122

1

NextJS 기반으로 만들어서 웹뷰 React Native로 배포 가능한가요?

0

1019

2

안드로이드 rn75 버전에 맞게 설정 중에 android13 다운로드에 대해서 막혔습니다!

0

187

2