Any insights or suggestions on why the successful response (Code 0) is being changed to UNAVAILABLE (Code 14) would be greatly appreciated. The bundled nature of the code makes it challenging to pinpoint the exact location of this transformation.
![image](https://github.com/user-attachments/assets/b743118e-1ed7-4e77-b69d-343a308364bb)
![image](https://github.com/user-attachments/assets/7669d482-5cde-46c3-8e6e-91ae4d2b585e)
![image](https://github.com/user-attachments/assets/1341d923-390e-4c09-a559-8b616e0e5467)
--additional--
i got successful reponse when i use postman
![image](https://github.com/user-attachments/assets/7585d4ad-82c5-43e5-81cf-cd8a4c41f933)
--additional 2--
![image](https://github.com/user-attachments/assets/6d199a11-fa50-4af9-ad34-a4065332f842)
process data and _hasReceivedResponses change to true
![image](https://github.com/user-attachments/assets/a894af17-d216-40c7-ab37-47df774aae64)
if _hasReceivedResponses is true then occurs error every time
t seems we need to set _trailers.isCompleted to true after inserting the data, but there's no logic in between to actually change it to true.
-- additional 3 --
![image](https://github.com/user-attachments/assets/31969b2c-c8c0-48e3-8eec-0773fc0f4909)
add temp trailer compllete
then it works
grpc 4.0.1 Flutter 3.24.2 • Dart 3.5.2 DevTools 2.37.2
I'm using Flutter Web WASM and encountering an unusual issue with gRPC calls. Here's the setup and problem description:
Environment:
The Issue:
Attempted Solutions:
Steps to Reproduce:
flutter build web --wasm --no-tree-shake-icons
Relevant Code:
const https = 'https://'; const http = 'http://';
String getBaseUrl() { String? hostname = window.location.hostname;
return hostname.contains('localhost') || hostname.contains('127.0.0.1') ? '$http$hostname:50051/' : '$https$hostname/'; }
GrpcWebClientChannel getGrpcChannel() { return GrpcWebClientChannel.xhr(Uri.parse(getBaseUrl())); }
part 'login_api.g.dart';
@riverpod Future<UserLoginResponse?> login(LoginRef ref, {required String email, required String password}) async { final messageNotifier = ref.read(messageNotifierProvider.notifier);
if (email.isEmpty || !email.contains('@') || password.isEmpty) { messageNotifier.showError('이메일이나 비밀번호가 올바르게 입력되지 않았습니다.'); return null; }
print(email); print(password); final request = UserLoginRequest() ..email = email ..password = password; final response = await GrpcClients.login.userLogin(request); print(response); return response; }