Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when run npm run authentication:login #155

Open
Fodesu opened this issue Jan 21, 2024 · 0 comments
Open

Error when run npm run authentication:login #155

Fodesu opened this issue Jan 21, 2024 · 0 comments

Comments

@Fodesu
Copy link

Fodesu commented Jan 21, 2024

hey guys! i am beginger, i am trying to dev lens v2, when we try to run npm run authentication:login in cli, get errror:

forrest@fodesu ~/P/w/l/api-examples (master) [1]> npm run authentication:login

> [email protected] authentication:login
> env-cmd -f .env ts-node ./src/authentication/login

/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/logger/src.ts/index.ts:269
        const error: any = new Error(message);
                           ^
Error: invalid private key (argument="privateKey", value="[[ REDACTED ]]", code=INVALID_ARGUMENT, version=signing-key/5.7.0)
    at Logger.makeError (/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
    at Logger.throwError (/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
    at Logger.throwArgumentError (/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/logger/src.ts/index.ts:285:21)
    at new SigningKey (/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/signing-key/src.ts/index.ts:37:20)
    at new Wallet (/home/forrest/Project/web3/lens/api-examples/node_modules/@ethersproject/wallet/src.ts/index.ts:87:36)
    at getSigner (/home/forrest/Project/web3/lens/api-examples/src/ethers.service.ts:11:10)
    at getAddressFromSigner (/home/forrest/Project/web3/lens/api-examples/src/ethers.service.ts:15:19)
    at login (/home/forrest/Project/web3/lens/api-examples/src/authentication/login.ts:34:59)
    at /home/forrest/Project/web3/lens/api-examples/src/authentication/login.ts:58:16
    at Object.<anonymous> (/home/forrest/Project/web3/lens/api-examples/src/authentication/login.ts:60:3) {
  reason: 'invalid private key',
  code: 'INVALID_ARGUMENT',
  argument: 'privateKey',
  value: '[[ REDACTED ]]'
}

I log PK and ethersProvider

JsonRpcProvider {
  _isProvider: true,
  _events: [],
  _emitted: { block: -2 },
  disableCcipRead: false,
  formatter: Formatter {
    formats: {
      transaction: [Object],
      transactionRequest: [Object],
      receiptLog: [Object],
      receipt: [Object],
      block: [Object],
      blockWithTransactions: [Object],
      filter: [Object],
      filterLog: [Object]
    }
  },
  anyNetwork: false,
  _networkPromise: Promise { <pending> },
  _maxInternalBlockNumber: -1024,
  _lastBlockNumber: -2,
  _maxFilterBlockRange: 10,
  _pollingInterval: 4000,
  _fastQueryDate: 0,
  connection: {
    url: 'https://polygon-mumbai.infura.io/v3/********************************'
  },
  _nextId: 42
}

can anyone help me to fix it ?

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

No branches or pull requests

1 participant