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

Incorrect amount on depositing Nervos DAO #287

Closed
Keith-CY opened this issue Sep 24, 2023 · 9 comments
Closed

Incorrect amount on depositing Nervos DAO #287

Keith-CY opened this issue Sep 24, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Keith-CY
Copy link
Member

Screen.Recording.2023-09-25.at.00.22.17.mov

104 CKB was expected to be deposited, but 202 CKB was deposited.


BTW, I recorded this video because of another unexpected behavior

  1. Visit Nervos DAO
  2. Click Deposit
  3. Input 202
  4. Wait for a while
  5. Click Proceed
  6. Wait for a while
  7. Input password and click Confirm

202 CKB is expected to be deposited, but nothing happened.


Then I started screening, and try to deposit 104 CKB, but 202 CKB was deposited.


Then I stop screening, and try another deposit, but found 104 CKB was in the field.


Notice that there are 2 wait for a while and each has a side effect.

@Keith-CY Keith-CY added the bug Something isn't working label Sep 24, 2023
@Keith-CY Keith-CY added this to Neuron Sep 24, 2023
@Danie0918 Danie0918 moved this to 👀 Testing in Neuron Sep 25, 2023
@yanguoyu
Copy link

yanguoyu commented Sep 25, 2023

I can not reproduce this problem. But I cleared the generate tx after closing the password request dialog and showing the error message in nervosnetwork/neuron@47be893.
I guess it will work well. nervosnetwork/neuron#2849

@silySuper
Copy link

1.I have tried:
A.In my whole sysnc this situation:202 CKB is expected to be deposited, but nothing happened does not shown.This bug does not shown.

B.After several times try,this situation:202 CKB is expected to be deposited, but nothing happened does not shown yet.This bug does not shown.

I found that this bug description has a abnormal phenomenon:202 CKB is expected to be deposited, but nothing happened.Maybe we should confirm whether this transaction has succeed.I guess if succeed ,may be it is a delayed display for last transaction and unsynchronized for next transaction at the same time.

@FrederLu
Copy link

I can not reproduce this problem. But I cleared the generate tx after closing the password request dialog and showing the error message in nervosnetwork/neuron@47be893. I guess it will work well. nervosnetwork/neuron#2849

In the video, after completing the password input, it does not jump to the transaction history but stays on the Nervos Dao page. This situation seems to be a bug encountered before.
Now using this package will jump to the transaction history page normally. Return to Nervos Dao to view the amount just deposited.

2023-09-25.16.51.56.mov

@Keith-CY
Copy link
Member Author

neuron_debug_1695635230659.zip

Sorry for uploading the debug information late.

As the video shows, actions were performed during 00:19 ~ 00:22, so the corresponding logs are as follows.

[2023-09-25 00:17:25.960] [info]  Database:	saved synced block #10735237
[2023-09-25 00:19:12.691] [error] Database:	create transaction error: QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:19:12.694] [warn]  API Controller:	channel handling error: QueryFailedError: SQLITE_BUSY: database is locked QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:19:14.712] [info]  Database:	saved synced block #10735247
[2023-09-25 00:20:07.394] [error] Database:	create transaction error: QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:20:07.396] [warn]  API Controller:	channel handling error: QueryFailedError: SQLITE_BUSY: database is locked QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:20:32.321] [info]  Database:	saved synced block #10735259
[2023-09-25 00:21:39.911] [error] Database:	create transaction error: QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:21:39.913] [warn]  API Controller:	channel handling error: QueryFailedError: SQLITE_BUSY: database is locked QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:22:26.294] [info]  Database:	saved synced block #10735270
[2023-09-25 00:22:38.630] [error] Database:	create transaction error: QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:22:38.632] [warn]  API Controller:	channel handling error: QueryFailedError: SQLITE_BUSY: database is locked QueryFailedError: SQLITE_BUSY: database is locked
    at QueryFailedError.TypeORMError [as constructor] (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/TypeORMError.js:9:28)
    at new QueryFailedError (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/error/QueryFailedError.js:13:28)
    at Statement.handler (/private/var/folders/nm/r1twtwkj2y1c28hn4jmrst400000gn/T/AppTranslocation/9E2DDD67-5750-4408-9447-04D3A25DA41F/d/Neuron.app/Contents/Resources/app.asar/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:117:38)
[2023-09-25 00:24:15.350] [info]  Database:	saved synced block #10735281

@Keith-CY
Copy link
Member Author

The deposited transaction of 202 CKB is https://pudge.explorer.nervos.org/transaction/0xd6ded7fb4eae249509d49da3d5fa83de9c3a45edf972288c946efae022af7b83
It was packaged in block 10,735,270

@Keith-CY
Copy link
Member Author

Keith-CY commented Sep 25, 2023

I can not reproduce this problem. But I cleared the generate tx after closing the password request dialog and showing the error message in nervosnetwork/neuron@47be893. I guess it will work well. nervosnetwork/neuron#2849

It's possible to fix this case by removing cached tx, but the case will be

  1. I try to deposit 202 CKB, but it fails
  2. Close the dialog and the tx is reset or removed
  3. I try to deposit 104 CKB but
    1. 102 CKB will be deposited if tx is reset, or
    2. fail to submit because tx is removed and invalid

The key is

  • When I try to deposit 104 CKB, another value is submitted

I think remove cached tx doesn't fix this issue until we figure out why 202 is submitted when 104 is filled in the field.

@yanguoyu
Copy link

yanguoyu commented Sep 25, 2023

I can not reproduce this problem. But I cleared the generate tx after closing the password request dialog and showing the error message in nervosnetwork/neuron@47be893. I guess it will work well. nervosnetwork/neuron#2849

It's possible to fix this case by removing cached tx, but the case will be

  1. I try to deposit 202 CKB, but it fails

  2. Close the dialog and the tx is reset or removed

  3. I try to deposit 104 CKB but

    1. 102 CKB will be deposited if tx is reset, or
    2. fail to submit because tx is removed and invalid

The key is

  • When I try to deposit 104 CKB, another value is submitted

I think remove cached tx doesn't fix this issue until we figure out why 202 is submitted when 104 is filled in the field.

Is this question that is easy to reproduce with your Neuron? I tried many times but didn't encounter this problem.

@yanguoyu
Copy link

From the video, the 104 CKB deposit transaction has not been sent successfully because the page did not go to the history page. So the 202 CKB deposit value was not deposited at that time, it may just synced at that time. If we show the error dialog when sending the deposit transaction, I have added the error dialog with nervosnetwork/neuron#2849. It may more clearer.

@Keith-CY
Copy link
Member Author

From the video, the 104 CKB deposit transaction has not been sent successfully because the page did not go to the history page. So the 202 CKB deposit value was not deposited at that time, it may just synced at that time. If we show the error dialog when sending the deposit transaction, I have added the error dialog with nervosnetwork/neuron#2849. It may more clearer.

I'll try this

@Danie0918 Danie0918 moved this from 👀 Testing to 🚩Pre Release in Neuron Oct 9, 2023
@Danie0918 Danie0918 moved this from 🚩Pre Release to ✅ Done in Neuron Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants