Skip to content

Regression on an undocumented usage of BigInt in 6.9.2 – Unexpected token: name (n) in file node_modules/@polkadot/util/bi/sqrt.js  #1245

@gre

Description

@gre
Error: Unexpected token: name (n) in file node_modules/@polkadot/util/bi/sqrt.js at 6:38

It seems like this was unexpected, because not documented in Release notes.

We have two big projects to maintain at Ledger:

  • Ledger Live Desktop (ci results) – we use webpack and hard-source-webpack-plugin which is where we also seem to experience this issue. error: Do not know how to serialize a BigInt
  • Ledger Live Mobile (ci results) – Metro fails to parse that part. BigInt also won't be supported on React Native anyway and polyfilling it is to avoid ( ReferenceError: Can't find variable: BigInt facebook/react-native#28492 ) – we track on our side that a solution is to move to FB's Hermes engine, but not easy move.

Both our projects can't upgrade anymore to latest polkadot version, last time it happened was in August and one month later our support of polkadot broke in Ledger Live because there were no provided solution. I'm trying with this ticket to avoid this situation again. Please try to have more CI to test against more environments, because BigInt is not something we can easily move on in our side. 🙏 Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugTracks issues causing errors or unintended behavior, critical to fix for reliability.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions