View Issue Details

IDProjectCategoryView StatusLast Update
0007993Talerwallet-corepublic2024-03-07 20:49
Reportergrote Assigned ToFlorian Dold  
PriorityhighSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.9.3 
Target Version0.9.4Fixed in Version0.9.4 
Summary0007993: importDb of exportDb malformed
DescriptionI used the exportDb command to produce the attached JSON file. Then using the importDb API call with that file produces a malformed payment transaction.

Using wallet-core 0.9.3-dev.34

The problematic transaction is payment.json attached. Note "refundPending": "undefined:NaN" and "$": "undef"
TagsNo tags attached.
Attached Files
payment.json (927 bytes)   
{
  "type": "payment",
  "txState": {
    "major": "done"
  },
  "txActions": [
    "delete"
  ],
  "amountRaw": "KUDOS:3",
  "amountEffective": "KUDOS:3.2",
  "totalRefundRaw": "KUDOS:0",
  "totalRefundEffective": "KUDOS:0",
  "refundPending": "undefined:NaN",
  "refunds": [],
  "posConfirmation": {
    "$": "undef"
  },
  "timestamp": {
    "t_s": 1697572096,
    "off_us": 0
  },
  "transactionId": "txn:payment:1K5PNHP5YF2ZHPW59DGKG1J5AGKXX5PEMGX1TK2APDF3R8YXN6V0",
  "proposalId": "1K5PNHP5YF2ZHPW59DGKG1J5AGKXX5PEMGX1TK2APDF3R8YXN6V0",
  "info": {
    "merchant": {
      "name": "GNU Taler",
      "address": {},
      "jurisdiction": {}
    },
    "orderId": "2023.290-00P2H2HT2MA4A",
    "summary": "payment after refund",
    "contractTermsHash": "SW42BPF290DAMACSF64VHCWW0RFQ9AD0A5E9Y9JVJ9Z4P2T5Z5EEV09TE25BEZ93F4RK3J2AJR42Y4752CCTANJHR4T2PK969SNFMZR",
    "fulfillmentUrl": "taler://fulfillment-success/thx"
  }
}
payment.json (927 bytes)   

Activities

avalos

2023-11-28 18:35

developer   ~0020668

I certainly didn't come across that issue when testing the feature (in Android).

Maybe some database upgrade took place in between the import and the export?

grote

2023-11-28 18:41

developer   ~0020669

That's possible. The database has been laying around for a few weeks at least.

avalos

2023-11-28 18:42

developer   ~0020670

Still, wallet-core should upgrade the imported database right away based on the version number.

Florian Dold

2023-12-11 11:58

manager   ~0020737

This was a wallet-core bug.

When importing, the JSON dump of the DB was not properly "revived" into a JS object that can contain values like "undefined" that are not possible in JSON.

This is fixed now.

Issue History

Date Modified Username Field Change
2023-11-28 18:30 grote New Issue
2023-11-28 18:30 grote Status new => assigned
2023-11-28 18:30 grote Assigned To => Florian Dold
2023-11-28 18:30 grote File Added: taler-wallet-db-1701191723544.json
2023-11-28 18:30 grote File Added: payment.json
2023-11-28 18:35 avalos Note Added: 0020668
2023-11-28 18:41 grote Note Added: 0020669
2023-11-28 18:42 avalos Note Added: 0020670
2023-12-11 11:58 Florian Dold Status assigned => resolved
2023-12-11 11:58 Florian Dold Resolution open => fixed
2023-12-11 11:58 Florian Dold Note Added: 0020737
2024-02-10 23:31 Christian Grothoff Fixed in Version => 0.9.4
2024-03-07 20:49 Christian Grothoff Status resolved => closed