browser.bookmarks.onCreated > cant get no parentId

I try to build an AddOn with the Info at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks/onCreated

When i use the following function in my AddOn and i add a bookmark for example in a folder “Testfolder”, i always get as bookmarkInfo.parentId “unfiled_____”. Why cant i get the correct folder id?

function handleCreated(id, bookmarkInfo) {
  console.log(`New bookmark ID: ${id}`);
  console.log(`New bookmark URL: ${bookmarkInfo.parentId}`);
}

browser.bookmarks.onCreated.addListener(handleCreated);

Have you tried this in a fresh Firefox profile?
I once had a profile where the folders had recursive loops (in the UI). Don’t know how that happened, but it mad the API report all sorts of crap.

It seems I have found the problem. When I add a bookmark via Strg+D or menu or toolbar button, it’s every time created in unfiled. The event onCreated seems to be fired at the time i click the button or press the shortcut. When I now select a folder in the dialog, the event onMoved is fired which moves the bookmark to the target folder. So I have to keep an eye on both events. In a small test today, this seems to work.