stacks.js icon indicating copy to clipboard operation
stacks.js copied to clipboard

CLI gaia_putfile - uploading an encrypted file to Gaia is not working

Open pradel opened this issue 1 year ago • 2 comments

Describe the bug

Uploading an encrypted file to Gaia using the CLI is not working, it seems that the file is not encrypted properly. When I run stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file-encrypted-signed.txt 1 1 and then pull the file in my web app, I see an Unable to get public key from cipher object. You might be trying to decrypt an unencrypted object. error.

Note: Uploading an non encrypted file is working fine

What version of Stacks.js are you using?

Latest @stacks/cli version

Is the bug present in the Stacks.js CLI, Gaia hub, Connect or Blockstack Browser?

Stacks CLI

To Reproduce Steps to reproduce the behavior:

  1. Open the terminal
  2. Run stx gaia_putfile https://hub.blockstack.org "$APP_KEY" /path/to/file.txt file-encrypted-signed.txt 1 1
  3. In your web app, try to pull the file with stacks.js SDK and see the "Unable to get public key from cipher object. You might be trying to decrypt an unencrypted object."
  4. See error

pradel avatar Dec 01 '22 11:12 pradel