Overview
When investigating issues related to web pages, such as the M-Files Web client, the M-Files Classic Web (MFWA), M-Files Web Companion, the M-Files for Chrome extension, or add-ins (such as the one for Salesforce), M-Files support personnel might ask for a network and console log from the browser.
A network log provides detailed information on underlying communication between the web browser and the M-Files server, including the status of each call and response, and the console contents can provide additional details on any errors.
Important Notes
- This type of log will collect a lot of sensitive information from the client, including things like user names and passwords, customer information, PII (and/or GDPR data), access tokens.
- Make sure your organization allows that.
- You may need permission and/or assistance from other teams such as IT administrators, or even legal teams.
- Only send these logs if M-Files Support asks for them.
- Make sure to send them securely via the M-Files Cryptshare portal.
Information to collect
There are several things to collect when asked for the network log from a browser:
- The contents of the Console tab.
- The contents of the Network tab.
- The server-side logs.
The sections below explain the details on each in a step-by-step tutorial.
The screenshots are taken from Google Chrome, and the same applies for Edge, while with Firefox the approach is similar, even though the UI may differ.
Step 1 - Prepare for collection
To start collecting logs, prepare to reproduce the scenario or issue you need to record in as concise a manner as possible.
Prepare to start recording on a page before the one that needs investigation, so the logs can collect all the information about the problematic page, from the start. For example, if you will be recording logs about an add-in, start the developer tools on a page that does not have the add-in, but has a link to a page that has it, then open the developer tools and clear their contents as described below, and start recording, then go to the page with the add-in. OR if you need to record logs about an issue in the M-Files Web client's functionalities (such as search, views, metadata cards, etc.), start the recording before logging in to M-Files Web.
Note the exact time in UTC down to the minute when you will start reproducing the issue. This is important to match against server-side logs.
During the recording, if anything relevant happens on the screen, you can also take screenshots.
When you have prepared the scenario and know when to start the recording, you can proceed to the steps below and collect the logs.
Step 1.1 - If Asked, Enable Extra Logs
- Open the browser developer tools (F12 or Ctrl+Shift+I are default shortcuts, or go to the three dots menu > More Tools > Developer Tools).
- In the Console tab, paste the following line and press Enter (the browser may ask you to confirm pasting and code execution):
window.sessionStorage.setItem( "MFiles.vNext.WebApp.DebugFlags-ConsoleLogging", true ); - In the Console tab, paste this line and press Enter:
window.sessionStorage.setItem( "MFiles.vNext.WebApp.DebugFlags-LogExtraInfo", true ); - Do NOT close this browser tab but (re)load the M-Files Web client and collect all logs as usual when reproducing the use case. These settings are in the session storage, so they are lost when the session ends (this or all tabs are closed).
Step 2 - Open a blank page and the developer tools
Open your browser, enter "about:blank" in the address bar and press the Enter key. If you were asked to collect the logs from step 1.1, make sure to use the same tab where you executed the two commands.
Open the "developer tools":
- Click on the Menu (three dots at the top right-hand side in the current browser versions).
- Select More tools.
- Select Developer tools.
The keyboard shortcut is F12 or Ctrl + Shift + I, but keep in mind that it may not always work depending on the web site.
Clear the contents of the Console and Network tab before you reproduce the issue and record.
There is usually a small icon at the top left-hand side of the tab that depicts a "forbidden" sign, similar to this:
In Firefox, it may look like a trash can and its position may be slightly different.
Step 3 - Record the network traffic
- Select the "Network" tab in developer tools.
- Select the Preserve log and Disable cache checkboxes.
- Clear the contents of the Network tab and of the Console tab via the Clear button in the top left-hand side (see instructions above).
- Ensure the red circle in the top left-hand side of the Network panel is "glowing" so that traffic is recorded. If it is not glowing but is a grey circle, click it so it is red, and this will start recording the network traffic.
- Reproduce the scenario or issue.
- Click the Export HAR… button (downward facing arrow) to save the file.
Figure: Capturing network log from Google Chrome
Step 4 - Save the console contents
- Select the Console tab.
- There may be various entries in it, or none. In any case, save this information. Take a screenshot as well.
- Right click the empty area.
- Select "Save as" and save the text file.
Step 5 - Server logs
If your vault is in the M-Files cloud, only send the UTC time of the attempt. M-Files personnel can collect the necessary logs.
If this is an on-premises server, collect the following server-side logs:
- IIS logs - wait at least 10 minutes before collecting them to ensure IIS flushes the data to disk
- Windows Event Log - if IIS and M-Files Server are running on separate machines, get the logs from both.
Step 6 - Send the information to M-Files support
You should now have the following list of data:
- The .har file from the Network tab.
- The .log file from the Console tab.
- The UTC time of the attempt.
- If on-premises, the .evtx file from Windows Event Log.
- If on-premises, the .log files from IIS.
- Details on the issue/scenario that was recorded (what was done, what was observed, any screenshots).
Send all of this information securely to M-Files support via our Cryptshare portal.
