This article explains how to fix sudden and surprising synchronization problem(s) in OneNote, that first surfaces as search (the one you open with CTRL+E, not the unified/M365-wide top bar search) not finding any results from the page content, even if it might find some from the page or section titles.
This exciting story has it all: Manually triggering a job that should be automatic, finding some secret broken files and boldly removing them, and of course a daring registry hack! What would a blog article about a Windows app be without one, after all? 😅
Background
Anyway, to properly explain the story, we need to go all the way back to the olden days of having to reformat your Windows box every so often. A few months back, that is. See, I had to reinstall my pc because Windows Update broke it. It had nothing to do with CrowdStrike, mind you, just a normal update causing Windows not to start anymore.
I know, an evergreen story if there ever was one.
But after the reinstall, somehow my OneNote was broken. And it turns out it wasn’t only broken in one way, but in multiple unrelated ways.
This was… New. Of all the Office/Microsoft365 apps and services, OneNote is usually the one that just works.
Not this time, though. For once, everything else seemed to be working (even OneDrive!) Only OneNote was having issues.
But what exactly was wrong, then?
Problem
The first way I found out my OneNote had randomly broke was when I needed to find something from a OneNote workbook.
Shocking, I know. But it’s something that I need to do all the time – and I thought I was going crazy when I suddenly couldn’t find stuff I KNEW existed.
So I tried something:
- I opened a page with certain content.
- Searched for a word that’s used in quite a few different places in my notes.
- I got results… From that page, one section title and one page title.
I should’ve gotten dozens of hits from page content. But the whole area in the results pane was missing!
That’s… Very odd. I’ve never seen this break before.
Reason
There were actually 3 different, somewhat unrelated things broken. Namely:
- OneNote’s local cache was somehow corrupted (and OneNote didn’t notice it)
- One account used to synchronize files had been attributed to the wrong tenant
- Synchronization of a workbook in my personal OneDrive had silently started to fail
I say “silently”, because OneNote never once displayed any errors to me – synchronization for one of my main workbooks had stopped running and OneNote had not notified me. Once I navigated to the workbook, the sections were there, but pages weren’t.
And the account attribution was perhaps the weirdest one… I assume it didn’t cause the synchronization of the workbook in my personal OneDrive to start failing, since I could fix that issue without touching the mappings (and there are no mappings in Windows Registry for OneNote workbooks in personal OneDrive anyway, only for enterprise accounts & tenants).
But that’s enough yammering – let’s get to fixing it, shall we?
Solution
Let’s start with the easiest step and continue on to the hackier ones!
1. Force notebook sync
First of all, we’ll need to make sure OneNote is actually synchronizing your workbooks.
OneNote has a separate synchronization engine that works in mysterious ways. Usually it’s great. But sometimes it randomly breaks.
To kick off a sync job manually, do the following:
- Navigate to File > View Sync Status
- Click “Sync All”
- Observe!
You’ll probably see something like this:
Items randomly failing to sync. This workbook had somehow stopped synchronizing automatically (apparently the issue is silent and at least for me, it didn’t retry after failing – but that could because of other issues we’ll investigate shortly!) but should handle the errors automatically after you’ve manually started the sync.
However, if the errors don’t go anywhere after you’ve hit “Sync Now” repeatedly for about 15 minutes, or if you still have the issue after the job succeeds, you need to proceed to the next step.
And if you see a “grey” icon in the list of workbooks (kind of embarrassing I didn’t take a screenshot of that – sorry!) instead of the colorful ones, then you’re in some deep stuff – jump directly to step 3.
2. Reset OneNote Cache
Well, “reset” might be a really kind word for it… What you need to do is to navigate to your OneNote’s AppData folder and remove a folder called “cache”. It’ll be built from the scratch the next time OneNote starts.
This can be done with the following steps:
- Close OneNote
- Hit win+r
- Enter %LocalAppData% in the box and hit “OK”
- Navigate to Microsoft > OneNote > 16.0 (or whatever your OneNote version is)
- Delete (or if you’re careful, move to your safe stash somewhere)
- Reopen OneNote
And now, search should just work!
If after testing it again it still fails, proceed to the next step.
3. Fix OneNote’s account-tenant -mappings using Registry Editor
Ah, this is the step we all have been waiting for! Finally, we can whip out the Registry Editor and get to the ACTUAL fixing.
We’ll need to remove any mappings of your accounts and tenants that might be wrong.
- Close OneNote
- Open Registry Editor (win+r -> regedit -> ok)
- Navigate to Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity\DocToIdMapping
- Go through the folders under that path, and find one that has duplicates in it – and simply remove them (see screenshots below)
- Reopen OneNote and kick off a sync job again
- You should be good!
Below is a sample of a tenant that has both a correct and an incorrect mapping in it – it had my work tenant, and somehow my demo tenant’s MySite OneDrive host address under it.
Navigating to the other tenant, I could see my demo tenant living there too. That’s where it needs to be.
So with that, I know it’s safe to remove the entry starting with https://koskila… under the folder starting with 6dd8150a… as it actually does not belong there. It belongs under 5146690e, and already exists there, too!
And, with any luck…
It works!
I mean – if it DID work, it’ll look something like this: you’ll have a “new” section in search results.
And if it doesn’t?
Ping me in the comment’s section below and I’ll see if I can help you out!
References
- https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-deal-with-error-code-0xe000006b-blg57-of/54d47ba6-387a-4c59-bec7-3ecfec8c6f51
- https://answers.microsoft.com/en-us/msoffice/forum/all/one-note-not-synching-error-code-0xe401069d-c12qc/7d220069-ce76-40d5-b6de-f2c02acaecf1
- How to export the whole SSL (or TLS) certificate chain based on the original using PowerShell? - September 17, 2024
- How to solve keyboard shortcuts not working in Google Chrome on Windows? - September 10, 2024
- Search (and secretly, sync) broken in OneNote? A quick fix! - September 3, 2024