saveoursecrets / sdk

High-level, cross-platform SDK for a local-first, distributed encrypted database that can be used to build password managers, cryptocurrency wallets or other applications that require storing secrets securely.
GNU Affero General Public License v3.0
7 stars 0 forks source link

Read secret error after deletion #9

Closed tmpfs closed 2 years ago

tmpfs commented 2 years ago

After deleting a secret got a read secret error from the server for all attempts to read a secret (500 internal error response):

Uncaught (in promise) 
Object { name: "Error", message: "failed to read secret: 570b399f-f2fb-4f3e-bdf5-8f57f5dbde2e", stack: "[\"3zSpK\"]</readSecret<@http://localhost:8080/index.2d3ace14.js:53482:11\nasync*.lL1Ef</createAsyncThunk/actionCreator/</promise</<@http://localhost:8080/index.2d3ace14.js:50882:57\nstep@http://localhost:8080/index.2d3ace14.js:49799:23\n.lL1Ef</__generator</verb/<@http://localhost:8080/index.2d3ace14.js:49740:20\n.lL1Ef</__async/<@http://localhost:8080/index.2d3ace14.js:49864:65\n__async@http://localhost:8080/index.2d3ace14.js:49846:12\n.lL1Ef</createAsyncThunk/actionCreator/</promise<@http://localhost:8080/index.2d3ace14.js:50839:24\n.lL1Ef</createAsyncThunk/actionCreator/<@http://localhost:8080/index.2d3ace14.js:50924:14\n.iFVTZ</createThunkMiddleware/middleware/</<@http://localhost:8080/index.2d3ace14.js:53300:24\n.lL1Ef</createImmutableStateInvariantMiddleware/</</<@http://localhost:8080/index.2d3ace14.js:50050:44\nloadSecret@http://localhost:8080/index.2d3ace14.js:99213:19\n.kdn2s</SecretView/<@http://localhost:8080/index.2d3ace14.js:99219:9\ncommitHookEffectListMount@http://localhost:8080/index.2d3ace14.js:20412:38\ncommitPassiveMountOnFiber@http://localhost:8080/index.2d3ace14.js:21536:50\ncommitPassiveMountEffects_complete@http://localhost:8080/index.2d3ace14.js:21509:46\ncommitPassiveMountEffects_begin@http://localhost:8080/index.2d3ace14.js:21500:54\ncommitPassiveMountEffects@http://localhost:8080/index.2d3ace14.js:21491:40\nflushPassiveEffectsImpl@http://localhost:8080/index.2d3ace14.js:23011:34\nflushPassiveEffects@http://localhost:8080/index.2d3ace14.js:22975:24\ncommitRootImpl@http://localhost:8080/index.2d3ace14.js:22943:96\ncommitRoot@http://localhost:8080/index.2d3ace14.js:22787:27\nperformSyncWorkOnRoot@http://localhost:8080/index.2d3ace14.js:22389:19\nflushSyncCallbacks@http://localhost:8080/index.2d3ace14.js:12792:35\n[\"3iA9v\"]</ensureRootIsScheduled/<@http://localhost:8080/index.2d3ace14.js:22066:17\nVoidFunction*ensureRootIsScheduled@http://localhost:8080/index.2d3ace14.js:22059:35\nscheduleUpdateOnFiber@http://localhost:8080/index.2d3ace14.js:21952:34\ndispatchSetState@http://localhost:8080/index.2d3ace14.js:16371:45\n.iE5Zp</createEvents/call/<@http://localhost:8080/index.2d3ace14.js:26158:30\ncall@http://localhost:8080/index.2d3ace14.js:26157:22\napplyTx@http://localhost:8080/index.2d3ace14.js:25937:19\npush@http://localhost:8080/index.2d3ace14.js:25959:20\n.btA8E</useNavigate/navigate<@http://localhost:8080/index.2d3ace14.js:26732:65\nshowSecret@http://localhost:8080/index.2d3ace14.js:98124:17\nonClick@http://localhost:8080/index.2d3ace14.js:98143:48\ncallCallback@http://localhost:8080/index.2d3ace14.js:7144:22\ninvokeGuardedCallbackDev@http://localhost:8080/index.2d3ace14.js:7178:22\ninvokeGuardedCallback@http://localhost:8080/index.2d3ace14.js:7225:37\ninvokeGuardedCallbackAndCatchFirstError@http://localhost:8080/index.2d3ace14.js:7237:31\nexecuteDispatch@http://localhost:8080/index.2d3ace14.js:10691:48\nprocessDispatchQueueItemsInOrder@http://localhost:8080/index.2d3ace14.js:10705:28\nprocessDispatchQueue@http://localhost:8080/index.2d3ace14.js:10713:45\ndispatchEventsForPlugins@http://localhost:8080/index.2d3ace14.js:10721:29\n[\"3iA9v\"]</dispatchEventForPluginEventSystem/<@http://localhost:8080/index.2d3ace14.js:10846:20\nbatchedUpdates$1@http://localhost:8080/index.2d3ace14.js:22408:20\nbatchedUpdates@http://localhost:8080/index.2d3ace14.js:7016:20\ndispatchEventForPluginEventSystem@http://localhost:8080/index.2d3ace14.js:10845:23\ndispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay@http://localhost:8080/index.2d3ace14.js:8673:46\ndispatchEvent@http://localhost:8080/index.2d3ace14.js:8668:88\ndispatchDiscreteEvent@http://localhost:8080/index.2d3ace14.js:8648:26\nEventListener.handleEvent*addEventBubbleListener@http://localhost:8080/index.2d3ace14.js:8841:16\naddTrappedEventListener@http://localhost:8080/index.2d3ace14.js:10780:36\nlistenToNativeEvent@http://localhost:8080/index.2d3ace14.js:10737:32\n[\"3iA9v\"]</listenToAllSupportedEvents/<@http://localhost:8080/index.2d3ace14.js:10747:83\nlistenToAllSupportedEvents@http://localhost:8080/index.2d3ace14.js:10743:29\ncreateRoot@http://localhost:8080/index.2d3ace14.js:24490:35\ncreateRoot$1@http://localhost:8080/index.2d3ace14.js:24712:16\n.lOjBx</exports.createRoot@http://localhost:8080/index.2d3ace14.js:3844:18\n[\"4aBH6\"]<@http://localhost:8080/index.2d3ace14.js:1101:22\nnewRequire@http://localhost:8080/index.2d3ace14.js:71:24\n@http://localhost:8080/index.2d3ace14.js:122:15\n@http://localhost:8080/index.2d3ace14.js:145:3\n" }
secret.tsx:280:12
tmpfs commented 2 years ago

The vault was corrupted by the delete operation is seems.

This is the vault with bad identity bytes after the delete operation:

00000000: 0000 0078 570b 399f f2fb 0000 0026 8f57  ...xW.9......&.W
00000010: f5db de2e 1827 a4ed e8d9 9d36 8c5a 91b3  .....'.....6.Z..
00000020: 67be dfb4 40e7 1c68 6b8a 009a 3300 0000  g...@..hk...3...
00000030: 163f e14e adb6 04ea 2d5b 2956 9b2d 4b0d  .?.N....-[)V.-K.
00000040: 2115 8b8c eb70 e218 7f90 41e8 97c3 673d  !....p....A...g=
00000050: b8dc e4df 9e7c 776c 248a 0b5c 77b3 1d3d  .....|wl$..\w..=
00000060: 0000 0018 fe45 9909 c9da c39a 6ea0 e042  .....E......n..B
00000070: 3894 a667 8464 c850 f100 0000 0a00 007a  8..g.d.P.......z
00000080: 09dd 21bd 0d42 4c2e af90 a495 6265 cc61  ..!..BL.....be.a
00000090: 18e2 375f 23db 0058 c612 66d7 7d77 10e5  ..7_#..X..f.}w..
000000a0: 6707 b0f2 11d6 12e6 c600 0000 16b7 06b9  g...............
000000b0: e3b7 9c8b 52ef 882f 7786 69dc a5bf 95bb  ....R../w.i.....
000000c0: fbd4 5918 496a ac86 698e fa68 c187 e09f  ..Y.Ij..i..h....
000000d0: 57b6 d0e3 d0f9 692a 03a7 3bf1 0000 001a  W.....i*..;.....
000000e0: 17ea ccb9 e689 56d9 4a8b 3c11 edcb e6c2  ......V.J.<.....
000000f0: 85dd 45de 02fa 8bde e382 0c57 1722 6fdf  ..E........W."o.
00000100: f607 a4da d300 0000 8949 c212 d1ab de4e  .........I.....N
00000110: 24a1 fed1 679a 3aed 5f18 ccea 5be1 0e9b  $...g.:._...[...
00000120: d27f bb9f eb89 ddaa 4fbd 02d5 6021 36c9  ........O...`!6.
00000130: 1d7f 0000 001d 8ffb e4db cbb9 d278 8d89  .............x..
00000140: b8c0 54b5 19d6 0550 d16d ee2c d98a af67  ..T....P.m.,...g
00000150: e38e 4018 1743 d1b7 8a53 ccf4 2266 1559  ..@..C...S.."f.Y
00000160: 5313 7d3a f305 71c6 7c81 80c3 0000 0022  S.}:..q.|......"
00000170: 4b88 b56e 91d3 4132 589b 01f2 729b 3586  K..n..A2X...r.5.
00000180: 0358 56ca 7002 92e0 ec08 9d15 2a9a f2b4  .XV.p.......*...
00000190: 9bd9 0000 00a2 4b49 29f8 eeb5 44f9 b9d9  ......KI)...D...
000001a0: 57c8 2758 3a33 18eb 534a d77e e11f b838  W.'X:3..SJ.~...8
000001b0: fdb7 e4f6 1cf7 852d 3a7c ec96 2c6d 5e00  .......-:|..,m^.
000001c0: 0000 2158 2eaa d3d8 ebf5 6dd1 ef62 ffb7  ..!X......m..b..
000001d0: 9978 312d 49f4 f939 86e9 9073 7d3a e587  .x1-I..9...s}:..
000001e0: a74a b288 186a 7764 f62d b771 76ad 404e  .J...jwd.-.qv.@N
000001f0: e488 b045 10eb 8021 4e57 209e 6d00 0000  ...E...!NW .m...
00000200: 3794 b616 b02c 4c9b 4ada 939c acbb 5ce3  7....,L.J.....\.
00000210: e3b4 8668 216a 4df7 ce08 7284 9091 291f  ...h!jM...r...).
00000220: 2860 46cf 21fe 2619 ccc8 0ea0 f4c6 4a13  (`F.!.&.......J.
00000230: cb73 dbf5 dc4f 88c3 0000 0093 d56d 0161  .s...O.......m.a
00000240: 219b 4de7 a1f4 8e53 6017 1f95 18c8 dbec  !.M....S`.......
00000250: e478 48a3 3fc8 1234 6e25 58db e04e ca74  .xH.?..4n%X..N.t
00000260: d311 ccc2 1d00 0000 257b 5abb 285a d4cb  ........%{Z.(Z..
00000270: 2456 3e44 aed0 cc6f 489e d601 c154 bc81  $V>D...oH....T..
00000280: 982d 6059 6e34 42de c79f bd69 557a 18a4  .-`Yn4B....iUz..
00000290: 9cd7 119d f9e9 c34b 0c01 0d9b 3942 4cd1  .......K....9BL.
000002a0: 77bd acb5 8206 8c00 0000 24e8 c592 4269  w.........$...Bi
000002b0: 6f56 cbbe 7bde 488e 6ffa c2f7 a6ef 49eb  oV..{.H.o.....I.
000002c0: a14a 4ee4 f806 3c29 b03f eb5d 8369 6c00  .JN...<).?.].il.
000002d0: 0000 8d52 6296 1fdb 5f47 f496 cbbc 04ab  ...Rb..._G......
000002e0: eb95 5518 0684 8330 caaf 3783 aab1 9a57  ..U....0..7....W
000002f0: 3b62 23ce 2d9a 8b06 8b5e b5a5 0000 0021  ;b#.-....^.....!
00000300: f8eb 471a b0f3 3a6f 27cb ebd9 2386 72c0  ..G...:o'...#.r.
00000310: 0ac1 77ce 0905 cb89 a7fe efb8 394a 1354  ..w.........9J.T
00000320: dd18 77fe 0417 67af ae22 f836 26ee 433f  ..w...g..".6&.C?
00000330: b39f f835 b3e0 6631 abe0 0000 0022 c787  ...5..f1....."..
00000340: d9bb f9a2 5376 2980 2b85 ad5b 7d67 0ab5  ....Sv).+..[}g..
00000350: 0a58 dd18 084a 6067 b1f5 b6e8 65d6 ba57  .X...J`g....e..W
00000360: 0000 00c7 eb49 5587 2a57 4ba3 b755 7c26  .....IU.*WK..U|&
00000370: c372 b7b8 1880 7105 9b44 19d2 7e6f 29bc  .r....q..D..~o).
00000380: 55b2 d7af ce87 0bb3 c12e 2e58 d900 0000  U..........X....
00000390: 3330 ed0a 018d 0ce0 1510 68b8 fddd dd39  30........h....9
000003a0: 714d 807f 5161 1565 091e b34a 61b1 3ce7  qM..Qa.e...Ja.<.
000003b0: 44b8 db92 e7f4 361e f49b 5a3e 1b85 f4cb  D.....6...Z>....
000003c0: 94f7 db65 1819 85e3 1cc6 e6aa 7227 7dfd  ...e........r'}.
000003d0: d040 8123 e969 23f9 8bb6 3efc 7200 0000  .@.#.i#...>.r...
000003e0: 4ae0 d299 e613 48cb d693 9314 7733 9a30  J.....H.....w3.0
000003f0: 5955 42ff b9c9 2a5f 0cd2 fce9 3594 9d33  YUB...*_....5..3
00000400: 5ad9 594b cc5d e338 c2be 57fe 8e32 ce64  Z.YK.].8..W..2.d
00000410: 6b4f ccd6 9fd6 025e 1385 9eda bdae 0a53  kO.....^.......S
00000420: 4246 d084 07e4 d097 2102 c400 0000 a67c  BF......!......|
00000430: 7721 8495 ca49 14bb 19e2 8a59 deb7 fd18  w!...I.....Y....
00000440: 8c5d b7cd e1c4 b187 437e 21f2 9357 d021  .]......C~!..W.!
00000450: 8d3c dfd5 0975 0275 0000 0029 ef3c 02f1  .<...u.u...).<..
00000460: 6557 cb4c 5f16 6b69 9f03 b385 396e 89ec  eW.L_.ki....9n..
00000470: c22c 3c3e 6b26 af57 d980 adfd 7a20 ed6b  .,<>k&.W....z .k
00000480: 8a36 bf95 e118 8852 fc57 54f4 d5e5 9e07  .6.....R.WT.....
00000490: ae66 4a3e 4fed 5a17 41cd 1071 fe6b 0000  .fJ>O.Z.A..q.k..
000004a0: 0033 2f2c 98f0 a954 0e44 4ecf eb62 3893  .3/,...T.DN..b8.
000004b0: e522 24a6 7d4c 958a 3f86 ad6b 062f c5fa  ."$.}L..?..k./..
000004c0: 97b5 f6de 3611 3a4f 752b 5ce3 7e92 3cbf  ....6.:Ou+\.~.<.
000004d0: 065c 735b 3b00 0000 7ded e952 482c 2544  .\s[;...}..RH,%D
000004e0: 1095 b41c 222b 00ef 1718 f5e2 779f 8015  ...."+......w...
000004f0: cb4b 59e4 9743 543e 7470 d365 c2bd b4cd  .KY..CT>tp.e....
00000500: c2de 0000 001d 3565 0b24 b3d2 3b25 54eb  ......5e.$..;%T.
00000510: c5b3 0917 25fd 6efa a09d c292 c45f c0ff  ....%.n......_..
00000520: b695 6918 9596 8277 0b09 cfbd 12f1 e6cf  ..i....w........
00000530: e4ce 988b 59df 1bb1 e5c7 174d 0000 0016  ....Y......M....
00000540: 9cdc 6338 014e 7344 79a2 350b 8fdf fd44  ..c8.NsDy.5....D
00000550: 0a1f 264f abb4                           ..&O..