收到“无法为帐户签署交易”错误

Getting “Can not sign transactions for account” error

当我就此合同调用 play() 时,我得到 Error: Can not sign transactions for account。错误原因是什么?

这是代码,

https://github.com/Learn-NEAR/sample--lottery/blob/main/src/lottery/assembly/index.ts

play(): void {
    assert(this.active, this.winner + " won " + this.pot.toString() + ". Please reset the game.");
    const signer = Context.sender;

    // if you've played before then you have to pay extra
    if (this.players.has(signer)) {
      const fee = this.fee();
      assert(Context.attachedDeposit >= fee, this.generate_fee_message(fee));
      this.increase_pot();

      // if it's your first time then you may win for the price of gas
    } else {
      this.players.add(signer);
    }

    this.last_played = signer;

    if (this.won()) {
      this.winner = signer;
      this.payout();
    } else {
      this.lose();
    }
  }

您需要使用您的 NEAR 帐户登录并执行此类型 near login