flower
flower copied to clipboard
Android client code: "Method not found"
What is your question?
I run android client code and when I press "Train federated", I got a message: "E/Flower: UNIMPLEMENTED: Method not found!". The Client did not connect to server. I don't know to fix this?
This is the information show on run console:
E/Flower: 998th test image loaded E/Flower: 999th test image loaded E/Flower: 1000th test image loaded I/ViewRootImpl@b64e87c[MainActivity]: ViewPostIme pointer 0 I/ViewRootImpl@b64e87c[MainActivity]: ViewPostIme pointer 1 I/IMM_LC: hsifw() - flags=0, caller=android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1846 android.view.inputmethod.InputMethodManager.hideSoftInputFromWindow:1815 flwr.android_client.MainActivity.hideKeyboard:80 flwr.android_client.MainActivity.connect:123 java.lang.reflect.Method.invoke:-2 hideSoftInputFromWindow - mService.hideSoftInput I/ViewRootImpl@b64e87c[MainActivity]: ViewPostIme pointer 0 I/ViewRootImpl@b64e87c[MainActivity]: ViewPostIme pointer 1 E/Flower: UNIMPLEMENTED: Method not found!
I am having the same issue. `2022-09-15 11:17:27.316 6693-6718/flwr.android_client D/EGL_emulation: app_time_stats: avg=236.74ms min=95.84ms max=502.87ms count=5
2022-09-15 11:17:28.347 6693-6718/flwr.android_client D/EGL_emulation: app_time_stats: avg=31.57ms min=2.10ms max=497.32ms count=27
2022-09-15 11:17:29.149 6693-6742/flwr.android_client E/Flower: UNIMPLEMENTED: Method not found!
2022-09-15 11:17:29.363 6693-6718/flwr.android_client D/EGL_emulation: app_time_stats: avg=18.39ms min=2.01ms max=215.59ms count=48
2022-09-15 11:17:30.831 6693-6718/flwr.android_client D/EGL_emulation: app_time_stats: avg=43.99ms min=13.45ms max=498.48ms count=33
2022-09-15 11:17:31.832 6693-6718/flwr.android_client D/EGL_emulation: app_time_stats: avg=499.62ms min=498.78ms max=500.46ms count=2`
There is no additional error message so it's not very clear to what "method" it is referring to. It's clear however that the client does not connect to the server.
Update: It seems the error comes from the fact that there is an incompatibility between the "Join" function header in transport.proto of the Android client app and its implementation on the python Flower server. The error message "UNIMPLEMENTED: Method not found!" is returned by the gRPC python server implementation: https://github.com/grpc/grpc/blob/598e171746576c5398388a4c170ddf3c8d72b80a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi#L734 A similar issue has been reported here: https://github.com/grpc/grpc-java/issues/7263
Please provide help with this.
I think it is caused by a version problem. This problem also occurs when I use the 1.0.0 version of flwr on the server. When I change to the 0.18.0 version, it can work