Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

ipfs-http-client throws error when using in react native v0.64.1 #3751

Closed
ravi0the0sun opened this issue Jul 20, 2021 · 4 comments
Closed

ipfs-http-client throws error when using in react native v0.64.1 #3751

ravi0the0sun opened this issue Jul 20, 2021 · 4 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@ravi0the0sun
Copy link

  • Version:"ipfs-http-client": "^50.1.2"
  • Platform:React Native: IOS & Android
  • Subsystem:

Severity: High

Description:

ipfs-http-client will throw this error with all of the functions like add() and get()

 ERROR  Demo App .cat {"error": [TypeError: Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.]}
 WARN  Invalid responseType: blob
 LOG  Unable to symbolicate stack trace: undefined is not an object (evaluating 'options.blobId')
 WARN  Invalid responseType: blob
 WARN  Invalid responseType: blob

even when passing string or array or even objects with Symbol.iterator method

Steps to reproduce the error:

use ipfs-http-client in react-native v0.64.1 using this example https://github.com/ipfs-shipyard/react-native-ipfs-demo
System info

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Memory: 853.18 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.17.0 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishells/6085_1626757926630/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.13 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishells/6085_1626757926630/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 19.0, macOS 10.15, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 23, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.1.1/12A7605b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.2 => 0.64.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
@ravi0the0sun ravi0the0sun added the need/triage Needs initial labeling and prioritization label Jul 20, 2021
@welcome
Copy link

welcome bot commented Jul 20, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@LeviticusNelson
Copy link

I have this issue as well and I'm running v0.65.1.

@ravi0the0sun
Copy link
Author

ipfs-shipyard/react-native-ipfs-demo#1

@BigLep
Copy link
Contributor

BigLep commented Sep 24, 2021

React Native isn't supported by js-ipfs. The current state is being tracked here: #2813 . Feel free to post there and consider contributing to address the gaps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants