Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api request 가 특정 시점 이후 호출되지 않는 이슈 해결 #117

Merged
merged 15 commits into from
Aug 29, 2023

Conversation

easyhooon
Copy link
Collaborator

기존에 사용하던 Ktor Client 를 Retrofit Client 로 migration 하여 해결..

Ktor Client 관련 코드의 문제를 확인하기 위해 이를 지우지 않고 별도의 network module 를 만들어 ktor, retrofit client 를 분리

TODO LoadingScreen 을 api 응답 요청이 0.5초 보다 오래 걸릴때만 보여지도록 뷰모델의 api 호출 함수에 로직 추가

@easyhooon
Copy link
Collaborator Author

easyhooon commented Aug 29, 2023

okhttp version 5.0.0 alpha.2 버전 이하에서는
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
Execution failed for task ':app:minifyDebugWithR8'. 해당 에러가 발생하여

okhttp version 5.0.0 alpha.3 버전 이후(현재 최신버전5.0.0 alpha.11) 로 올려본 결과 아래의 이슈가 발생해
square/retrofit#3751
proguard 추가

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거
Copy link
Collaborator

@likppi10 likppi10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

레트로핏 용 프로가드 수정이 필요하구나 ㅇㅇ

@easyhooon
Copy link
Collaborator Author

merge 후에 먹통 이슈 발생 안하는지 한번 확인 부탁행
그리고 만약 업데이트를 한다면 release 모드일때 square/retrofit#3751 이 에러로 인해 네트워크 에러 다이얼로그가 호출되지 않는지 확인해봐야할듯

@easyhooon
Copy link
Collaborator Author

레트로핏 용 프로가드 수정이 필요하구나 ㅇㅇ

원래는 필요없는데 이슈보면 문제가 있는거같더라구, 그 해결법이 프로가드에 해당 내용을 작성하는 거구, 작년에 언급된 이슈인데 아직도 완전히 해결이 되지 않은건가..

@easyhooon
Copy link
Collaborator Author

홈 뷰모델에도 로딩 스크린 분기 처리(0.5초 보다 api 요청 응답이 덜 걸릴 경우, 이를 보여주지않는)를 적용하려 했는데 다른 뷰모델에 비해 그 로직이 복잡하고, 연쇄적으로 호출하는 함수가 많아 적용하는게 좀 어려울 것 같아서 생각 좀 해보고 다음 브랜치에서 적용해보도록 하겠음

@easyhooon easyhooon merged commit c720d04 into develop Aug 29, 2023
1 check passed
@easyhooon easyhooon deleted the feature/fix-api-request-block branch August 29, 2023 05:47
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
likppi10 added a commit that referenced this pull request Aug 30, 2023
* ruby 세팅 수정 (#93)

* ruby 세팅 수정 (#95)

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update Gemfile.lock

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* api request 가 특정 시점 이후 호출되지 않는 이슈 해결 (#117)

* uiState 변경 방식 update 로 통일

* TODO 제거

이거 예전에 지웠는데 왜 남아있지

* Ktor 를 Retrofit 으로 migration

* GuestLogin 관련 함수를 BandalartService 내에서 분리

GuestLoginService interface 로 따로 선언

* style check success

* 사용하지 않는 클래스 주석처리

* GuestLoginService Provider 추가

* KtorClient, RetrofitClient 를 별도의 networkModule 로 분리

networkModule 을 생성함에 따라 모듈의 순환 구조를 방지하기 위해 datastore 모듈 추가

* style check success

* style check success

* fix run build fail

* 스플래시 뷰모델 api 호출 이후 0.5 초 이내에 응답을 받을 경우 Loading Screen 을 띄우지 않는 로직 적용

update 로 uiState 변경 로직 통일

* chore: 코드 정리

viewModel 에서 수집한 error 는 이미 toAlertMessage 함수에 의해 custom 된 exception message 이므로 로그를 확인할 필요가 없으므로 제거

* 하드코딩된 텍스트 stringResource 로 변경

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update android-cd.yml

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle.kts

---------

Co-authored-by: JI HUN LEE <51016231+easyhooon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature tasks related to feature development hotfix tasks related to fix bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants