Coder Social home page Coder Social logo

Comments (9)

notmandatory avatar notmandatory commented on July 17, 2024

I think it's failing with below exception, I confirmed the 75wg.onion address is correct and is where I login to the dojo admin via tor browser.

D/OkHttp: --> POST http://75wg<redacted>.onion/test/v2/auth/login
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 15
    apikey=<redacted>
    --> END POST (15-byte body)
D/OkHttp: <-- HTTP FAILED: java.net.UnknownHostException: Host is unresolved: 75wg<redacted>.onion
W/System.err: java.net.UnknownHostException: Host is unresolved: 75wg<redacted>.onion
        at java.net.Socket.connect(Socket.java:865)
        at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:71)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167)
        at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
        at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
        at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
W/System.err:     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:264)
        at okhttp3.RealCall.execute(RealCall.java:93)
        at com.samourai.wallet.util.WebUtil.tor_postURL(WebUtil.java:319)
        at com.samourai.wallet.api.APIFactory.getToken(APIFactory.java:286)
        at com.samourai.wallet.api.APIFactory.getAccessToken(APIFactory.java:161)
        at com.samourai.wallet.api.APIFactory.registerXPUB(APIFactory.java:431)
        at com.samourai.wallet.api.APIFactory.initWalletAmounts(APIFactory.java:1695)
W/System.err:     at com.samourai.wallet.api.APIFactory.initWallet(APIFactory.java:1670)
        at com.samourai.wallet.service.RefreshService.onHandleIntent(RefreshService.java:72)
        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.os.HandlerThread.run(HandlerThread.java:61)
    java.lang.NullPointerException: value == null
        at okhttp3.FormBody$Builder.add(FormBody.java:120)
        at com.samourai.wallet.util.WebUtil.tor_postURL(WebUtil.java:296)
        at com.samourai.wallet.api.APIFactory.registerXPUB(APIFactory.java:432)
        at com.samourai.wallet.api.APIFactory.initWalletAmounts(APIFactory.java:1695)
        at com.samourai.wallet.api.APIFactory.initWallet(APIFactory.java:1670)
        at com.samourai.wallet.service.RefreshService.onHandleIntent(RefreshService.java:72)
        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.os.HandlerThread.run(HandlerThread.java:61)

from samourai-dojo.

LaurentMT avatar LaurentMT commented on July 17, 2024

the api key is included in the qr code.
did you use the V3 onion address for the pairing?

from samourai-dojo.

notmandatory avatar notmandatory commented on July 17, 2024

Hi, yes I used the v3 onion address to connect to the admin web server:

$ sudo ./dojo.sh onion
API hidden service address (v3) = 75wg<redacted>.onion

should I connect to the dojo admin page with the v2 address and re-pair a new wallet from the QR code that page gives me?

from samourai-dojo.

notmandatory avatar notmandatory commented on July 17, 2024

I tried pairing with v2 tor address and I'm getting the same exception.

API hidden service address (v2) = idx<redacted>.onion

I/System.out: 08:31:37.645 [RxCachedThreadScheduler-2] INFO com.msopentech.thali.toronionproxy.OnionProxyManager - Tor has already bootstrapped
I/DojoUtil: setDojoParams: {
        "pairing": {
            "type": "dojo.api",
            "version": "1.2.0",
            "apikey": "<redacted>",
            "url": "http://idx<redacted>/test/v2"
        }
    }
D/APIFactory: getToken() url:http://idx<redacted>.onion/test/v2/
I/TorManager: isRequired: true
I/APIFactory: API key (XOR):<redacted>
    API key url:http://idx<redacted>.onion/test/v2/
D/OkHttp: --> POST http://idx<redacted>.onion/test/v2/auth/login
D/OkHttp: Content-Type: application/x-www-form-urlencoded
    Content-Length: 15
    apikey=<redacted>
    --> END POST (15-byte body)
D/OkHttp: <-- HTTP FAILED: java.net.UnknownHostException: Host is unresolved: idx<redacted>.onion
W/System.err: java.net.UnknownHostException: Host is unresolved: idx<redacted>.onion
W/System.err:     at java.net.Socket.connect(Socket.java:865)
        at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:71)
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247)
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:167)
        at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
        at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
        at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:212)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:264)
W/System.err:     at okhttp3.RealCall.execute(RealCall.java:93)
        at com.samourai.wallet.util.WebUtil.tor_postURL(WebUtil.java:319)
        at com.samourai.wallet.api.APIFactory.getToken(APIFactory.java:286)
        at com.samourai.wallet.network.dojo.DojoUtil.lambda$setDojoParams$0(DojoUtil.java:92)
        at com.samourai.wallet.network.dojo.-$$Lambda$DojoUtil$dGLA6m9OqrbKEb8xJbd5LPw8fUE.call(lambda)
        at io.reactivex.internal.operators.observable.ObservableFromCallable.subscribeActual(ObservableFromCallable.java:42)
        at io.reactivex.Observable.subscribe(Observable.java:12030)
        at io.reactivex.internal.operators.observable.ObservableObserveOn.subscribeActual(ObservableObserveOn.java:45)
        at io.reactivex.Observable.subscribe(Observable.java:12030)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
        at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579)
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
I/BackgroundManager: still foreground

from samourai-dojo.

LaurentMT avatar LaurentMT commented on July 17, 2024

Nope. Samourai Wallet requires to use the V3 onion address. I just wanted to be sure that it wasn't the cause of your issue.

I've done a test with a Dojo 1.2 testnet instance and an old side-loaded samourai wallet. The wallet was able to connect to the Dojo (successful authentication and creation of the xpubs).

From the elements posted here, I would say that your Dojo hidden service seems fine (you can connect to your Dojo through the maintenance tool). It looks like a network/tor issue within the wallet.

Anyway, here are a few things that you can check on Dojo:

  • Is your Dojo fully synced? (do you see the same value for the "blocks" attribute in the "API" and "PushTx" tabs of the maintenance tool?)
  • Do you see errors in the logs of dojo?
    • error logs of Dojo API: dojo.sh logs api -d error -n 500
    • error logs of Dojo tracker: dojo.sh logs tracker -d error -n 500

from samourai-dojo.

notmandatory avatar notmandatory commented on July 17, 2024

I think my dojo is fully synced, the API tab returns this:

{
    "uptime": "11:02:43",
    "memory": "67 MiB",
    "ws": {
        "clients": 0,
        "sessions": 0,
        "max": 0
    },
    "blocks": 1578985
}

for api -d error -n 500 I only see a few old expired jwt token errors, but I do get those some times and just logout and back in.

I also see this error for tracker -d error -n 500, but it's from about 10 hours ago, so not sure if it's relevant.

[20190919 05:43:06.836 048 MiB] BlockchainProcessor.catchupNormalMode()
Error: {"code":-8,"message":"Block height out of range"}
    at IncomingMessage.<anonymous> (/home/node/app/node_modules/bitcoind-rpc-client/lib/index.js:208:31)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)

from samourai-dojo.

notmandatory avatar notmandatory commented on July 17, 2024

I'll try debugging this on the wallet side.. and if I still can't figure it out I'll open an issue in the wallet repo. I'm using a fairly old phone (android 5.1) so maybe that's causing an issue with the TOR connection. thanks!

from samourai-dojo.

LaurentMT avatar LaurentMT commented on July 17, 2024

Everything seems fine. It really looks like an network/tor issue on wallet side.

from samourai-dojo.

notmandatory avatar notmandatory commented on July 17, 2024

👍 I'll also try with a newer phone and see if that behaves any better. I also didn't see anything in the wallet or dojo docs about only using the V3 TOR address, maybe good to mention that V3 is required.

from samourai-dojo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.