Hashpack / hashconnect

Hashconnect library, readme in progress
BSD Zero Clause License
45 stars 38 forks source link

Error: No matching key. history: 1716990896575755 for AccountAllowanceApproveTransaction #213

Open apttx opened 3 months ago

apttx commented 3 months ago

hashconnect randomly just startet throwing errors for a transaction that was working fine before. the history key the error references changes on every attempt, but the error message is repeated 5+ times.

the transaction execution at https://github.com/blokk-studio/HLiquity/blob/b0a9a711d65c3d162366159f48b2ec063de8be08/packages/lib-hashgraph/src/HashgraphLiquity.ts#L2545 errors out immediately, even though hashpack shows me the approval dialog. the same for https://github.com/blokk-studio/HLiquity/blob/b0a9a711d65c3d162366159f48b2ec063de8be08/packages/lib-hashgraph/src/HashgraphLiquity.ts#L2564. using HashConnect.sendTransaction() results in the same. tried disconnect+reconnect, but the issue persists.

i don't have any repro steps, this started happening without any changes to my code.

image

{context: 'client'} Error: No matching key. history: 1716991216393527
    at Vt.getRecord (index.js:148:1)
    at Vt.get (index.js:148:1)
    at ds2.onRelayEventResponse (index.js:148:1)
    at EventEmitter.<anonymous> (index.js:148:1)
LOG @ browser.js:202
(anonymous) @ browser.js:266
(anonymous) @ index.js:148
await in (anonymous) (async)
emit @ events.js:158
onMessageEvent @ index.js:148
await in onMessageEvent (async)
onProviderPayload @ index.js:148
await in onProviderPayload (async)
onPayloadHandler @ index.js:148
emit @ events.js:153
onPayload @ provider.ts:102
(anonymous) @ provider.ts:149
emit @ events.js:153
onPayload @ index.js:148
e.onmessage @ index.js:148
{context: 'client'}context: "client"[[Prototype]]: Object undefined
LOG @ browser.js:202
(anonymous) @ browser.js:266
Q3.request @ index.js:148
await in Q3.request (async)
DAppSigner2.request @ DAppSigner.js:49
(anonymous) @ signer.js:1
_0x50c9f6 @ signer.js:1
(anonymous) @ signer.js:1
(anonymous) @ signer.js:1
__awaiter2 @ signer.js:1
_0x25edd4.<computed>.<computed> @ signer.js:1
executeWithSigner @ Executable.js:501
approveHchfToSpendHchf @ HashgraphLiquity.ts:2547
await in approveHchfToSpendHchf (async)
(anonymous) @ StabilityDepositManager.tsx:166
call @ loading_state.ts:21
callCallback2 @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070
executeDispatch @ react-dom.development.js:8243
processDispatchQueueItemsInOrder @ react-dom.development.js:8275
processDispatchQueue @ react-dom.development.js:8288
dispatchEventsForPlugins @ react-dom.development.js:8299
(anonymous) @ react-dom.development.js:8508
batchedEventUpdates$1 @ react-dom.development.js:22396
batchedEventUpdates @ react-dom.development.js:3745
dispatchEventForPluginEventSystem @ react-dom.development.js:8507
attemptToDispatchEvent @ react-dom.development.js:6005
dispatchEvent @ react-dom.development.js:5924
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
discreteUpdates$1 @ react-dom.development.js:22413
discreteUpdates @ react-dom.development.js:3756
dispatchDiscreteEvent @ react-dom.development.js:5889

image

apttx commented 3 months ago

restarting my browser fixed the issue. it's working again now

apttx commented 3 months ago

with hashpack 10.1.1, this error isn't caught and the transaction promise never resolves

Error: No matching key. history: 1717496949451525
    at Vt.getRecord (index.js:148:1)
    at Vt.get (index.js:148:1)
    at ds2.onRelayEventResponse (index.js:148:1)
    at EventEmitter.<anonymous> (index.js:148:1)
LOG @ browser.js:202
(anonymous) @ browser.js:266
(anonymous) @ index.js:148
await in (anonymous) (async)
emit @ events.js:158
onMessageEvent @ index.js:148
await in onMessageEvent (async)
onProviderPayload @ index.js:148
await in onProviderPayload (async)
onPayloadHandler @ index.js:148
emit @ events.js:153
onPayload @ provider.ts:102
(anonymous) @ provider.ts:149
emit @ events.js:153
onPayload @ index.js:148
e.onmessage @ index.js:148
browser.js:202 {context: 'client'} Error: No matching key. history: 1717496949451525
    at Vt.getRecord (index.js:148:1)
    at Vt.get (index.js:148:1)
    at ds2.onRelayEventResponse (index.js:148:1)
    at EventEmitter.<anonymous> (index.js:148:1)
LOG @ browser.js:202
(anonymous) @ browser.js:266
(anonymous) @ index.js:148
await in (anonymous) (async)
emit @ events.js:158
onMessageEvent @ index.js:148
await in onMessageEvent (async)
onProviderPayload @ index.js:148
await in onProviderPayload (async)
onPayloadHandler @ index.js:148
emit @ events.js:153
onPayload @ provider.ts:102
(anonymous) @ provider.ts:149
emit @ events.js:153
onPayload @ index.js:148
e.onmessage @ index.js:148
2index.js:148 Uncaught (in promise) Error: No matching key. history: 1717496949451525
    at Vt.getRecord (index.js:148:1)
    at Vt.get (index.js:148:1)
    at Br2.onRelayEventResponse (index.js:148:1)
    at EventEmitter.<anonymous> (index.js:148:1)

image

apttx commented 3 months ago

actually, the error is caught, but what i get is an empty error. it's also broken until i restart my browser agai. still hashpack 10.1.1

image

try {
  // ...
} catch (throwable) {
  console.debug({ throwable })
}

image

apttx commented 3 months ago

i guess there might be some stringification going on somewhere image

phucvarmeta commented 2 weeks ago

Any updates ?