The following is a guide on how I debugged a directory not found error, which happened to me just after an update to Microsoft Teams. This process can be used with any Windows application, where you are getting file or directory errors.
I currently run mulitple instances of Microsoft Teams.
This was working well until a recent update to Teams caused something to brake.
I received an error that the
downloads directory did not exist, however there was no information about the expected path:
Uncaught Exception: Error: Failed to get 'downloads' path at Object.<anonymous>
Checking the log path for Teams
C:\Users\ralph\AppData\Roaming\Microsoft\Teams, didn’t reveal anything.
So how do we work out the path Microsoft Teams is trying to access, if its never displayed or logged?
In order to work out the path Microsoft Teams is trying to access I’ll use Process Monitor (also known as
Procmon is part of the Sysinternals Utilities.
Download the suite and install so the utilities are available on your windows
I have a
C:\utils folder which is part of my
PATH and I put these types of tools there.
We will need to Start
Procmon and configure it so that it:
- captures events for the process I’m trouble shooting
- only captures activity related to the file system
Procmon and then stop it from capturing events:
Then, we will clear all the events that have been captured:
For this example we are only interested in file system activity, so we will enable only that filter:
Select Filter from the top menu and modify the filter settings so that I limit captured file events to the
I also know that the path will contain the word
download which was displayed in the error message, so I’ll add a filter for that too.
So for my example the
Procmon filter looks like this:
Before starting the application ensure all events from
Procmon have been cleared and
Procmon is set to capture activity again.
Starting Microsoft Teams again,
Procmon will now capture file events which were not successful and have the keyword I specified in the Path.
Below you can see the
Procmon output I captured and the path to the directory which Teams was trying to access:
I created a
Downloads folder in my custom profiles location and Microsoft Teams loaded successfully.
Checkout Process Monitor docs for more on what this great tool can do.