강의

멘토링

커뮤니티

Inflearn Community Q&A

dalkomme4291's profile image
dalkomme4291

asked

[Code Factory] [Intermediate] Flutter Real Practice! State Management, Cache Management, Code Generation, GoRouter, Authentication Logic, etc. Essential Skills to Become an Intermediate!

Requesting Auth API with Dio

토큰 관련 질문입니다

Written on

·

1.4K

0

Dio관련 질문인데요,

토큰 발행 시

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DioError [DioErrorType.other]: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 10.0.2.2, port = 52006

위와 같은 오류가 나오고 있는데 해결 방법은 어떻게 되나요??

Flutter하이브리드 앱

Answer 2

1

저도 동일한 문제가있었는데, port문제가아니라 안드로이드 실기기로 진행할때 발생했습니다. 저같은경우에는 제 맥북에 ifconfig를 입력해서 ip주소를 알아낸다음 그것을 $ip 변수에 넣어서 해결했습니다

codefactory님의 프로필 이미지
codefactory
Instructor

네 맞습니다~

실 기기 사용하시면 해당 기기의 IP를 입력하셔야합니다!

10.0.2.2는 에뮬레이터에서 호스트기기로 통신할때의 IP입니다.

0

codefactory님의 프로필 이미지
codefactory
Instructor

안녕하세요. 52006 포트로 요청하고계신것같은데 3000번 포트가 맞습니다. Postman으로 다시 확인해보신 후 코드 확인 부탁드립니다~

dalkomme4291's profile image
dalkomme4291

asked

Ask a question