Skip to content

Can't get syncStatus on mobile #24176

@markusbug

Description

@markusbug

System information

Geth version: GethDroid/v1.10.15-unstable/android-arm64/go1.17.3
OS & Version: Android

Expected behaviour

Should return a SyncProgress Object.

Actual behaviour

Fails with this message:

Caused by: go.Universe$proxyerror: json: cannot unmarshal string into Go struct field SyncProgress.CurrentBlock of type uint64
        at geth.EthereumClient.syncProgress(Native Method)

Steps to reproduce the behaviour

  • Bind the mobile code with gomobile into an .aar file.
  • Import .aar file into android studio project
  • Get SyncProgress in Java

You can get the SyncProgress using this Code:

import geth.*;

Node node = Geth.newNode(getFilesDir()+"/.ethNode", nodeConfig);
node.start();

Context ctx = Geth.newContext();
SyncProgress syncProgress = node.getEthereumClient().syncProgress(ctx);

Backtrace

Caused by: go.Universe$proxyerror: json: cannot unmarshal string into Go struct field SyncProgress.CurrentBlock of type uint64
        at geth.EthereumClient.syncProgress(Native Method)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions