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

ipfs initialization takes forever #2768

Closed
@emclab

Description

@emclab
  • Version:0.40.0
  • Platform:macOS Catalina
  • Subsystem:nodes-mobile-react-native 0.5.0. Nodejs: 10.17.0, React Native 0.61.5

Type:

I have the following code to init ipfs (0.40.0):

// Rename this sample file to main.js to use on your project.
// The main.js file will be overwritten in updates/reinstalls.

var rn_bridge = require(‘rn-bridge’);

// Echo every message received from react-native.
rn_bridge.channel.on(‘message’, async (msg) => {
switch (msg) {
case “save”:
break;
case “retrieve”:
break;
default:
break;
};
rn_bridge.channel.send(“From node in main.js”)
const IPFS = require(‘ifps’);
const ipfs_node = await IPFS.create();
rn_bridge.channel.send("from Node version " + ipfs_node.version);

} );

// Inform react-native node is initialized.
rn_bridge.channel.send(“Node was initialized.”);

The problem is that I never seen rn_b
ridge.channel.send("from Node version " + ipfs_node.version); get executed. Why ipfs initialization takes so long? Or my code isn’t right How to check if the ipfs is initialized successfully?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions