Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

flow project deploy --network=testnet FAILS on Powershell 7.2 (792) #93

Closed
comtechnet opened this issue May 28, 2021 · 3 comments
Closed

Comments

@comtechnet
Copy link
Contributor

After setting the flow environmental variables in a vscode project directory on windows 10

$env:FLOW_ADDRESS='0xae7561b4bab9bc61'

flow project deploy --network=testnet

generates the following error

Config Error: invalid project configuration: encoding/hex: invalid byte: U+0078 'x'

@sideninja
Copy link
Member

Can you try passing the address without 0x prefix?
I will look into this and make sure 0x is handled if that is the case.

@comtechnet
Copy link
Contributor Author

ok / There are 2 issues going on here with deploying to the new Powershell 7

By the way - I've tested this whole thing on WSL 2 Ubuntu / bash - so I know the accounts and contracts are deployed for these accounts and contracts using these "values", etc.

So - here are the 2 things you gotta do for Powershell 7 Windows X Flow deployment like kitty-items (or others)

  1. In Powershell 7 / make sure u "set" the FLOW environment variables correctly
    (using the $env:FLOW_PRIVATE_KEY='a1ae6................................' syntax)

  2. For the FLOW_ADDRESS value - you must strip off the 0x prefix (as sideninja recommended for Powershell) - I did NOT have to do this for the WSL 2 / Ubuntu setup (FYI)
    (using the $env:FLOW_ADDRESS='ae7561b4bab9bc61' syntax) NOTE no '0x' prefix for this instance/deployment

You can check your Powershell 7 environment variables using:

Get-ChildItem -Path Env:
or you can switch to the cd Env: device style way to view your environment variables in Powershell 7

Ok sideninja - I guess the fix to strip the 0x for Powershell 7 users needs to be either coded or documented.

Best

Dave

@sideninja
Copy link
Member

ok / There are 2 issues going on here with deploying to the new Powershell 7

By the way - I've tested this whole thing on WSL 2 Ubuntu / bash - so I know the accounts and contracts are deployed for these accounts and contracts using these "values", etc.

So - here are the 2 things you gotta do for Powershell 7 Windows X Flow deployment like kitty-items (or others)

  1. In Powershell 7 / make sure u "set" the FLOW environment variables correctly
    (using the $env:FLOW_PRIVATE_KEY='a1ae6................................' syntax)
  2. For the FLOW_ADDRESS value - you must strip off the 0x prefix (as sideninja recommended for Powershell) - I did NOT have to do this for the WSL 2 / Ubuntu setup (FYI)
    (using the $env:FLOW_ADDRESS='ae7561b4bab9bc61' syntax) NOTE no '0x' prefix for this instance/deployment

You can check your Powershell 7 environment variables using:

Get-ChildItem -Path Env:
or you can switch to the cd Env: device style way to view your environment variables in Powershell 7

Ok sideninja - I guess the fix to strip the 0x for Powershell 7 users needs to be either coded or documented.

Best

Dave

@comtechnet Thank you for this report. I will make sure this gets fixed in the next release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants