near-api-js
near-api-js copied to clipboard
yarn + latest wallet selector + latest near-api-js == error
Prerequisites
- [X] I'm using the latest version of
near-api-js
. - [X] I have tried to start with a fresh project and reproduce the defect with minimal code changes.
- [ ] I have read the console error messages carefully (if applicable).
Description
Multiple people is reporting that some of our examples have stopped working when using the latest version of near-api-js
and wallet-selector
.
Reproducible demo
https://github.com/near-examples/guest-book-examples/tree/main/frontend
Steps to reproduce
- Fork the repo
- use
yarn install
on the frontend - use
yarn dev
- try to post a message without attaching NEAR
Expected behavior
A transaction saving the message should be triggered, and thus the message saved
Actual behavior
Unhandled Runtime Error
Error: Expected string not undefined(undefined) at value.signerId
Call Stack
expect_type
node_modules/borsh/lib/cjs/utils.js (34:1)
BorshSerializer.prototype.encode_string
node_modules/borsh/lib/cjs/serialize.js (85:1)
BorshSerializer.prototype.encode_value
node_modules/borsh/lib/cjs/serialize.js (45:1)
BorshSerializer.prototype.encode_struct
node_modules/borsh/lib/cjs/serialize.js (180:1)
BorshSerializer.prototype.encode_value
node_modules/borsh/lib/cjs/serialize.js (61:1)
BorshSerializer.prototype.encode
node_modules/borsh/lib/cjs/serialize.js (37:1)
serialize
node_modules/borsh/lib/cjs/index.js (35:1)
encodeTransaction
node_modules/@near-js/providers/node_modules/@near-js/transactions/lib/schema.js (35:1)
sendTransactionUntil/<
node_modules/@near-js/providers/lib/json-rpc-provider.js (81:1)
__awaiter</<
node_modules/@near-js/providers/lib/json-rpc-provider.js (8:1)
__awaiter<
node_modules/@near-js/providers/lib/json-rpc-provider.js (4:1)
sendTransactionUntil
node_modules/@near-js/providers/lib/json-rpc-provider.js (80:1)
sendTransaction/<
node_modules/@near-js/providers/lib/json-rpc-provider.js (93:1)
__awaiter</<
node_modules/@near-js/providers/lib/json-rpc-provider.js (8:1)
__awaiter<
node_modules/@near-js/providers/lib/json-rpc-provider.js (4:1)
sendTransaction
node_modules/@near-js/providers/lib/json-rpc-provider.js (92:1)
signAndSendTransaction/</result</<
node_modules/@near-js/wallet-account/node_modules/@near-js/accounts/lib/account.js (89:1)
fulfilled
node_modules/@near-js/wallet-account/node_modules/@near-js/accounts/lib/account.js (5:43)
Your environment
- NEAR JavaScript API version used: 4.0.3
- Frontend framework (if applicable): NextJS
- Relevant dependencies (if applicable): "@near-wallet-selector/core": "^8.9.11",
Self-service
- [ ] I'd be willing to fix this bug myself.