Fenix: [Bug]Crash when trying to create a new Bookmarks folder in the "Desktop bookmarks"

Created on 28 Aug 2019  ·  13Comments  ·  Source: mozilla-mobile/fenix

Prerequisites

User should be sign in to FxA

Steps to reproduce

  1. Navigate to "Your Library"
  2. Tap on "Bookmarks"
  3. Tap on "Desktop bookmarks"
  4. Tap on the "add folder" sign from the action barWebp net-resizeimage
  5. Choose a name and tap on the upper right check sign

Expected behavior

The desired folder can be added to the "Desktop bookmarks"

Actual behavior

Crash

Device information

  • Android device: Google Pixel 3a (Android 9)
  • Fenix version: Nightly Build #12400613 from 28/8

Notes

Logcat

► Video
20190828_1600521

Bookmarks Hacktoberfest P3 S2 crash engverified ready help wanted 🐞 bug

All 13 comments

mozilla.appservices.places.CannotUpdateRoot: Invalid place info: Cannot update the bookmark root Root
at mozilla.appservices.places.RustError.intoException(RustError.kt:53)
at mozilla.appservices.places.PlacesWriterConnection.doInsert(PlacesConnection.kt:1015)
at mozilla.appservices.places.PlacesWriterConnection.createFolder(PlacesConnection.kt:469)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$addFolder$2.invokeSuspend(PlacesBookmarksStorage.kt:113)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$addFolder$2.invoke(Unknown Source:10)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:91)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:156)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage.addFolder$suspendImpl(PlacesBookmarksStorage.kt:112)
at mozilla.components.browser.storage.sync.PlacesBookmarksStorage.addFolder(Unknown Source:0)
at org.mozilla.fenix.library.bookmarks.addfolder.AddBookmarkFolderFragment$onOptionsItemSelected$1.invokeSuspend(AddBookmarkFolderFragment.kt:86)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)

I would like to try this one out

Since there have been no updates from @cfsnsalazar can I take this up?

@hackertronix go ahead

Thanks @cfsnsalazar! :)

Any update @hackertronix, or can we open this bug up for someone else to work on?

unassigning for inactivity

It looks like there shouldn't be an option to create a new folder at that place.

Desktop Firefox doesn't have any option to create a folder or a new bookmark at that level (All Bookmarks, parent of Bookmark Menu, Bookmarks Toolbar, and Other Bookmarks).

Even here, there's a comment about throwing this exact error:
https://github.com/mozilla/application-services/blob/master/components/places/android/src/main/java/mozilla/appservices/places/Bookmarks.kt#L293

Any thoughts?

Hey @liuche sorry about not being able to respond I was off for a while due to work.

@AfzalivE is correct I had discussed the same a while back with @ekager and yes users should not be able to add folders to the root.

@hackertronix if you aren't working on a fix, would you mind if I take a stab at this?

@AfzalivE, by all means, please go ahead :)

Reopening for QA!

Hi, verified as fixed on the latest Nightly Build #13500610 from 12/16 using the following devices:
• Google Pixel 3a (Android 9)
• Huawei Mate 20 Lite (Android 8.1.0)
• Samsung Galaxy S7 (Android 7)
• OnePlus (Android 6.0.1)
• LG Nexus 4 (Android 5.1.1)

► Video
20191216_105129

Was this page helpful?
0 / 5 - 0 ratings