-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Cannot read property 'x-stream-error' of undefined #21229
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write |
A very straight forward fix is to simply comment out the part where its getting the
|
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists. The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running |
It seems like the response from ipfs is corrupted or malformed. The picture below shows the Wireshark tracking the packet sent from ipfs to my app and the data is malformed. This shows that in the packet inside trailer the x-stream-error is specified so there is indeed a x-stream-error to read from. So most-likely the ipfs node running is sending a bad response. The ipfs version I am running is version 0.4.17. Again please leave a comment if you have any idea why this happening, thanks in advance! |
I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while. If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here. |
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-4308U CPU @ 2.80GHz
Memory: 30.14 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.8.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 23.0.1, 25.0.0, 26.0.1, 26.0.3, 27.0.3, 28.0.2
API Levels: 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
I am having this problem when trying to use ipfs-api module on React Native. I am using the ipfs-api version 24.0.1 imported to React Native with rn-nodeify version 10.0.0 with the following steps:
Then uncomment require('crypto') in shim.js at the root of React Native project.
Then go to this file:
and add
before
module.exports
line in the file.Finally run:
Code
I have the following code in my project following the example for ipfs-api:
Error
When I tried running the code above in my project I get the following error:
And in the debugger I see the following:
The problem is that there is no
res.trailers
element for theres
variable inside theonRes
function.This function is located at /node_modules/ipfs-api/src/utils/send-request.js
Any thoughts is welcome, thanks for your time!
The text was updated successfully, but these errors were encountered: