critocrito / ncube

Data exploration and verification for the human rights.

Home Page:https://sugarcubetools.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ncube never completes local workspace creation

tlongers opened this issue · comments

Thanks for putting this out there @critocrito - I encounted an issue getting started

What setup?

  • MacBook Pro (8gb, 2.7ghz)
  • OSX 10.15.5 (19F101)

What was I doing?

  • Downloaded and installed Ncube (per instructions)
  • Started Ncube, and created a new workspace called "test"
  • Ncube indicated it was creating the workspace
  • As far as I can see the process never finished (I left it overnight)

What steps have I taken to solve the problem?

  • restarted Ncube a few times
  • removed ~/Ncube/test
  • restarted Ncube, but it was still indicating that the "test" workspace was being created
  • created a workspace called "test2", which has expanded to ~240MB, but Ncube is still telling me it's creating the workspace

Generally, what's the expected time that a new workspace should take to initialize?

Hey @tlongers,

First off, thanks a lot for giving Ncube a try. I'm sorry creating a local workspace didn't work for you.

Creating a new workspace takes on my machine a couple of minutes. A fresh workspace takes about 500-600MB on disk. During the setup it has to download quite a bit from the internet. So the time it takes to set it up depends on the speed of your internet connections as well. Issues #59 and #60 address this. But under no circumstance should it take overnight.

From what you describe the setup of the workspace should definitely have succeeded. One reason we know of, why creating a workspace fails is described in #42. But it doesn't sound like this issue is related to your situation. Simply removing a workspace from disk is not enough since the workspace has to be deleted in the local database as well. The functionality of removing workspaces has been added to Ncube already and will be part of the next release.

Ncube isn't doing a great job yet communicating issues back to the user. I'm actively working on this in #55 and once I close this issue I will make a new release. The best way to diagnose Ncube currently is a bit hands on and requires you to start it from a terminal and look at the log output. To do this open a Terminal and paste the following into it and press Enter:

/Applications/Ncube.app/Contents/MacOS/Ncube

Feel free to post any output that looks weird to you and I'm happy to take a look.

Ncube is in a very early stage. Unfortunately, this means that your experience isn't great yet and things are likely to break. We would be very grateful if you reported any issues you are encounter and we can try together to sort them out. We collected a whole bunch of bugs that we need addressing here. We are in the process of working through them. I hope this helps, let me know.

Best

Thanks @critocrito - I'm aware it's an early release, and thanks for giving me an idea of the trajectory that you're on. The log output is quite revealing; thanks for letting me know how to launch the tool that way.

Here's the culprit that I can see:

> integer@2.1.0 install /Users/[LOCALUSER]/Ncube/test-run-1/node_modules/integer
> node-gyp rebuild

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/[LOCALUSER]/Ncube/test-run-1/dist/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/Users/[LOCALUSER]/Ncube/test-run-1/dist/nodejs/bin/node" "/Users/[LOCALUSER]/Ncube/test-run-1/dist/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/[LOCALUSER]/Ncube/test-run-1/node_modules/integer
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer@2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@2.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/[LOCALUSER]/.npm/_logs/2020-09-30T09_51_48_751Z-debug.log

After this error, the script grabbed a bunch of stuff from the net, but then hung, just repeating the below:

Sep 30 10:58:10.012 DEBUG ncube_http_api::http: restrict to local request: ReqCtx { is_local: true, is_authorized: false, email: None, workspace: None }
Sep 30 10:58:10.012 DEBUG list_workspaces:connection{self=sqlite::Database(Config { source: File("/Users/[LOCALUSER]/Library/Preferences/net.sugarcubetools.Ncube/ncube.db") })}: ncube_db::sqlite: Fetching a new Sqlite connection from pool: Status { max_size: 1, size: 1, available: 1 }
Sep 30 10:58:10.012  INFO ncube_http_api: req.method=GET req.path="/api/workspaces" req.status=200 OK req.elapsed=437.146µs
Sep 30 10:58:10.012 DEBUG hyper::proto::h1::io: flushed 456 bytes

Regarding the gyp issue above, I do have a Command Line Tools installed though:

$ xcode-select --version
xcode-select version 2373.

$ xcode-select -p
/Library/Developer/CommandLineTools

$ which xcode-select
/usr/bin/xcode-select

Possibly I need to update it though; is it looking for a specific version?

[Update: added a few extra lines from the log to clarify the CLT issue]

Hey,

I ran into the same problem today. This issue was introduce with the latest update to Xcode 12. Ncube requires to have the Xcode Command Line Tools to be installed but the Apple update botched those somehow. I wasn't able to install them neither on the terminal nor using the software updater of macOS. In the end I had to download the Command Line Tools directly from the Apple developer website. Here are my steps:

  • I went here: https://developer.apple.com/download/more/ (Note that this page doesn't work in Firefox and I had to use Safari)
  • Log in with your Apple ID
  • Download the 'Command Line Tools for Xcode 12' package and install it. You might need the same one unless you have the 12.2 beta installed. If in doubt choose the same package as I did.

After that I was able to create a workspace. Let me know if you still encounter issues and we can investigate further. Also, I would love to hear if Ncube is useful for you, or if not, what it lacks to be useful.

Ahh I forgot, before I installed the DMG package that I downloaded from the Apple developer website I removed the Command Line Tools:

sudo rm -rf /Library/Developer/CommandLineTools