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

Panic running locally (app.txEncoder is nil) #1159

Open
danwt opened this issue Aug 30, 2024 · 1 comment
Open

Panic running locally (app.txEncoder is nil) #1159

danwt opened this issue Aug 30, 2024 · 1 comment

Comments

@danwt
Copy link
Contributor

danwt commented Aug 30, 2024

I rebooted a local hub instance and saw this
ERR panic recovered in PrepareProposal height=344 module=server panic="runtime error: invalid memory address or nil pointer dereference"
I lost the rest of the logs unfortunately

294d5bc

@mtsitrin
Copy link
Contributor

it caused

it caused by this call

func (app *BaseApp) PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) {
	bz, err := app.txEncoder(tx)
	if err != nil {
		return nil, err
	}

	_, _, _, _, err = app.runTx(runTxPrepareProposal, bz) //nolint:dogsled
	if err != nil {
		return nil, err
	}

	return bz, nil
}

as app.txEncoder is nil.

probably needs to be set by

// SetTxEncoder sets the TxEncoder if it wasn't provided in the BaseApp constructor.
func (app *BaseApp) SetTxEncoder(txEncoder sdk.TxEncoder) {
	app.txEncoder = txEncoder
}

@danwt danwt changed the title Panic running locally Panic running locally (app.txEncoder is nil) Sep 17, 2024
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

2 participants