-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
compass_app: failure to connect to remote/mock auth server in staging mode #2563
Comments
I just noticed that my integration tests with remote server also fail (and probably have always failed for me.) It seems that the root cause is also a problem with authentication against the mock server.
|
I finally had a chance to dig deeper and found that the two issues are not related. The initial problem (can't connect to mock auth server in staging mode) is because samples/compass_app/app/lib/data/services/api/api_client.dart Lines 19 to 25 in d62c784
This would be fine if server and client ran on the same machine but since I had started my client on an Android emulator, my client's localhost was different than that of the server. There is currently no way to pass in a different host name but when I hardcoded both providers to use my machine's actual IP address rather than
If it's ok with the maintainers I'll file a PR to provide for configurable port and hostnames similar to https://github.com/flutter/samples/blob/main/code_sharing/client/lib/main.dart The second problem described in the comment (integration test fails) is unrelated. Here, the issue is that during samples/compass_app/app/integration_test/app_server_data_test.dart Lines 36 to 45 in d62c784
|
When running
flutter run --target lib/main_staging.dart
the app doesn't authenticate the mock user against the mock auth server which is running on localhost:8080From the log:
I verified that in AuthApiClient the correct host/port gets passed to HttpClient but it appears that later the port is ignored and HttpClient attempts to post to a random port.
samples/compass_app/app/lib/data/services/api/auth_api_client.dart
Line 28 in 42c081f
The text was updated successfully, but these errors were encountered: