Giter Club home page Giter Club logo

leveldown-mobile's Issues

IOS wrong architecture : leveldown-nodejs-mobile

Hi,
I am getting this error while we try compiling using leveldown-nodejs-mobile.

{ Error: dlopen(/private/var/mobile/Containers/Data/Application/D1BA5C5F-4140-4E74-86E9-DA126EA579D2/Documents/nodejs-project/api/node_modules/leveldown/build/Release/leveldown.node, 1): no suitable image found. Did find:
/private/var/mobile/Containers/Data/Application/D1BA5C5F-4140-4E74-86E9-DA126EA579D2/Documents/nodejs-project/api/node_modules/leveldown/build/Release/leveldown.node: mach-o, but wrong architecture
/private/var/mobile/Containers/Data/Application/D1BA5C5F-4140-4E74-86E9-DA126EA579D2/Documents/nodejs-project/api/node_modules/leveldown/build/Release/leveldown.node: mach-o, but wrong architecture
at bindings (/private/var/mobile/Containers/Data/Application/D1BA5C5F-4140-4E74-86E9-DA126EA579D2/Documents/nodejs-project/api/node_modules/bindings/bindings.js:121:9)

Do any body have a resolution.
Thanks in advance

iOS wrong architecture

I use leveldown-mobile with nodejs-mobile-react-native on iOS when I require(leveldown.node)
I get the issue,please help me

/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node
LevelUPError: Failed to require LevelDOWN (dlopen(/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node, 1): no suitable image found.  Did find:
	/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node: mach-o, but wrong architecture
	/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node: mach-o, but wrong architecture). Try `npm install leveldown` if it's missing
   at requireError (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/leveldown.js:37:3)
   at getLevelDOWN (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/leveldown.js:31:5)
   at LevelUP.prototype.open (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:112:3)
   at LevelUP (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:84:3)
   at LevelUP (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:45:37)
   at LevelDatastore (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/datastore-level/src/index.js:27:5)
   at createBackend (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/ipfs-repo/src/backends.js:6:3)
   at Anonymous function (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/ipfs-repo/src/index.js:99:9)
   at nextTask (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/async/waterfall.js:16:9)

Uncaught errors with a test app on OS X

To reproduce:

  • Extract attached leveldown-mobile-test.zip
  • Run jx npm install --no-optional in the root of the project
    • The --no-optional flag is important, because otherwise, pouchdb installs leveldown package which causes the test app to crash
  • run jx index.js

At least on my environment, the following gets printed:

$ jx index.js 
Listening...
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
<unknown>:-1: Uncaught TypeError: Cannot convert null to object
$ jx -jxv
v0.3.1.0
$ jx -jsv
Google V8 v3.14.5.9
$ jx npm --version
3.3.12

react native support

what would it take to get this working on react native (JavaScriptCore)? I'd be happy to help

Archive repository

  • Disable Greenkeeper
  • Make sure the latest published version is git-tagged
  • Add note to readme (example: Level/level-mobile#22)
  • Remove project from Travis
  • Pin dependencies
  • Ask for npm ownership
  • Release a final patch version
  • Deprecate the package with This project has been abandoned. There will be no further releases. If you wish to revive leveldown-mobile, please open an issue (https://github.com/Level/community) to discuss a way forward. Thank you!
  • Remove extraneous npm owners
  • Archive the GitHub repository

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

Can we lose writes with LevelDB?

We are using leveldown-mobile and are trying to figure out if we can lose writes.

The scenario is that we get notified by Android or iOS that our app is about to be shut down. We get a short window of time to try to do clean up before we are ended.

Our understanding is that LevelDB uses an in memory cache to store information and that writes are done using the write() system file APIs. In which case even if our process is killed then no data should be lost because it’s the OS that has the write buffer, not the app. So in theory we shouldn’t need to worry about trying to do any kind of flush (not that LevelDB seems to support the concept anyway) nor should we worry about passing in the sync flag (and thus doing a fsync() not to mention obliterating our performance).

Basically the only way we should be able to lose data (unless iOS or Android are doing something very bad) at the LevelDB layer is if the whole phone crashes. Does that sound right?

Install fails on Windows

I am testing following on a Windows 10 machine with Visual Studio 2015 installed:

$ jx npm install leveldown-mobile
npm http request GET https://registry.npmjs.org/leveldown-mobile
npm http 304 https://registry.npmjs.org/leveldown-mobile
npm http request GET https://registry.npmjs.org/bindings
npm http request GET https://registry.npmjs.org/fast-future
npm http request GET https://registry.npmjs.org/abstract-leveldown
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/fast-future
npm http 304 https://registry.npmjs.org/abstract-leveldown
npm http request GET https://registry.npmjs.org/xtend
npm http 304 https://registry.npmjs.org/xtend

> [email protected] install C:\Users\vjrantal\AppData\Local\Temp\foo\bar\node_modules\leveldown-mobile
> ""C:\Program Files (x86)\JXcore\jx.exe" C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\bin\node-gyp.js rebuild"

gyp JXcore NODE-GYP Using node-gyp bundled in npm coming from JXcore
gyp ERR! NPMJX did not provide NVM_NODEJS_ORG_MIRROR url
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack TypeError: Parameter 'url' must be a string, not undefined
gyp ERR! stack     at Url.parse (url.js:88:11)
gyp ERR! stack     at urlParse (url.js:82:5)
gyp ERR! stack     at Object.urlResolve [as resolve] (url.js:385:10)
gyp ERR! stack     at resolveLibUrl (C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\lib\process-release.js:125:18)
gyp ERR! stack     at processRelease (C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\lib\process-release.js:98:14)
gyp ERR! stack     at configure (C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\lib\configure.js:32:17)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as configure] (C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\lib\node-gyp.js:66:37)
gyp ERR! stack     at run (C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\bin\node-gyp.js:72:30)
gyp ERR! stack     at process._tickCallback (node.js:917:13)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files (x86)\\JXcore\\jx.exe" "C:\\Users\\vjrantal\\.jx\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\vjrantal\AppData\Local\Temp\foo\bar\node_modules\leveldown-mobile
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v3.0.3
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm WARN ENOENT ENOENT, open 'C:\Users\vjrantal\AppData\Local\Temp\foo\bar\package.json'
npm WARN EPACKAGEJSON bar No description
npm WARN EPACKAGEJSON bar No repository field.
npm WARN EPACKAGEJSON bar No README data
npm WARN EPACKAGEJSON bar No license field.
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\JXcore\\jx.exe" "C:\\Users\\vjrantal\\.jx\\npm\\bin\\npm-cli.js" "--loglevel" "http" "install" "leveldown-mobile"
npm ERR! node v0.10.40
npm ERR! npm  v3.3.12
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `""C:\Program Files (x86)\JXcore\jx.exe" C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\bin\node-gyp.js rebuild"`
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] install script '""C:\Program Files (x86)\JXcore\jx.exe" C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\bin\node-gyp.js rebuild"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leveldown-mobile package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ""C:\Program Files (x86)\JXcore\jx.exe" C:\Users\vjrantal\.jx\npm\node_modules\node-gyp\bin\node-gyp.js rebuild"
npm ERR! You can get their info via:
npm ERR!     npm owner ls leveldown-mobile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\vjrantal\AppData\Local\Temp\foo\bar\npm-debug.log

Information about my jx installation:

$ jx -jxv
v0.3.1.1
$ jx -jsv
Google V8 v3.14.5.9
$ jx npm --version
3.3.12

to-do: update to latest leveldb / leveldown

This update will be mostly mechanical. There is no C,C++ side changes apart from the new interface method and dependencies. This branch doesn't edit dependency source codes. (Only gyp files are updated for new platforms and engine)

  • Update Leveldb to latest (from Level/leveldown)
  • Add new JS API from 1.3.0

install fails on ubuntu

$ npm i leveldown-mobile
-
> [email protected] install /home/lms/tmp/node_modules/leveldown-mobile
> node-gyp rebuild

gyp: name 'node_engine_mozilla' is not defined while evaluating condition 'node_engine_mozilla!=1' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-39-generic
gyp ERR! command "/usr/local/bin/iojs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/lms/tmp/node_modules/leveldown-mobile
gyp ERR! node -v v2.3.1
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Linux 3.16.0-39-generic
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "i" "leveldown-mobile"
npm ERR! node v2.3.1
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the leveldown-mobile package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls leveldown-mobile
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/lms/tmp/npm-debug.log

See more verbose log here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.