Jump to content

Fiddler: Difference between revisions

From Resco's Wiki
Marek Rodak (talk | contribs)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Wikipedia|Fiddler (software)}} {{Academy|73|Fiddler Classic}} {{Support TOC}}
{{Wikipedia|Fiddler (software)}} {{Academy|73|Fiddler Classic}} {{Support TOC}}
'''Fiddler''' is a free web debugging proxy server application. You can use it to trace the communication between the [[Resco mobile apps]] and the backend server, for example, during [[synchronization]]. If you send us the communication along with the description of the problem, this can greatly speed up the troubleshooting. You just need a Windows version of [[Resco Mobile CRM]] application and Fiddler. This guide describes a simple procedure for reporting such issues with the mentioned app.
'''Fiddler''' is a free web debugging proxy server application. You can use it to trace the communication between the [[Resco mobile apps]] and the backend server, for example, during [[synchronization]]. If you send us the communication along with the description of the problem, this can significantly speed up the troubleshooting. You just need a Windows version of [[Resco Mobile CRM]] application and Fiddler. This guide describes a simple procedure for reporting such issues with the mentioned app.


{{Note|Using Fiddler may decrease performance. Do not use Fiddler once you're done troubleshooting.}}
{{Note|Using Fiddler may decrease performance. Do not use Fiddler once you're done troubleshooting.}}
Line 20: Line 20:
=== Windows Store only ===
=== Windows Store only ===


If you are using the Microsoft Store version of Resco Mobile CRM, perform the following additional configuration in Fiddler.
If you use the Microsoft Store version of Resco Mobile CRM, perform the following additional configuration in Fiddler.
# Click '''WinConfig''' on the toolbar.
# Click '''WinConfig''' on the toolbar.
# Click '''Yes''' in the User Account Control window.
# Click '''Yes''' in the User Account Control window.
# Click '''Yes''' for Loopback exemptions.
# Click '''Yes''' for Loopback exemptions.
# In the '''AppContainer Loopback Exemption Utility window''', find Resco Mobile CRM and enable it, then click '''Save Changes'''.
# In the '''AppContainer Loopback Exemption Utility window''', find Resco Mobile CRM and enable it, then click '''Save Changes'''.
=== iOS proxy ===
In order to capture traffic from iOS devices, it is necessary to set up a proxy server. In Fiddler, adjust the root certificate generation and enable the remote computer to connect option. In iOS, configure the proxy and import the root certificate from Fiddler. It's important to configure Fiddler prior to iOS.
;Configure the Fiddler Classic:
#Open Fiddler and Stop capturing traffic.
#Click '''Tools''' > '''Options''' > '''HTTPS''' and disable '''Capturing HTTPS Connects'''.
#Close Fiddler and install BouncyCastle (CertMaker.dll) from [https://telerik-fiddler.s3.amazonaws.com/fiddler/addons/fiddlercertmaker.exe here] (This addition changes how certificates are generated. Fiddler will now use only one root certificate for all options.).
#Open Fiddler > '''Tools''' > '''Options''' > '''HTTPS''' > '''Actions''' and '''Reset all certificates''' option (agree with all dialogs).
#Enable Capturing and HTTPS decryption (Tools > Options > HTTPS).
#Click '''Tools''' > '''Options''' > '''Connections''' and click the checkbox for '''Allow remote computers to connect'''.
#Restart Fiddler and ensure your firewall allows incoming connections to the Fiddler Classic processes.
;Set up the iOS proxy:
#On the iOS device, open '''Settings''' > '''General''' > '''VPN & Device Management''' and remove all '''DO_NOT_TRUST_FiddlerRoot''' profiles.
#Go to '''Settings > WiFi''' and click the i icon next to your network.
#Scroll to the bottom and choose '''Manual''' on the '''Configure Proxy''' option.
#Type your Fiddler machine IP address in the '''Server''' field and Fiddler listening port  (8888 by default) in the '''Port''' field, and click '''Save'''.
#Open the browser (iOS) and type the Fiddler Classic echo service address: '''http://ipv4.fiddler:8888'''
#Click on the Fiddler Classic root certificate link to download it.
#Go to '''Settings''' > '''General''' and install the certificate via the '''Profile Downloaded''' option.
#Continue to (Settings > General >) '''About''' > '''Certificate Trust Settings''' and enable full trust for the '''DO_NOT_TRUST_FiddlerRoot'''certificate.


== Tips for tracing ==
== Tips for tracing ==
Line 30: Line 52:
<!--If the issue is related to any time issue, like timeout, or when it takes too long to perform the action, enable filters. Go to the '''Filters''' tab and check '''Use Filters'''.
<!--If the issue is related to any time issue, like timeout, or when it takes too long to perform the action, enable filters. Go to the '''Filters''' tab and check '''Use Filters'''.
* If you want to filter by process (recommended), check '''Show only traffic from''' and select <code>MobileCRM:xxxx</code>.
* If you want to filter by process (recommended), check '''Show only traffic from''' and select <code>MobileCRM:xxxx</code>.
* Optionally, enable the option '''Time HeatMap'''. When enabled, sessions are highlighted with background color, based on how long it took for the server to respond. Fastest responses are green, average are not highlighted, slow are yellow or red.  
* Optionally, enable the option '''Time HeatMap'''. When enabled, sessions are highlighted with background color, based on how long it took for the server to respond. The fastest responses are green, average are not highlighted, and slow are yellow or red.  


Try to reproduce the problem. You may need to start the traffic capture manually: Select '''Capture Traffic''' from the '''File''' menu. Do so before reproducing the issue to make sure all needed data is captured. If you are successful, save the session info and send it to us for review: select '''Save''' from the '''File''' menu.-->
Try to reproduce the problem. You may need to start the traffic capture manually: Select '''Capture Traffic''' from the '''File''' menu. Do so before reproducing the issue to make sure all needed data is captured. If you are successful, save the session info and send it to us for review: select '''Save''' from the '''File''' menu.-->
Line 49: Line 71:
; Process picker (recommended) :
; Process picker (recommended) :
Process picker is a very simple drag-and-drop tool. Users drag and drop the target on the Resco Mobile CRM application (process).<br>
Process picker is a very simple drag-and-drop tool. Users drag and drop the target on the Resco Mobile CRM application (process).<br>
[[File:Any Process.png]]
[[File:Any Process.png|alt=Fiddler: Process picker target]]
; Status bar
; Status bar
Status bar offers very simple filtering by the process.<br>
Status bar offers straightforward filtering by the process.<br>
[[File:Status bar.png]]
[[File:Status bar.png|alt=Fiddler: status bar]]
; Filters tab
; Filters tab
Filters tab offers more complex filtering. Here you can filter by the host, client, process, etc...
Filters tab offers more complex filtering. Here you can filter by the host, client, process, etc...
Line 60: Line 82:
Open the Find session window by pressing '''Ctrl+F''' or clicking the '''Find''' in the top-level tab.
Open the Find session window by pressing '''Ctrl+F''' or clicking the '''Find''' in the top-level tab.


[[File:Find session.png]]
[[File:Find session.png|alt=Fiddler: Find session]]


Enter the session details in the '''Find Sessions''' window. In this case, we are looking for a request for an account entity. Therefore, we set Find: ''account'', Search: ''Request only'', and Examine: ''Bodies only'' (unless you are specifically looking for information in the header, always use Bodies only).
Enter the session details in the '''Find Sessions''' window. In this case, we are looking for a request for an account entity. Therefore, we set Find: ''account'', Search: ''Request only'', and Examine: ''Bodies only'' (unless you are specifically looking for information in the header, always use Bodies only).


[[File:Find session window.PNG]]
[[File:Find session window.PNG|alt=Fiddler: Find session window]]


Click '''Find Sessions''', and the corresponding sessions will be highlighted in the session list.
Click '''Find Sessions''', and the corresponding sessions will be highlighted in the Web session list.


=== Saving sessions (to export) ===
=== Saving sessions (to export) ===
You may want to save the captured traffic for later review or send it to our support upon request.
You may want to save the captured traffic for later review or send it to our support upon request.


To save captured traffic, go to '''File'''-->'''Save'''.
To save captured traffic, go to '''File > Save'''.
 
*If you want to save all sessions, click '''All Sessions'''.
*If you want to save a specific session, select them and click '''Selected Sessions''' and (save) in ArchiveZip.


*If you want to save All Sessions, click All Sessions.
[[File:2025-02-21 14 16 47-.png|alt=saving sessions in fiddler]]
*If you want to save a specific session, select them and click Selected Sessions and (save) in ArchiveZip.


=== Inspecting fetch ===
=== Inspecting fetch ===
While inspecting the fetch of a request, it's advised to export the fetch from Fiddler and visualize it in a formatted version.
While inspecting the fetch of a request, it's advised to export the fetch from Fiddler and visualize it in a formatted version.


#Select the session which fetch you want to inspect and enter the '''Inspectors tab'''.
#Select the session which fetch you wish to inspect and enter the '''Inspectors tab'''.
#Open the request in '''XML''' format and locate fetch.
#Open the request in '''XML''' format and locate fetch.
#Right-click on fetch query and click '''Send to TextWizard'''.<br>[[File:FetchExport.png|600px]]
#Right-click on fetch query and click '''Send to TextWizard'''.<br>[[File:FetchExport.png|alt=Fiddler: Fetch export|600px]]
#Choose '''HTML Decode in Transform (to)''' dropdown menu.
#Choose '''HTML Decode in Transform (to)''' dropdown menu.
#Click '''To File...''' and save the fetch as an XML file.
#Click '''To File...''' and save the fetch as an XML file.
Line 88: Line 112:
== Security ==
== Security ==


* Some companies may block Fiddler or require that it's uninstalled asap after use. The argument is that Fiddler’s root certificate can be misused by malicious apps. However, this issue is not that dramatic. The certificate is unique for the device where Fiddler is installed, hence external apps have no chance to know about it.
* Some companies may block Fiddler or require that it's uninstalled asap after use. The argument is that malicious apps can misuse Fiddler’s root certificate. However, this issue is not that dramatic. The certificate is unique for the device where Fiddler is installed. Hence external apps have no chance to know about it.


== Fiddler and Woodford ==
== Fiddler and Woodford ==


You can use Fiddler also to trace the communication between [[Woodford]] and your backend server.
You can also use Fiddler to trace the communication between [[Woodford]] and your backend server.


== See also ==
== See also ==

Latest revision as of 15:57, 4 March 2025

Wikipedia logo
Wikipedia has an article on a similar subject:
Resco Academy
Resco Academy has a course on a similar subject:

Fiddler is a free web debugging proxy server application. You can use it to trace the communication between the Resco mobile apps and the backend server, for example, during synchronization. If you send us the communication along with the description of the problem, this can significantly speed up the troubleshooting. You just need a Windows version of Resco Mobile CRM application and Fiddler. This guide describes a simple procedure for reporting such issues with the mentioned app.

Note Using Fiddler may decrease performance. Do not use Fiddler once you're done troubleshooting.

How can Fiddler help

  • Identify server requests taking too much time
  • Identify requests/responses transmitting large data
  • Identify bottlenecks in the client-server communication
  • Identify repeating or duplicate requests

Install and configure Fiddler

Resco Windows version

  1. Download and install a Windows version of Resco Mobile CRM. You can use the store version or the desktop version.
  2. Get Fiddler from the official website and install it. We recommend using the "classic" version.
  3. Launch Fiddler.
  4. Select Tools > Options, go to the HTTPS tab and enable Decrypt HTTPS traffic.
  5. Trust the Fiddler Classic Root certificate (admin rights).

Windows Store only

If you use the Microsoft Store version of Resco Mobile CRM, perform the following additional configuration in Fiddler.

  1. Click WinConfig on the toolbar.
  2. Click Yes in the User Account Control window.
  3. Click Yes for Loopback exemptions.
  4. In the AppContainer Loopback Exemption Utility window, find Resco Mobile CRM and enable it, then click Save Changes.

iOS proxy

In order to capture traffic from iOS devices, it is necessary to set up a proxy server. In Fiddler, adjust the root certificate generation and enable the remote computer to connect option. In iOS, configure the proxy and import the root certificate from Fiddler. It's important to configure Fiddler prior to iOS.

Configure the Fiddler Classic
  1. Open Fiddler and Stop capturing traffic.
  2. Click Tools > Options > HTTPS and disable Capturing HTTPS Connects.
  3. Close Fiddler and install BouncyCastle (CertMaker.dll) from here (This addition changes how certificates are generated. Fiddler will now use only one root certificate for all options.).
  4. Open Fiddler > Tools > Options > HTTPS > Actions and Reset all certificates option (agree with all dialogs).
  5. Enable Capturing and HTTPS decryption (Tools > Options > HTTPS).
  6. Click Tools > Options > Connections and click the checkbox for Allow remote computers to connect.
  7. Restart Fiddler and ensure your firewall allows incoming connections to the Fiddler Classic processes.
Set up the iOS proxy
  1. On the iOS device, open Settings > General > VPN & Device Management and remove all DO_NOT_TRUST_FiddlerRoot profiles.
  2. Go to Settings > WiFi and click the i icon next to your network.
  3. Scroll to the bottom and choose Manual on the Configure Proxy option.
  4. Type your Fiddler machine IP address in the Server field and Fiddler listening port (8888 by default) in the Port field, and click Save.
  5. Open the browser (iOS) and type the Fiddler Classic echo service address: http://ipv4.fiddler:8888
  6. Click on the Fiddler Classic root certificate link to download it.
  7. Go to Settings > General and install the certificate via the Profile Downloaded option.
  8. Continue to (Settings > General >) About > Certificate Trust Settings and enable full trust for the DO_NOT_TRUST_FiddlerRootcertificate.

Tips for tracing

Start/Stop capturing traffic

To capture only the traffic related to our issue, start capturing traffic right before executing an action in MCRM. Stop capturing traffic right after.
We have three options to start/stop capturing available:

  • Click File > click Capture Traffic.
  • In the Status bar, click in the left corner.
  • Press F12.

Filtering sessions

Fiddler captures traffic from all processes. We can use filtering to get only those sessions we need. There are three main options to filter traffic:

  • Process picker
  • Status bar
  • Filters tab
Process picker (recommended)

Process picker is a very simple drag-and-drop tool. Users drag and drop the target on the Resco Mobile CRM application (process).
Fiddler: Process picker target

Status bar

Status bar offers straightforward filtering by the process.
Fiddler: status bar

Filters tab

Filters tab offers more complex filtering. Here you can filter by the host, client, process, etc...

Finding session

The number of captured sessions can sometimes be overwhelming. To find the session you are looking for, use the Find tool.
Open the Find session window by pressing Ctrl+F or clicking the Find in the top-level tab.

Fiddler: Find session

Enter the session details in the Find Sessions window. In this case, we are looking for a request for an account entity. Therefore, we set Find: account, Search: Request only, and Examine: Bodies only (unless you are specifically looking for information in the header, always use Bodies only).

Fiddler: Find session window

Click Find Sessions, and the corresponding sessions will be highlighted in the Web session list.

Saving sessions (to export)

You may want to save the captured traffic for later review or send it to our support upon request.

To save captured traffic, go to File > Save.

  • If you want to save all sessions, click All Sessions.
  • If you want to save a specific session, select them and click Selected Sessions and (save) in ArchiveZip.

saving sessions in fiddler

Inspecting fetch

While inspecting the fetch of a request, it's advised to export the fetch from Fiddler and visualize it in a formatted version.

  1. Select the session which fetch you wish to inspect and enter the Inspectors tab.
  2. Open the request in XML format and locate fetch.
  3. Right-click on fetch query and click Send to TextWizard.
    Fiddler: Fetch export
  4. Choose HTML Decode in Transform (to) dropdown menu.
  5. Click To File... and save the fetch as an XML file.
  6. Open the XML file in a browser.

Security

  • Some companies may block Fiddler or require that it's uninstalled asap after use. The argument is that malicious apps can misuse Fiddler’s root certificate. However, this issue is not that dramatic. The certificate is unique for the device where Fiddler is installed. Hence external apps have no chance to know about it.

Fiddler and Woodford

You can also use Fiddler to trace the communication between Woodford and your backend server.

See also

  • XrmToolBox - set of tools that simplify the customization, configuration, and operation of Dynamics backends