Closed Amplifiyer closed 4 years ago
@Amplifiyer Can you try swapping the url parser to Node one in the client for react native? For example:
import {parseUrl} from "@aws-sdk/url-parser-node";
const client = new S3Client({
urlParser: parseUrl
});
This might import the node url parser pollyfill and fix the issue. We need the verification to further solve the issue.
@AllanFly120 I tried your workaround and it did work and I'm not seeing any errors with URL now.
Describe the bug The URL used here https://github.com/aws/aws-sdk-js-v3/blob/4a23bb45b036881953de9edad48cb779f4881903/packages/url-parser-browser/src/index.ts#L5 doesn't have full support in ReactNative libraries and throw "Not Implemented". See https://github.com/facebook/react-native/blob/0.60-stable/Libraries/Blob/URL.js#L153-L191
I tried polyfilling URL object with other mechanism but it has been complicated and so far not successful.
SDK version number
Latest alpha versions of aws-sdk
Is the issue in the browser/Node.js? ReactNative
Details of the browser/Node.js version Paste output of
npx envinfo --browsers
ornode -v
To Reproduce (observed behavior) Run a app in react native and call cognito.
Expected behavior aws-sdk should be compatible across platforms.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.