MetaMask / metamask-android-sdk

MetaMask SDK for Android
Other
41 stars 13 forks source link

[Bug]: HttpClient: error #144

Open johnspeny opened 2 weeks ago

johnspeny commented 2 weeks ago

Provide environment information

I am running the MetaMask SDK on Android Studio with Java as the language I converted the Kotlin functions to Java—these functions Here.

When I click on the button that is meant to open and connect to the MetaMask wallet from my Demo Android application, I get the result of an address on MetaMask or sometimes I get the Htpp Client error as seen from the Android studio Logcat. I don't know why it is like that, I need your guidance here.

MetaMask Android SDK Version

0.5.4

MetaMask Mobile app Version

MetaMask v7.28.1(1386)

Android Version

Android 10

Describe the Bug

Here is the log i continuously receive as seen from Android Studio: HttpClient: error failed to connect to metamask-sdk-socket.metafi.codefi.network/3.20.45.36 (port 443) from /10.162.109.140 (port 51510) after 10000ms

Expected Behavior

I just want to know how to get rid of that error, once it's available I am unable to get the address on MetaMask or even interact with any of the methods provided by MetaMask SDK

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

No response

To Reproduce

Here is the dependency I use

implementation "io.metamask.androidsdk:metamask-android-sdk:0.5.4"

Here is my code snippet in Java to reproduce

public static void connectWith(EthereumRequest ethereumRequest, OnSuccessCallback onSuccess, OnErrorCallback onError) {
    ethereum.connectWith(ethereumRequest, new Function1<Object, Unit>() {
        @Override
        public Unit invoke(Object result) {
            if (result instanceof RequestError) {
                Log.e("Java-App", "Ethereum connection error: " + ((RequestError) result).getMessage());
            } else {
                // Item(value=
                Log.d("Java-App", "Ethereum connection result: " + result);
            }
            return null;
        }
    });
}
elefantel commented 3 days ago

Hi @johnspeny you are on quite an old sdk version (0.5.4), please update to version 0.6.5. That error is related to analytics and that is the old analytics endpoint that is not longer reachable.