Email Feature Of Insights Is Not Working

How to troubleshoot the Insights Email feature.

Issue Description: Email in Insights is not working. This article covers how to debug email issues and identify the underlying issue.

Root Cause: Email issues are typically caused by misconfigurations. The service that handles emails is the Sisense.Galaxy service. The logs for it are located at C:\ProgramData\Sisense\application-logs\galaxy

Investigation Steps:

  1. Verify if Emails have been enabled for Insights. This can be done at installation time or by modifying the installation post installation. See the UiPath Installation guide for the pre-requisites .
    • Note: If enable SMTP on port 25, Ignore TLS should be set, and no username and password should be set. SMTP on port 25 requires no authentication and no encryption. Emails wont work if these are set.
    • If this has already been done, with these options, go to the section: Remove Encryption SMTP Settings
  2. Next make sure all services are running
  3. Once it is confirmed that email is setup, try sending a test email
    • Login to Orchestrator as a user who has access to Insights
      • The super admin account can also be used by logging in at https:///app/account/
      • If already logged into Orchestrator, this will need to be done via a private window or different browser
      • The login credentials were defined at installation time.
    • Once logged into Orchestrator (or logged in as the super admin) go to https:///app/main
    • Choose a dashboard and click it
    • On the upper right side is a share icon
      • image.png
    • Select the Icon and then the Email icon
      • image.png
    • At the bottom left, is a link that says "Send me a report now" - Click it to send a report and make a not of the time.
  4. After sending an email, check the Galaxy the galaxy logs
    • C:\ProgramData\Sisense\application-logs\galaxy\galaxy.log
    • If the galaxy logs are empty, the service might need to be reloaded.
      • Go to Services.msc and restart the Sisense.Galaxy service.
    • Open the file and search for '[ERROR]'
      • Make sure that the error occurred around the time of the test
  5. Evaluate the error message
    • For Email configuration issues, the key word to search for is 'mailSender-v1'
    • For example, the following error might be encountered:
      • [ERROR] [] [galaxy] [988]:[mailSender-v1] [C:\Program Files\Sisense\app\galaxy-service\src\features\emails\v1\mailSender.js:103] [] [Error sending mail: {"code":"EENVELOPE","response":"530 5.7.0 Must issue a STARTTLS command first. a3sm532361qkh.67 - gsmtp","responseCode":530,"command":"MAIL FROM"}]
    • In this case, Insights was configured to connect to smtp.gmail.com on port 25, however, gmail wont allow this because it wants any connection to be encrypted.
  6. Common errors
    • 530 5.7.0 Must issue a STARTTLS command first. - Go to section Remove Encryption SMTP Settings and complete step 2 and then set. What this error means is that Insights expecting the server to support encryption but the server does not support encryption.
    • {"code":"ESOCKET","command":"CONN"} - See the section ESOCKET Error.
    • ENOTFOUND - Means the SMTP server domain name could not be resolved. In this case open a command prompt and run: nslookup . If this does not resolve to an IP address, let your network team know a DNS entry needs to be added. As a work around, reconfigure the SMTP server using an IP address
    • EAUTH - Means that authentication failed. Most likely the wrong password is being used.
    • [ERROR] [] [galaxy] [29268]:[executePhantomJS] [C:\Program Files\Sisense\app\galaxy-service\src\features\reporting\dashboard.js:206] [] [Failed to do report: Error loading 1 or more plugins: Failed to load resource: http://127.0.0.1:14991/app/reporting
      ] - Go to the section Reset Plugins

Reset Plugins

  • Login as the insights admin: https://insightsURL/app/account - You need to logout of Orchestrator when doing this (or just use aa browser where you are not logged into Orchestrator)
  • Go to https://insightsURL/app/settings
    • Go to the Add-ons under System Configuration
    • Disable every add-on. Then re-enable them all.
  • Try to send an email again. If the email fails, capture the galaxy logs and send them to UiPath Support.


Remove Encryption SMTP Settings

    • If previously, the SMTP configuration was done and a password was provided, the email settings need to first be deleted.
      • Go to the following URL: https://insightsURL/app/account/login
      • Login using the admin credentials that were defined during the initial installation
      • After logging in, go to https://insightsURL/app/dev/api/docs/#/. The browser will be taken to the swagger Rest API for insights.
      • Click the 'Settings' header and navigate to the header in the 'Settings' section that says, 'DELETE /settings/email_server'
      • Click on the heading and then select 'Try it out' (It should be on the line that says 'Parameters'
      • After clicking 'Try it out', click the 'Execute' button. If successful, this will return a 204.
    • After the above steps are done, modify the SMTP settings but make sure 'Ignore TLS' is set, and no username and password should be set. SMTP on port 25 requires no authentication and no encryption. Emails wont work if these are set.

    ESOCKET Error

    1. This is a connection error. It could be a general connection problem or it could be caused by the SMTP server.
    2. Try sending a test email using powershell from the Insights server. Make sure to use the same configuration as specified for the application. Read Send - MailMessage .
      1. For port 25 (no authentication): Send-MailMessage -From 'User01 ' -To 'User02 ' -Subject 'Test mail' -SmtpServer
      2. With authentication:
        1. $Credentials = New-Object System.Net.NetworkCredential(, )
        2. Send-MailMessage -From 'User01 ' -To 'User02 ' -Subject 'Test mail' -SmtpServer -Port -Credential $Credentials
    3. If sending an email with powershell does not work, it will not work from within Insights. At this point involve your network team or your smtp server admin.
    4. If sending an email works, share the SMTP powershell command that worked with the UiPath support team and also share a screenshot of the SMTP configuration specified in the Insights installer (accessed via Add/Remove Programs->Insights Installer->Modify)
    5. Additionally, if possible send a wireshark trace. See section below "Generating Wireshark Trace"
      1. If using SMTP with no authentication, the mail library will expect that there is no STARTTLS command in the Server Hello. If the STARTTLS command is included, the library will try to use TLS authentication. Talk to the mail server admin to see if this can be disabled, or use SMTP with authentication.

    Generating Wireshark Trace

    1. Download Wireshark
    2. Open up Wireshark and select the correct interface (usually Ethernet 1)
    3. Click the 'Start' button to start the trace
    4. In the search menu type in 'SMTP'
    5. Try sending a test email from Insights. This should generate SMTP traffic
    6. Click 'STOP'
    7. Go to File->Save As and save the trace
    8. Send the logs to UiPath Support if needed.
    1 Like