Skip Navigation
Expand
Troubleshooting Plugin API issues from various devices
Answer ID 12459   |   Last Review Date 11/07/2022

How can I help to investigate a specific issue with Plugin API?

Environment:

All versions of Oracle Field Service (OFS)

Issue:

While trying to develop or implement the custom plugins making use of Plugin API, we come across different errors or scenarios, that we need to troubleshoot.

Resolution:

Should you need to engage Oracle Field Service Support team for issues related to Plugin API, you will likely need to provide the details that are described below. The following are generic instructions for gathering debug information in case of issues related to Plugin API. 
 
Android (Chrome browser)
  1. Enable USB debugging on a phone. On Android, usually, this requires the following steps:
    1. Go to System settings -> About phone -> Software information
    2. Click "Build number" 5 times in a row to enable "Developer options"
    3.  Go to System settings -> Developer options
    4.  Enable "USB Debugging" option
  2. Open OFS Core App in the Chrome browser on a phone and log into application
  3. Connect a phone to a PC with a USB cable
  4. Confirm authorization for USB debugging on a phone
  5. Open Chrome browser on a PC
  6. Navigate to the special URL "chrome://inspect/devices#devices" in the Chrome browser on a PC
  7. You should see the model name of a phone and a list of tabs opened there.
    If the device list is empty, you probably need to install additional software (drivers).
  8. Find the Field Service row and click "inspect". Developer tools will open in a new window.
    You should also see the image of the Core App page in the Developer tools window.
  9. In the Developer tools window, click the "Settings" button (gear icon)
  10. In the "Network" section of the "Preferences" tab check the "Record network log" option
  11. In the "Console" section of the same tab check the "Show timestamps" option
  12. Close the settings popup
  13. Open the "Console" tab of Developer tools. If the "Console" tab is not shown at the top of Developer tools, click the icon with three dots in the top right corner of the Developer tools window and find Console in the "More tools" submenu
  14. Click on the bottom line of the Console next to the ">" icon so the flashing cursor appears
  15. Input the following command there and press "Enter": setOfscDebugModes(true, 'pluginApi')
  16. Start screen recording
  17. Try to reproduce issue
After issue reproduced:
  1. Open the "Console" tab of Developer tools
  2. Scroll the contents of the Console, so we can see all messages
  3. Find the last "Init stage. Platform received "ready" method" and "Init stage. Platform received "initEnd" method" messages in a console log and expand them, so the contents of "postMessage" object is visible
  4. Find the last "Platform sent "open" method" message in a console log and expand it, so the contents of "postMessage" object is visible
  5. Find the last "Open stage. Platform received "close" method" message in a console log (in case it is available) and expand it, so the contents of "postMessage" object is visible
  6. Click the right mouse button on the Console tab contents and select "Save as..." to save the log into a file
  7. Open the "Network" tab of Developer tools
  8. Click the right mouse button on the Network tab contents and select "Save all as HAR with content" to save the network activity log into a file
  9. Stop the screen recording and save it into a file.
 
Desktop (Chrome browser)
  1. Login into Core app in Chrome browser on a PC
  2. Open Developer tools in Chrome
  3. In the Developer tools window, click the "Settings" button (gear icon)
  4. In the "Network" section of the "Preferences" tab check the "Preserve log" and "Record network log" options
  5. In the "Console" section of the same tab check the "Show timestamps" and "Preserve log upon navigation" options
  6. Close the settings popup
  7. Open the "Console" tab of Developer tools. If the "Console" tab is not shown at the top of Developer tools, click the icon with three dots in the top right corner of the Developer tools window and find Console in the "More tools" submenu
  8. Click on the bottom line of the Console next to the ">" icon so the flashing cursor appears
  9. Input the following command there and press "Enter": setOfscDebugModes(true, 'pluginApi')
  10. Refresh Core App page (Ctrl+R or F5)
  11. Start screen recording of the Core App window
  12. Try to reproduce issue
After issue reproduced:
  1. Open the "Console" tab of Developer tools.
  2. Scroll the contents of the Console, so we can see all messages
  3. Find the last "Init stage. Platform received "ready" method" and "Init stage. Platform received "initEnd" method" messages in a console log and expand them, so the contents of "postMessage" object is visible
  4. Find the last "Platform sent "open" method" message in a console log and expand it, so the contents of "postMessage" object is visible
  5. Find the last "Open stage. Platform received "close" method" message in a console log (in case it is available) and expand it, so the contents of "postMessage" object is visible
  6. Click the right mouse button on the Console tab contents and select "Save as..." to save the log into a file
  7. Open the "Network" tab of Developer tools
  8. Click the right mouse button on the Network tab contents and select "Save all as HAR with content" to save the network activity log into a file
  9. Stop the screen recording and save it into a file.
 
MacOS Desktop (Safari browser)
  1. Login into Core app in Safari browser on a Mac
  2. Open Web Inspector in Safari (Develop > Web Inspector)
  3. In the Web Inspector window, open the "Network" tab and enable the "Preserve Log" option at the top of the tab
  4. In the Web Inspector window, open the "Console" tab and enable the "Preserve Log" option at the top of the tab
  5. Click on the bottom line of the Console tab next to the ">" icon so the flashing cursor appears
  6. Input the following command there and press "Enter": setOfscDebugModes(true, 'pluginApi')
  7. Refresh Core App page (Cmd+R)
  8. Start screen recording of the Core App window
  9. Try to reproduce issue
 After issue reproduced:
  1. Open the "Console" tab of the Web Inspector.
  2. Scroll the contents of the Console, so we can see all messages
  3. Find the last "Init stage. Platform received "ready" method" and "Init stage. Platform received "initEnd" method" messages in a console log and expand them, so the contents of "postMessage" object is visible
  4. Find the last "Platform sent "open" method" message in a console log and expand it, so the contents of "postMessage" object is visible
  5. Find the last "Open stage. Platform received "close" method" message in a console log (in case it is available) and expand it, so the contents of "postMessage" object is visible
  6. Select all content of the Console by pressing Cmd+A
  7. Click the right mouse button on the Console tab contents, then click "Save Selected" to save the log into a file
  8. Open the "Network" tab of Web Inspector
  9. At the top of the "Network" tab click the "Export" button to save the network activity log into a HAR file
  10. Stop the screen recording and save it into a file.
 
iOS/iPadOS (Safari browser)
  1. Enable Web Inspector on the iOS/iPadOS. Usually, this requires the following steps:
    1. Go to Settings
    2. Tap Safari
    3. Scroll down and select Advanced
    4. Switch Web Inspector to ON.
  2. Login into Core app in Safari browser on a iOS/iPadOS
  3. Open Web Inspector in Safari (Develop > iPhone/iPad > In Safary section select the instance name)
  4. In the Web Inspector window, open the "Network" tab and enable the "Preserve Log" option at the top of the tab
  5. In the Web Inspector window, open the "Console" tab and enable the "Preserve Log" option at the top of the tab
  6. Click on the bottom line of the Console tab next to the ">" icon so the flashing cursor appears
  7. Input the following command there and press "Enter": setOfscDebugModes(true, 'pluginApi')
  8. Refresh Core App page (Cmd+R)
  9. Start screen recording of the Core App window
  10. Try to reproduce issue
After issue reproduced:
  1. Open the "Console" tab of the Web Inspector.
  2. Scroll the contents of the Console, so we can see all messages
  3. Find the last "Init stage. Platform received "ready" method" and "Init stage. Platform received "initEnd" method" messages in a console log and expand them, so the contents of "postMessage" object is visible
  4. Find the last "Platform sent "open" method" message in a console log and expand it, so the contents of "postMessage" object is visible
  5. Find the last "Open stage. Platform received "close" method" message in a console log (in case it is available) and expand it, so the contents of "postMessage" object is visible
  6. Select all content of the Console by pressing Cmd+A
  7. Click the right mouse button on the Console tab contents, then click "Save Selected" to save the log into a file
  8. Open the "Network" tab of Web Inspector
  9. At the top of the "Network" tab click the "Export" button to save the network activity log into a HAR file
  10. Stop the screen recording and save it into a file.