View Issue Details

IDProjectCategoryView StatusLast Update
0006111Talerwallet-corepublic2020-03-31 16:16
ReporterChristian Grothoff Assigned ToFlorian Dold  
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.

Activities

Florian Dold

2020-02-25 17: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 17: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 18: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 10: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 Modified Username Field Change
2020-02-25 12:45 Christian Grothoff New Issue
2020-02-25 12:45 Christian Grothoff Status new => assigned
2020-02-25 12:45 Christian Grothoff Assigned To => Florian Dold
2020-02-25 17:33 Florian Dold Note Added: 0015407
2020-02-25 17:33 Florian Dold Status assigned => feedback
2020-02-25 17:41 Christian Grothoff Note Added: 0015408
2020-02-25 17:41 Christian Grothoff Status feedback => assigned
2020-02-25 18:43 Florian Dold Note Added: 0015410
2020-03-29 21:43 Christian Grothoff Target Version 0.6 => 0.7.1
2020-03-30 10:43 Florian Dold Status assigned => resolved
2020-03-30 10:43 Florian Dold Resolution open => fixed
2020-03-30 10:43 Florian Dold Note Added: 0015475
2020-03-31 16:04 Christian Grothoff Status resolved => closed
2020-03-31 16:16 Christian Grothoff Fixed in Version => 0.7.0
2020-08-20 08:03 Florian Dold Category wallet (JS core) => wallet (TS core)
2023-04-13 20:36 Florian Dold Category wallet (TS core) => wallet-core