View Issue Details

IDProjectCategoryView StatusLast Update
0008912Talerwallet (Android App)public2024-07-26 00:12
ReporterFlorian Dold Assigned Toavalos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.12Fixed in Version0.12 
Summary0008912: Android wallet often shows "could not resolve hostname" when opening wallet with a pending manual withdrawal
DescriptionMaybe the device was put in sleep mode and the network stack was shut down as well?

Still unclear why this doesn't go away quickly when Android supports network availability hints.
TagsNo tags attached.

Activities

avalos

2024-06-17 17:31

developer   ~0022651

If a disabled networking stack is to blame, I should in theory be able to reproduce the same result by disabling network.

When network is unavailable, the app properly notifies wallet-core:

```
sending message:
{
  "id": 14,
  "operation": "hintNetworkAvailability",
  "args": {
    "isNetworkAvailable": false
  }
}
```

After a few seconds, however, I receive this observability event from wallet-core:

```
{
  "type": "notification",
  "payload": {
    "type": "task-observability-event",
    "taskId": "withdraw:37KEXQV94CDB9C0VEGMTP1RD6MDYV40XCR5HYS4C8BZ9HMMP7GP0",
    "event": {
      "id": "req-1001",
      "when": {
        "t_ms": 1718637948101
      },
      "type": "http-fetch-finish-error",
      "url": "https://exchange.chf.taler.net/reserves/67XHTKZ4F15CTXHTM14QNQPDZ9FFPGSDH90JH8CTM2AS3DHB0WJG?timeout_ms=30000",
      "error": {
        "code": 7005,
        "when": {
          "t_ms": 1718637948101
        },
        "hint": "Request timed out",
        "requestUrl": "https://exchange.chf.taler.net/reserves/67XHTKZ4F15CTXHTM14QNQPDZ9FFPGSDH90JH8CTM2AS3DHB0WJG?timeout_ms=30000",
        "requestMethod": "GET",
        "httpStatusCode": 0
      }
    }
  }
}
```

Indicating that wallet-core is still waiting for a response.

I tested this using the dev/ivan-avalos/native-net branch, with native networking support.
Screenshot_20240617_093124.png (49,569 bytes)   
Screenshot_20240617_093124.png (49,569 bytes)   

Florian Dold

2024-06-19 14:55

manager   ~0022673

IMO two separate issues:
* wallet-core should not make network requests when it knows that it is offline (0008966)
* The UI should not show (network) errors on the transactions list when offline and the transaction is active (=pending/aborting/finalizing).

We might consider still showing old errors at least on the details page (but with the warning that the device is offline, and the error might have resulted from that).

avalos

2024-06-19 20:10

developer   ~0022676

As it stands now, the app is not able to distinguish between network errors and other kinds of errors, so the latter would require e.g. hardcoding the GANA error codes that are known to be network errors. I don't think the apps should make too many decisions based on the contents of error messages.

Florian Dold

2024-06-19 21:02

manager   ~0022678

In the first iteration, we don't need to distinguish between network errors and other errors.

Simple: If it's a pending/aborting/finalizing transaction, hide the error from the transactions list when offline (and show with hint that we're offline in the details view).

There are very few cases where these's an error in pending/aborting/finalizing and it's *not* either:
* An error due to network problem
* An error due to the result of the last request

For both of these cases, doesn't make sense to keep showing the error while offline IMO.

We can always refine this later and introduce some "error category" with transactions that have an error, but now is not the right time to introduce this IMO.

The simple heuristic based on the major state and network availability should be enough.

avalos

2024-06-20 17:22

developer   ~0022690

Fixed in 10f01495670d5cd88e2f3e4582bb59d2c96bf0eb.

Here I introduced a conditional that hides the error message when the transaction is pending/aborting and the network is unavailable:
https://git.taler.net/taler-android.git/tree/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt?id=10f01495670d5cd88e2f3e4582bb59d2c96bf0eb#n203

The logic should respond dynamically to network state changes.

Issue History

Date Modified Username Field Change
2024-06-07 19:51 Florian Dold New Issue
2024-06-07 19:51 Florian Dold Status new => assigned
2024-06-07 19:51 Florian Dold Assigned To => Florian Dold
2024-06-10 16:32 Florian Dold Assigned To Florian Dold => avalos
2024-06-17 17:31 avalos Note Added: 0022651
2024-06-17 17:31 avalos File Added: Screenshot_20240617_093124.png
2024-06-17 17:32 avalos Status assigned => confirmed
2024-06-17 17:34 avalos Assigned To avalos => Florian Dold
2024-06-17 17:34 avalos Status confirmed => feedback
2024-06-19 14:55 Florian Dold Note Added: 0022673
2024-06-19 14:55 Florian Dold Assigned To Florian Dold => avalos
2024-06-19 14:55 Florian Dold Status feedback => assigned
2024-06-19 20:10 avalos Note Added: 0022676
2024-06-19 21:02 Florian Dold Note Added: 0022678
2024-06-20 17:22 avalos Status assigned => resolved
2024-06-20 17:22 avalos Resolution open => fixed
2024-06-20 17:22 avalos Note Added: 0022690
2024-07-26 00:11 Christian Grothoff Fixed in Version => 0.12
2024-07-26 00:12 Christian Grothoff Status resolved => closed