Debug logs not displayed on unit test completion

Issue #1661 resolved
Scott Wells repo owner created an issue

Mike Wannamaker has been seeing an issue where the Apex debug logs aren't being displayed properly after unit test execution. I've been debugging this with him and now need to provide him a test build with some additional debug logging.

Comments (9)

  1. Scott Wells reporter

    Okay. Install this build:

    1. Download the archive (but don't extract it).
    2. Open Settings/Preferences>Plugins and under the gear drop-down menu, choose Install plugin from disk.
    3. Before restarting, open Help>Diagnostic Tools>Debug Log Settings and make sure that only the follow two entries are present/enabled, then restart:
    #com.illuminatedcloud.intellij.unittest.ApexUnitTestRunProcessHandler
    #com.illuminatedcloud.client.ForceComApiClient
    

    After the restart, reproduce the behavior and send me the resulting idea.log file(s) for review.

  2. Scott Wells reporter

    Okay, here's a build with a prospective fix for what we discussed earlier. It's not a 100% perfect fix...for that I'd need to us the org's authoritative namespace which isn't returned by force:org:list right now. However, it does address a gap in the logic I described that "joins" the information returned by force:org:list with that specified in the active project's sfdx-project.json. I'll be curious to hear how well it addresses this issue for you.

  3. Scott Wells reporter

    Mike, 2.1.2.9 includes all of the changes I've made and the additional diagnostic logging. I know we're still talking about what may be another aspect of it so I'm not resolving this just yet.

  4. Menachem Mendel Shanowitz

    Hi Scott,

    I encountered the same issue, but the attached zip link no longer works.

    Here are my logs (I removed a line or two that seemed confidential):

    2020-07-16 18:52:28,179 [ 35133] DEBUG - cloud.client.ForceComApiClient - Executing REST request:
    Method: POST
    URI: https://na111.salesforce.com/services/data/v48.0/tooling/runTestsSynchronous/
    Timeout: 900000
    2020-07-16 18:52:28,895 [ 35849] DEBUG - cloud.client.ForceComApiClient - REST response:
    Status code: 200
    Reason phrase: OK
    Headers: {
    Date='Thu, 16 Jul 2020 22:52:28 GMT'
    Strict-Transport-Security='max-age=31536000; includeSubDomains'
    includeSubDomains; report-uri="https://a.forcesslreports.com/hpkp-report/nullm";'
    X-Content-Type-Options='nosniff'
    X-XSS-Protection='1; mode=block'
    X-Robots-Tag='none'
    Cache-Control='no-cache,must-revalidate,max-age=0,no-store,private'
    Sforce-Limit-Info='api-usage=2291/15000'
    Content-Type='application/json;charset=UTF-8'
    Vary='Accept-Encoding'
    Transfer-Encoding='chunked'
    }
    2020-07-16 18:52:28,901 [ 35855] DEBUG - cloud.client.ForceComApiClient - Executing REST request:
    Method: GET
    URI: https://na111.salesforce.com/services/data/v48.0/tooling/sobjects/ApexLog/07L3h0000025W6TEAU/Body/
    Timeout: 300000
    2020-07-16 18:52:29,064 [ 36018] DEBUG - cloud.client.ForceComApiClient - REST response:
    Status code: 200
    Reason phrase: OK
    Headers: {
    Date='Thu, 16 Jul 2020 22:52:29 GMT'
    Strict-Transport-Security='max-age=31536000; includeSubDomains'
    includeSubDomains; report-uri="https://a.forcesslreports.com/hpkp-report/nullm";'
    X-Content-Type-Options='nosniff'
    X-XSS-Protection='1; mode=block'
    X-Robots-Tag='none'
    expires=Fri, 16-Jul-2021 22:52:29 GMT; Max-Age=31536000'
    Sforce-Limit-Info='api-usage=2293/15000'
    Content-Type='text/plain'
    Transfer-Encoding='chunked'
    }
    2020-07-16 18:52:29,095 [ 36049] DEBUG - .ApexUnitTestRunProcessHandler - Finishing test run.

  5. Scott Wells reporter

    Hi, Menachem. I'm glad you found a solution, but I'm not sure why having or not having a My Domain would come into play here. The original issue was around the org's namespace not being used properly in some cases. If you do see this behavior again, please let me know and I'd love to see before/after debug logs so I can see what's happening.

  6. Scott Wells reporter

    Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.

  7. Log in to comment