Install issue: ./Blockstack-for-Linux-v0.21.0.sh start

Ubuntu 17.10

I get …

Wallet does not exist yet. Setting up wallet
docker: Error response from daemon: error while creating mount source path ‘/home/tkb/.blockstack’: mkdir /home/tkb/.blockstack: permission denied.

Running with sudo does not improve the situation.

Permissions are as expected…

tkb@gerty:~/Downloads$ ls -l /home
total 4
drwx------ 20 tkb tkb 4096 Nov 9 19:18 tkb

Any ideas?

Thanks, Tom

Hey @tkb608, sorry to hear you’re having trouble!

If you make the /home/tkb/.blockstack directory yourself, does the problem go away?

Nevermind the following nevermind, The PPA exists but does not contain an installable package. :frowning:

Note for any 17.10 users. My assertion below seems to be out of date. I see that docker does, as of 11/8/17, have an artful ppa for docker

Thanks for the quick reply. I did try make the .blockstack directory. This produced a new error. Unfortunately, I’ve moved on so don’t have that error handy.

And as to moving on, I originally had installed docker via snap, my preferred install method. I un-installed that and tried what official docker site is recommending for artful, which is to download the zesty .deb and install with dpkg. That resulted in the same problems as the snap docker. Then I installed docker.io out of the artful source, which official docker site says is deprecated. This sorta worked in that the “./Blockstack-for-Linux-v0.21.0.sh start” mostly doesn’t error out.

tkb@gerty:~/Downloads$ sudo bash ./Blockstack-for-Linux-v0.21.0.sh start
Enter your Blockstack Core password: 

removing old blockstack-core container...
blockstack-api
cf47441545b1redactedc16dd53a9d642e6e7ad6d952f54892e7ebae8e13572d
Set BLOCKSTACK_DEBUG to 1
Re-exec as `"/usr/bin/python", "/usr/local/bin/blockstack", "api", "start", "--secrets", "3"`
[2017-11-10 13:48:31,416] [DEBUG] [spv:103] (11.140266296952576) Using mainnet
[2017-11-10 13:48:31,513] [DEBUG] [cli:419] (11.140266296952576) Load secrets from 3
[2017-11-10 13:48:31,556] [DEBUG] [client:95] (11.140266296952576) Connect to https://node.blockstack.org:6263
[2017-11-10 13:48:31,561] [WARNING] [storage:632] (11.140266296952576) Storage implementation is missing a "get_immutable_handler" method
[2017-11-10 13:48:31,563] [WARNING] [storage:632] (11.140266296952576) Storage implementation is missing a "put_immutable_handler" method
[2017-11-10 13:48:31,565] [WARNING] [storage:632] (11.140266296952576) Storage implementation is missing a "delete_immutable_handler" method
[2017-11-10 13:48:31,566] [WARNING] [storage:632] (11.140266296952576) Storage implementation is missing a "delete_mutable_handler" method
[2017-11-10 13:48:31,721] [WARNING] [dropbox:188] (11) Config file '/root/.blockstack/client.ini': section 'dropbox' is missing 'token'.  Write access will be disabled
[2017-11-10 13:48:31,722] [DEBUG] [client:110] (11.140266296952576) Loaded storage drivers ['disk', 'gaia_hub', 'dropbox', 's3', 'blockstack_resolver', 'http', 'dht']
{
    "status": true
}
9acad53fd07a34270f98c89redactedfd454f4a6c4439752b4b3a77d2901864f
94b0875074a43739336669dc0953ff16aa50f4571redacted8a27dff97e6a412
Registering protocol handler
[14825:14825:1110/084838.382204:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

After this minor victory, I web browsed my way over to localhost:8888 and got this…

Sadly, there isn’t a Blockstack icon in my menu bar. Considering the output of the start command, it’s probably worth my mentioning that I had successfully installed Blockstack on Ubuntu 17.04 and am trying to reinstall after a fresh install of 17.10 (not an upgrade).

Been quite an adventure so far, thanks in advance for any help you can offer.

Thanks, Tom

Poking around further, I tailed the /home/tkb/.blockstack/api_endpoint.log and found this Warning…

[2017-11-10 16:38:48,571] [WARNING] [dropbox:188] (48) Config file ‘/root/.blockstack/client.ini’: section ‘dropbox’ is missing ‘token’. Write access will be disabled

/root/.blockstack doesn’t exist. Is it possible that some scripts/configs are using /root as $HOME and others are using /home/tkb ?

So, with that in mind, I edited these three lines to point to /home/tkb

tkb@gerty:~/Downloads$ sudo grep -r root ~/.blockstack/ | grep -v "\.log"
[sudo] password for tkb: 
/home/tkb/.blockstack/client.ini:queue_path = /root/.blockstack/queues.db
/home/tkb/.blockstack/client.ini:subdomains_db = /root/.blockstack/subdomains.db
/home/tkb/.blockstack/client.ini:spv_path = /root/.virtualchain-spv-headers.dat

Then tried starting again. Now get this error.

tkb@gerty:~/Downloads$ sudo bash ./Blockstack-for-Linux-v0.21.0.sh start
Enter your Blockstack Core password: 

9c3bb268229e3832ccda4ab2f594072a7f16a40a6880c9110d3138d7fc443823
Set BLOCKSTACK_DEBUG to 1
Re-exec as `"/usr/bin/python", "/usr/local/bin/blockstack", "api", "start", "--secrets", "3"`
[2017-11-10 17:14:32,878] [DEBUG] [spv:103] (11.140523049375488) Using mainnet
[2017-11-10 17:14:32,972] [DEBUG] [cli:419] (11.140523049375488) Load secrets from 3
[2017-11-10 17:14:33,017] [DEBUG] [client:95] (11.140523049375488) Connect to https://node.blockstack.org:6263
[2017-11-10 17:14:33,021] [WARNING] [storage:632] (11.140523049375488) Storage implementation is missing a "get_immutable_handler" method
[2017-11-10 17:14:33,022] [WARNING] [storage:632] (11.140523049375488) Storage implementation is missing a "put_immutable_handler" method
[2017-11-10 17:14:33,024] [WARNING] [storage:632] (11.140523049375488) Storage implementation is missing a "delete_immutable_handler" method
[2017-11-10 17:14:33,025] [WARNING] [storage:632] (11.140523049375488) Storage implementation is missing a "delete_mutable_handler" method
[2017-11-10 17:14:33,163] [WARNING] [dropbox:188] (11) Config file '/root/.blockstack/client.ini': section 'dropbox' is missing 'token'.  Write access will be disabled
[2017-11-10 17:14:33,164] [DEBUG] [client:110] (11.140523049375488) Loaded storage drivers ['disk', 'gaia_hub', 'dropbox', 's3', 'blockstack_resolver', 'http', 'dht']
[2017-11-10 17:14:33,166] [ERROR] [blockstack:66] (11.140523049375488) [Errno 2] No such file or directory: '/home/tkb/.virtualchain-spv-headers.dat'
Traceback (most recent call last):
  File "/usr/local/bin/blockstack", line 52, in <module>
    result = run_cli()
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/cli.py", line 515, in run_cli
    server_port=blockstack_port, set_global=True
  File "/usr/local/lib/python2.7/dist-packages/blockstack_client/client.py", line 112, in session
    SPVClient.init(spv_headers_path)
  File "/usr/local/lib/python2.7/dist-packages/virtualchain/lib/blockchain/bitcoin_blockchain/spv.py", line 444, in init
    with open(path, "wb") as f:
IOError: [Errno 2] No such file or directory: '/home/tkb/.virtualchain-spv-headers.dat'
{
    "error": "Unexpected error:
Traceback (most recent call last):
  File \"/usr/local/bin/blockstack\", line 52, in <module>
    result = run_cli()
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/cli.py\", line 515, in run_cli
    server_port=blockstack_port, set_global=True
  File \"/usr/local/lib/python2.7/dist-packages/blockstack_client/client.py\", line 112, in session
    SPVClient.init(spv_headers_path)
  File \"/usr/local/lib/python2.7/dist-packages/virtualchain/lib/blockchain/bitcoin_blockchain/spv.py\", line 444, in init
    with open(path, \"wb\") as f:
IOError: [Errno 2] No such file or directory: '/home/tkb/.virtualchain-spv-headers.dat'
",
    "help": "Try getting latest version of CLI with \"sudo pip install blockstack --upgrade\""
}
Failed to start Blockstack daemon -- is your password correct?
stopping the running blockstack-api container
9c3bb268229e
9c3bb268229e
tkb@gerty:~/Downloads$ 

NOTE: this is the error I got when I created the directory /home/tkb/.blockstack per your original suggestion.

I then tried the sudo pip install blockstack --upgrade, as suggested in the error message. This did not help. Still get the above error.

Removed every trace of docker and blockstack,
Installed docker-ce_17.11.0~ce~rc2-0~ubuntu_amd64.deb from docker PPA for artful
Now back to the “pair your browser” issue.
Is blockstack using electron for that? Cause this.

Is there another way to pair browser?

Hey @tkb608, you’ve been on a long adventure! Let me see if I can reply inline…

Sadly, there isn’t a Blockstack icon in my menu bar.

On Linux there won’t be. That’s an artifact from the fact that there is such an icon in Windows and Mac OS. If you click “Advanced Mode”, you can connect your browser process to a Blockstack API process by sharing the API password (from your ~/.blockstack/client.ini file).

[2017-11-10 16:38:48,571] [WARNING] [dropbox:188] (48) Config file ‘/root/.blockstack/client.ini’: section ‘dropbox’ is missing ‘token’. Write access will be disabled
/root/.blockstack doesn’t exist. Is it possible that some scripts/configs are using /root as $HOME and others are using /home/tkb ?

The ~/.blockstack directory is bind-mounted into a Docker image, which is running as root. The lack of an API token in dropbox doesn’t mean anything at this time, since you’re using the default storage provider (which uses the gaia_hub driver).

I then tried the sudo pip install blockstack --upgrade, as suggested in the error message. This did not help. Still get the above error.

The error message there is an artifact from the fact that the Docker image is running the blockstack CLI internally, and that’s an error message it prints out whenever it encounters a bug that shouldn’t be happening under normal circumstances.

You should pip uninstall blockstack if you’re going to use the Docker images, since the blockstack tool also uses the ~/.blockstack directory and can cause the browser to break in even more inexplicable ways.

Now back to the “pair your browser” issue.
Is blockstack using electron for that? Cause this.

We don’t use electron. The browser is a node.js HTTP server that talks to your existing web browser on port 8888. It, in turn, talks to a Blockstack API process in a separate Docker container running on port 6270.

Is there another way to pair browser?

Hmm, the interesting thing here is that the Linux script should have opened the web browser for you, and given it the proper URL to do the pairing automatically. If this didn’t happen, then you can try clicking “advanced mode” and entering the api_password field from ~/.blockstack/client.ini as your Core API password in the pairing modal.

Do you have xdg-open installed? i.e. does xdg-open www.google.com do anything intelligent? Does the file $HOME/.local/share/applications/blockstack.desktop exist?

Thanks for the detailed reply. Understood and done.

Yes, xdg-open http://www.google.com works

and yes I have a $HOME/.local/share/applications/blockstack.desktop

tkb@gerty:~$ cat .local/share/applications/blockstack.desktop
[Desktop Entry]
Type=Application
Terminal=false
Exec=bash -c 'xdg-open http://localhost:8888/auth?authRequest=$(echo "%u" | sed s/blockstack://)'
Name=Blockstack-Browser
MimeType=x-scheme-handler/blockstack;
tkb@gerty:~$

I tried the advanced mode option, which worked up to the point that it asked me to “Re-enter your keychain phrase to confirm you’ve kept it in a safe place” After I enter my phrase and click continue, nothing happens.

Also, I have my keychain phrase from my past successful install, and assume it would be best to stick with that one. Since I registered for the token sale with it.

Thanks, Tom

Hold the phone, I spent some time thrashing around the “advanced” and “recover” options and now seem to be logged in with my old key. I think? Anyway it seems to recognize my twitter and github verifications. Not really sure, since nothing seemed to work, then all of a sudden I’m in.

Well, maybe not. I tried adding a verification. And now not only did that not work, but the two previously verified social accounts are not marked not verified. :frowning:

Ok, now my github and twitter verifications are back. I don’t know what to think.

K, I seem to have two different IDs now. I’ve verified my Facebook with the new ID and had previously verified twitter and github with my old ID. By clicking around I can get either facebook or github/twitter to say they are verified but not both.

I’m almost there I think. With new understanding of advanced/recover option and xdg-open in hand. I completely removed blockstack and re-installed. After reading that xdg-open uses preferred browser to open, I made sure to sync with preferred browser. I hadn’t done that before. I usually use firefox and chrome at the same time, with no regard for which is preferred. I only have a preferred setup in Ubunutu because there is no other choice. So that took care of most of the xdg-open problems. Though the browser still doesn’t start at ./Blockstack-for-Linux-v0.21.0.sh start. I still have to start that manually. But now redirects and links work properly. The other thing I did differently is this time I made sure to only advanced/recover and not creating a new ID.

So now everything works except, when I try to use “hello blockstack” or “todo” apps, when I click “approve” during “sign in request” it just hangs until I click “cancel”.

So apps aren’t working. :frowning:
Improvement though.

Here’s the API error log…

[2017-11-11 18:12:14,709] [DEBUG] [rpc:3923] (47.139808655562496) 
full path: /v1/names/
method: GET
path: /v1/names
qs: {}
headers:
origin: http://localhost:8888
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate
connection: keep-alive
accept: */*
user-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
host: localhost:6270
referer: http://localhost:8888/auth?authRequest=eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJqdGkiOiI2NDEyYjBkNS0wNWFlLTRjZDYtOTY0YS0xMDFmZjA5OWJkODIiLCJpYXQiOjE1MTA0MjM5MjksImV4cCI6MTUxMDQyNzUyOSwiaXNzIjoiZGlkOmJ0Yy1hZGRyOjFENGhDQUJpQ2gySHN0Rlo1R1FrZG5KVVZLZ3JzQ1ZxNXIredactedsaWNfa2V5cyI6WyIwMjhkYmQ5ZDZiYmExNTQxMTM5YjkxODc5N2ZhYmUwYmJmNDM5YjczZjhlMjY0ZmNjZGNlNzc4ZDdiN2UxNzE0YzIiXSwiZG9tYWluX25hbWUiOiJodHRwOi8vYmxvY2tzdGFjay10b2Rvcy5hcHBhcnRpc2FuLmNvbSIsIm1hbmlmZXN0X3VyaSI6Imh0dHA6Ly9ibG9ja3N0YWNrLXRvZG9zLmFwcGFydGlzYW4uY29tL21hbmlmZXN0Lmpzb24iLCJyZWRpcmVjdF91cmkiOiJodHRwOi8vYmxvY2tzdGFjay10b2Rvcy5hcHBhcnRpc2FuLmNvbS8iLCJzY29wZXMiOlsic3RvcmVfd3JpdGUiXX0.hefYv9n8ffJVHIBsbwsLcwY-jR0V1mzS4FU3mEz6gWmB7nHn-UkzvfDW9m2gicH8LGZFaUbkERgGwAPEshtT0A

[2017-11-11 18:12:14,711] [DEBUG] [rpc:390] (47.139808655562496) No authorization header
[2017-11-11 18:12:14,713] [DEBUG] [rpc:3965] (47.139808655562496) No authentication needed
[2017-11-11 18:12:14,714] [ERROR] [rpc:629] (47.139808655562496) Page required
172.17.0.1 - - [11/Nov/2017 18:12:14] "GET /v1/names/ HTTP/1.1" 401 -

Any ideas @jude ?

Hi @tkb608,

I had somewhat similar trouble on my Ubuntu 17.10, maybe have a look at the sign-in URL and remove /// if you have some, this is what saved me (cf. this forum thread)

I have a question for you: how did you choose your prefered browser ? My preference should be chromium, but blockstack chooses chrome instead, for some unknown reason…

Thanks for the tip @Olivier. I was assuming that it uses whichever browser you are running when you sync it.