stacks-archive / blockstack-browser

The Blockstack Browser
Mozilla Public License 2.0
1.12k stars 199 forks source link

No user-visible output when searching for pending names #469

Closed randombit closed 7 years ago

randombit commented 7 years ago

Currently the output of http://localhost:6270/v1/names/randombit.id for me is

{"status": "pending", "operation": "update", "confirmations": 14, "txid": "3d97c1daa82e319009981229384bc63cabeaba20568777ac29480bef9dc2251b"}

(that the update is still pending after 14 confirmation blocks seems wrong to me but not relevant here)

If I search for randombit.id in Portal, no results are visible on the page and there is an error in the console

2017-05-11T18:51:57.822-0400 ERROR profiles/store/identity/actions.js: fetchCurrentIdentity: randombit.id resolveZoneFileToProfile: error [TypeError: Cannot read property 'replace' of undefined]
TypeError: Cannot read property 'replace' of undefined
    at removeComments (http://localhost:3000/js/main.js:139808:16)
    at parseZoneFile (http://localhost:3000/js/main.js:139801:12)
    at http://localhost:3000/js/main.js:10681:50
    at Promise (<anonymous>)
    at resolveZoneFileToProfile (http://localhost:3000/js/main.js:10678:10)
    at http://localhost:3000/js/main.js:6847:50
    at <anonymous>

Bug? Design issue? Misplaced user expectation? I leave it to you. Seems to me like Portal should perhaps display the name (since the RPC indicates it was in fact registered) with some annotation for "missing/invalid zone file", "in pending state" etc, rather than just an empty page.

shea256 commented 7 years ago

Ah good call @randombit thanks for pointing this out. Tagging @larrysalibra and @jcnelson on this one.

jcnelson commented 7 years ago

(that the update is still pending after 14 confirmation blocks seems wrong to me but not relevant here)

So this part is weird to me. Any errors in the api_endpoint.log?

randombit commented 7 years ago

@jcnelson No, no errors I can see in the api endpoint log. Sometime overnight it seems confirmation completed, as the queues in blockstack info show empty now. But randombit.id seems to have been transferred from the owner key in my blockstack wallet to another key that had been created by Portal - a key that I had already erased via LocalStorage.clear(). Oops. When I did that I was under the impression I had no names registered under the Portal localStorage key, so (I thought) doing so was harmless.

[I do still have the encrypted backup blob for this long lost key, which I manually retrieved and saved to a file 'just in case', but I must have typoed the password when I first set up Portal as I was unable to backup/restore, which was what led me to clearing localstorage directly - so I could reinit Portal. Guess I will try writing a triplesec bruteforcer sometime to get this name back.]

Is the name transfer an artifact of having registered the name via cli, and then using the web UI? I did not initiate it, so I'm not really sure what happened here.

larrysalibra commented 7 years ago

@randombit Yikes! Sorry about that! Currently, core transfers names back to the identity address which is in the portal wallet. (as you've found out!)

We still need to prompt users to backup (#102 ). In the future, you can copy your portal wallet mnemonic from account -> backup account.

If you still have the encrypted backup phrase, you can decrypt it here: https://github.com/blockstack/blockstack-portal/blob/v0.8/app/js/account/BackupAccountPage.js#L57

jackzampolin commented 7 years ago

Also if you are looking for information on names please check over on the blockstack explorer