planetary-ios icon indicating copy to clipboard operation
planetary-ios copied to clipboard

Double post when publishing

Open mplorentz opened this issue 2 years ago • 3 comments

Yesterday this happened to me:

  1. Composed a new post
  2. Tapped the "Post" button
  3. Planetary showed an error (SQLite Error 0) because the database was busy
  4. My post did not show up in the thread where I posted it
  5. I tapped "Post" again.
  6. Posting succeeded and my post showed up twice.

This is an unfortunate consequence of having two databases and SQLite just randomly failing queries sometimes if it is waiting too long for a lock. What happened under the hood was:

  1. When I hit post my post was published to go-ssb's Badger db
  2. Then Planetary asked go-ssb for the new post to write it to SQLite
  3. The write to SQLite failed because SQL was busy doing other things
  4. We show the error to the user, and they think the post has failed to publish, not just to display

Possible solutions are:

  • retry the SQLite write a few times
  • show an error message that let's the user know that the error is with displaying their post, but it did publish successfully

mplorentz avatar Jun 08 '22 15:06 mplorentz

I ran in to this too. We should prevent you posting the exact same thing twice. Uploading 6B7F83C7-E578-45BB-AAB2-9EE99A8F8E1E.png…

rabble avatar Jul 21 '22 03:07 rabble

Add a block to go to prevent two exact same posts. Stop showing sqlite errors on insert because they are ok actually.

rabble avatar Aug 18 '22 23:08 rabble

swift issue for sqlite error too.

rabble avatar Aug 18 '22 23:08 rabble