# Deployment failed with error: invalid sender - Using oz cli

**URL:** <https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531>\
**Category:** SDK\
**Created:** [October 9, 2019, 11:44am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531 "2019-10-09T11:44:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chentschel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/chentschel/32/1199_2.png) [@chentschel](https://forum.openzeppelin.com/u/chentschel)\
**Post date:** [October 9, 2019, 11:44am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531/1 "2019-10-09T11:44:28Z")

</div>

Trying to deploy upgradable contracts (oz push, oz create) to ropsten, fails with “Deployment failed with error: invalid sender” any time. It works ok with a local ganache-cli.

I’ve checked the address has balance and is derived ok. Im using infura nodes.

**💻 Environment**

```auto
  "@openzeppelin/contracts-ethereum-package": "^2.3.0",
  "@openzeppelin/upgrades": "^2.5.3",
  "@truffle/hdwallet-provider": "^1.0.17",

```

```auto
require('dotenv').config();

const HDWalletProvider = require('@truffle/hdwallet-provider');

const mnemonic = process.env.MNEMONIC;
const infuraKey = process.env.INFURA_API_KEY;

module.exports = {
  networks: {
    local: {
      host: 'localhost',
      port: 8545,
      gas: 5500000,
      gasPrice: 5e9,
      network_id: '*'
    },
    ropsten: {
      provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/${infuraKey}`),
      gas: 5500000,
      gasPrice: 5e9,
      network_id: '3'
    },
    mainnet: {
      provider: () => new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infuraKey}`),
      gas: 5500000,
      gasPrice: 5e9,
      network_id: '1'
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 10, 2019, 12:44am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531/2 "2019-10-10T00:44:28Z")

</div>

Hi @chentschel,

Welcome to the community 👋 and thanks for posting your question in the forum.

I have reproduced the `invalid sender` error you are seeing.

The issue appears to be with `@truffle/hdwallet-provider`. There is an open issue: [https://github.com/trufflesuite/truffle/issues/2431](https://github.com/trufflesuite/truffle/issues/2431)

The last working version is 1.0.18. [https://github.com/trufflesuite/truffle/issues/2431#issuecomment-539532772](https://github.com/trufflesuite/truffle/issues/2431#issuecomment-539532772)

I was able to deploy successfully with this version  
`npm i @truffle/hdwallet-provider@1.0.18`.

As an aside, you don’t need to do `oz push` first anymore, you can go straight to `oz create`.

```auto
$ oz create
Nothing to compile, all contracts are up to date.
? Pick a contract to instantiate Counter
? Pick a network ropsten
✓ Contract Counter deployed
All contracts have been deployed
? Do you want to call a function on the instance after creating it? No
✓ Setting everything up to create contract instances
✓ Instance created at 0x1E3f30cD85306C5427f2aCdED8cc621B4d24C221
0x1E3f30cD85306C5427f2aCdED8cc621B4d24C221

```

---

<div class="post-metadata">

**Author:** ![chentschel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/chentschel/32/1199_2.png) [@chentschel](https://forum.openzeppelin.com/u/chentschel)\
**Post date:** [October 10, 2019, 6:13am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531/3 "2019-10-10T06:13:38Z")

</div>

> [@abcoathup](#):
>
> npm i @truffle/hdwallet-provider@1.0.18

Thanks a lot. 🙂

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 14, 2019, 2:21am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531/4 "2019-10-14T02:21:52Z")

</div>

Hi @chentschel,

Feel free to ask all the questions that you need.

If you have a moment, it would be great if you could [introduce yourself to the community](https://forum.openzeppelin.com/t/introduce-yourself-here/88)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 14, 2019, 6:38am UTC](https://forum.openzeppelin.com/t/deployment-failed-with-error-invalid-sender-using-oz-cli/1531/5 "2019-10-14T06:38:13Z")

</div>

Hi @chentschel,

Latest version of Truffle appears to have resolved the `invalid sender` issue. I tried today with the latest version of `truffle` and `@truffle/hdwallet-provider` and didn’t get the error.

> **[trufflesuite/truffle](https://github.com/trufflesuite/truffle/releases/tag/v5.0.40)**
>
> A tool for developing smart contracts. Crafted with the finest cacaos. - trufflesuite/truffle
