View Issue Details

IDProjectCategoryView StatusLast Update
0006111Talerwallet-corepublic2020-03-31 14:16
ReporterChristian Grothoff Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.7.1Fixed in Version0.7.0 
Summary0006111: wallet tests fail ('make check'): TextEncoder is not defined
Descriptionfind dist/node -name '*-test.js' | xargs node_modules/ava/cli.js


  2 tests failed

  crypto › talerCrypto-test › encoding

  /home/integrationtest/sources/wallet-core/src/crypto/talerCrypto-test.ts:51

   50: test("encoding", t => {
   51: const utf8decoder = new TextDecoder("utf-8");
   52: const utf8encoder = new TextEncoder();

  Error thrown in test:

  ReferenceError {
    message: 'TextDecoder is not defined',
  }



  crypto › talerCrypto-test › taler-exchange-tvg blind signing

  /home/integrationtest/sources/wallet-core/src/crypto/talerCrypto.ts:195

   194: export function stringToBytes(s: string) {
   195: const te = new TextEncoder();
   196: return te.encode(s);

  Error thrown in test:

  ReferenceError {
    message: 'TextEncoder is not defined',
  }

  stringToBytes (src/crypto/talerCrypto.ts:195:14)
  rsaFullDomainHash (src/crypto/talerCrypto.ts:230:16)
  Object.rsaBlind (src/crypto/talerCrypto.ts:274:16)
  ava_1.default.t (src/crypto/talerCrypto-test.ts:153:16)

make: *** [Makefile:48: check] Error 123
Steps To ReproduceRebuild using bootstrap, configure, make. Then run 'make check'
Additional InformationThis was (also) done using the 'integrationtest' user on taler.net.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Florian Dold

2020-02-25 16:33

manager   ~0015407

Ah, another nodejs version problem. Would it be reasonable to upgrade nodejs on gv to v12? That version is the current LTS of nodejs, but only available in Debian experimental.

Otherwise, I can add a compatibility shim that uses the "util" module on nodejs and the global TextEncoder in browsers. However, I would've rather liked to avoid this, as it's tricky to make it work in all environments we want to support (browser via webpack, android via rollup and node via plain TypeScript) due to how modules are resolved.

Christian Grothoff

2020-02-25 16:41

manager   ~0015408

Sure, go ahead and update node. But also please add a check to configure so we fail hard if dependencies are not met.

Florian Dold

2020-02-25 17:43

manager   ~0015410

Will do once I'm back from my offline time in ~1wk.

In case this is blocking you right now, you can unblock yourself by installing node v12 on gv yourself.

Florian Dold

2020-03-30 08:43

manager   ~0015475

The wallet build system as well as the wallet NPM package now have proper version ranges for node.

We won't support node versions <12.

Issue History

Date ModifiedUsernameFieldChange
2020-02-25 11:45Christian GrothoffNew Issue
2020-02-25 11:45Christian GrothoffStatusnew => assigned
2020-02-25 11:45Christian GrothoffAssigned To => Florian Dold
2020-02-25 16:33Florian DoldNote Added: 0015407
2020-02-25 16:33Florian DoldStatusassigned => feedback
2020-02-25 16:41Christian GrothoffNote Added: 0015408
2020-02-25 16:41Christian GrothoffStatusfeedback => assigned
2020-02-25 17:43Florian DoldNote Added: 0015410
2020-03-29 19:43Christian GrothoffTarget Version0.6 => 0.7.1
2020-03-30 08:43Florian DoldStatusassigned => informing
2020-03-30 08:43Florian DoldResolutionopen => fixed
2020-03-30 08:43Florian DoldNote Added: 0015475
2020-03-31 14:04Christian GrothoffStatusinforming => closed
2020-03-31 14:16Christian GrothoffFixed in Version => 0.7.0
2020-08-20 06:03Florian DoldCategorywallet (JS core) => wallet (TS core)
2023-04-13 18:36Florian DoldCategorywallet (TS core) => wallet-core