fromUtf8 broken on react-native after latest release 2.0.1
envgap__smithy-lang__smithy-typescript-1069
01 / FAILURE SIGNATURE
As reported upstream
ReferenceError: Property 'TextEncoder' doesn't exist
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
a4b58b32ac2ae778917e276ba381527f551c2d3d- Manifest
packages/util-utf8/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
smithy-lang/smithy-typescript #1069 · read the original issue
React-native apps using `fromUtf8` are broken on `@smithy/util-utf8@2.0.1` from latest changes from PR https://github.com/awslabs/smithy-typescript/pull/1066 because they are using browser implementation.
I am seeing on my React-Native App
```
WARN Possible Unhandled Promise Rejection (id: 0):
ReferenceError: Property 'TextEncoder' doesn't exist
ReferenceError: Property 'TextEncoder' doesn't exist
at fromUtf8 (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.mystorageapp&modulesOnly=false&runModule=true:144817:16)
at convertToBuffer (http://10.0.2.2:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.mystorageapp&modulesOnly=false&runModule=true:144790:22)
```
on version `@smithy/util-utf8@2.0.0` was working fine because it was using `@smithy/util-utf8-from` correctly.
The issue is here
https://github.com/awslabs/smithy-typescript/blob/main/packages/util-utf8/package.json#L56-L57
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]