You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
I built a simple app to run relays on mobile. It works fine on simulator from Xcode 10. But it gives error of not able to create folder during init of IPFS.
What could be an ideal way to pre create this folder or some other ways to solve this?
Error: EPERM: operation not permitted, mkdir '/private/var/mobile/Containers/Data/Application/1F3093D2-11AF-4457-8E01-095A8E17DA0E/.jsipfs'
at sync (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/mkdirp/index.js:90:21)
at FsDatastore.prototype._create (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:87:5)
at FsDatastore.prototype._openOrCreate (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:101:9)
at FsDatastore (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:54:7)
at createBackend (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs-repo/src/backends.js:6:3)
at IpfsRepo (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs-repo/src/index.js:53:5)
at module.exports (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs/src/core/runtime/repo-nodejs.js:10:3)
at IPFS (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs/src/core/index.js:60:7)
at Anonymous function (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/main.js:10:1)
at Module.prototype._compile (module.js:624:5)
The text was updated successfully, but these errors were encountered:
IPFS expects to be run in a Node.js environment so it's trying to write to the OS home directory but that's not possible from a webview, my guess is that with cordova you'd be better off using the browser build https://github.com/ipfs/js-ipfs#use-in-the-browser
Running js-ipfs on mobile is currently untested but planned for the future. Please feedback with how you get on.
Type: Question
Severity: Medium
Description:
Installed platforms:
ios 4.5.5
Available platforms:
android ~7.1.1
browser ~5.0.1
osx ~4.0.1
windows ~6.0.0
Source Code of the IPFS repo in App
`
var http = require('http');
const PeerId = require('peer-id');
const PeerInfo = require('peer-info');
const multiaddr = require('multiaddr');
const tcpp = require('tcp-ping');
const cordova = require('cordova-bridge');
const IPFS = require('ipfs')
const Node = new IPFS()
`
I built a simple app to run relays on mobile. It works fine on simulator from Xcode 10. But it gives error of not able to create folder during init of IPFS.
What could be an ideal way to pre create this folder or some other ways to solve this?
Error: EPERM: operation not permitted, mkdir '/private/var/mobile/Containers/Data/Application/1F3093D2-11AF-4457-8E01-095A8E17DA0E/.jsipfs'
at sync (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/mkdirp/index.js:90:21)
at FsDatastore.prototype._create (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:87:5)
at FsDatastore.prototype._openOrCreate (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:101:9)
at FsDatastore (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/datastore-fs/src/index.js:54:7)
at createBackend (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs-repo/src/backends.js:6:3)
at IpfsRepo (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs-repo/src/index.js:53:5)
at module.exports (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs/src/core/runtime/repo-nodejs.js:10:3)
at IPFS (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/node_modules/ipfs/src/core/index.js:60:7)
at Anonymous function (/private/var/containers/Bundle/Application/C21DE842-2939-4DA1-81D4-37A5D1EDB7C6/hdapp4.app/www/nodejs-project/main.js:10:1)
at Module.prototype._compile (module.js:624:5)
The text was updated successfully, but these errors were encountered: