SFDX org JSON file being detected as constantly modified

Issue #2058 resolved
Scott Wells repo owner created an issue

This was reported directly by a user via email, but IC2's in-memory cache of CLI-based connection info is constantly being reported out stale for one specific connection. Both the filesystem-based last modified date and the computed checksum are updating every several seconds. I'm opening this as a way to track progress on that issue and to provide test builds as needed with additional diagnostic logging as we try to corner what's going on.

Comments (2)

  1. Scott Wells reporter

    Attaching a build that is the same as 2.2.0.9 but with additional trace-level logging to show the out-of-date file contents. You can install this build by downloading the attached archive (don't extract it) and installing it using Settings / Preferences > Plugins > Install plugin from disk (under the gear drop-down menu). Please make sure that you have the following in Help > Diagnostic Tools > Debug Log Settings:

    #com.illuminatedcloud.intellij.sfdx.SfdxUtil
    #com.illuminatedcloud.intellij.sfdx.SfdxUtil!trace
    

    Then reproduce the issue and in your idea.log file you'll see entries like:

    2022-03-02 13:55:18,603 [ 244458]  DEBUG - d.intellij.sfdx.SfdxUtil!trace - Checking the last modified timestamps of 38 SFDX config files. 
    2022-03-02 13:55:18,603 [ 244458]  DEBUG - d.intellij.sfdx.SfdxUtil!trace - The following files have been modified since Wed Mar 02 13:54:42 CST 2022: { <username>.json }. Comparing checksums. 
    2022-03-02 13:55:22,585 [ 248440]  DEBUG - d.intellij.sfdx.SfdxUtil!trace - Different checksum found for <username>.json: expected 332420305, actual 3014063924. File contents:
    ===========================================================
    {
      "username": "<username>",
      "accessToken": "<accessToken>",
      "instanceUrl": "<instanceUrl>",
      "orgId": "<orgId>",
      "loginUrl": "https://login.salesforce.com/",
      "refreshToken": "<refreshToken>",
      "clientId": "PlatformCLI",
      "instanceApiVersion": "54.0",
      "instanceApiVersionLastRetrieved": "3/2/2022, 11:40:17 AM",
      "isDevHub": false
    }
    
    ===========================================================
    
    2022-03-02 13:55:38,772 [ 264627]  DEBUG - d.intellij.sfdx.SfdxUtil!trace - The following modified files had different checksums: { <username>.json }. 
    

    I would like to see an extract that includes multiple entries like the above for the same file so I can see what changes have been made to the file contents over time. I understand that you may need to redact certain information, but if the redacted information is what is actually changing, e.g., the values for accessToken and/or refreshToken, please minimally include something like accessToken1, accessToken2, etc., (vs. accessToken for all values if unchanged) so that I know which information is changing.

    You can either attach these log extracts here or email them to support@illuminatedcloud.com.

  2. Log in to comment