-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: readableStream.tee is not a function (it is undefined) #6324
Comments
Are you able to use a version of the ReadableStream polyfill that implements |
Before implementing Chunk with '@aws-sdk/lib-storage' I was uploading media files with aws-sdk/client-s3 and it was working. |
I'm having the same issue with version
|
Hey all - thanks everyone for reporting. I was able to reproduce the error reported. For further analysis and potential resolution, I've prepared a couple test cases along with the versions of the relevant dependencies used during our testing.
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
import { ReadableStream } from "web-streams-polyfill";
import "web-streams-polyfill/dist/polyfill";
globalThis.ReadableStream = ReadableStream;
No error thrown for both operations. If you're encountering the reported error with S3, please downgrade to |
@aBurmeseDev thanks for the fast reply and solution. |
I'm not able to reproduce the issue with standard code samples in https://github.com/aws-samples/aws-sdk-js-tests for S3 ListObjects with The ListObjects command is successful on iOS as shown in screenshot below I also downloaded local bundle, and verified that SDK version is Patch file for repro: test-client-s3-list-objects.patch On repro, the local bundle will be available on this URL. |
@aBurmeseDev I am still facing issues with this workaround sometimes it works fine and sometimes it still gives this error |
Thank you , Its working with @aws-sdk/[email protected] |
@umairm1alik - quick update here. Initially, I was able to reproduce the error when using React Native with Expo. However, after starting a new React Native project without Expo, following the steps and code examples from the aws-sdk-js-tests, the issue was resolved. This suggests that the root cause of the problem might be related to Expo itself or the way it integrates with the AWS SDK for JavaScript v3. To further investigate and identify the culprit, it would be helpful if you could share detailed steps to reproduce your workflow, including the dependencies you've installed. Providing a step-by-step guide on how you set up your React Native project with Expo, the specific version of Expo you're using, and any other relevant dependencies or configurations, would assist in narrowing down the potential cause of the issue and determining if it's indeed related to Expo or if there are other factors at play. |
Finally found a solution! Thank you so much! |
I am seeing this in Lambda NodeJS 20 runtime. What's funny is that file seems to be uploaded (yes, |
@aBurmeseDev I am using react native CLI not expo and my version is "react-native": "0.74.1" |
Thanks for the update @umairm1alik! It sounds like the error is intermittent for you, occurring with both As I mentioned earlier in my comment, I was able to reproduce the error when using Expo, but when I started a new plain React Native project without Expo, it worked as expected. To further validate my theory, I attempted to reproduce the issue using the react-native reproducer provided by the React Native community. However, I was unable to reproduce the error following the instructions in the README for setting up and using the provided steps to start the Metro Server and the application. Can you try reproducing the issue using the same reproducer and steps? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Checkboxes for prior research
Describe the bug
I am trying to implement chunk approach to upload files in react native , if the file size is less then 5 mb its working fine other wise i am getting this error
SDK version number
"@aws-sdk/client-s3": "^3.592.0", "@aws-sdk/lib-storage": "^3.620.0",
Which JavaScript Runtime is this issue in?
React Native
Details of the browser/Node.js/ReactNative version
"react-native": "0.74.1",
Reproduction Steps
index.js
AppRegistry.registerComponent(appName, () => App);
Observed Behavior
TypeError: readableStream.tee is not a function (it is undefined)
Expected Behavior
It should have to upload images , videos in chunk if its more then 5mb in size
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: