Class is created locally but not on Salesforce (no error message)

Issue #663 resolved
Fernando Machado created an issue

Sometimes classes are not deployed to Salesforce, but the plugin creates the class locally and asks to update the metadata subscription. I am able to reproduce it doing the following:

  1. Create a new Apex Trigger
  2. Create a new Apex Class with the exact same name as the Apex Trigger

For some reason the class does not get created on Salesforce on this scenario.

Here is what is showed in the log:

ApexTrigger MyClass [ADD]

2017-07-25 11:47:17,320 [7218801] INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 2017-07-25 11:47:44,056 [7245537] INFO - ontentsSynchronizationListener - The metadata subscription for module 'TestProject' was updated:

ApexClass MyClass [ADD]

2017-07-25 11:47:48,644 [7250125] INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 2017-07-25 11:47:49,885 [7251366] WARN - der.ForceComToolingApiDeployer - No component successes or failures found in deployment result. Processing based on request state. 2017-07-25 11:47:49,886 [7251367] WARN - der.ForceComToolingApiDeployer - Adding a component success for classes/MyClass.cls.

Comments (11)

  1. Scott Wells repo owner

    Fernando, is there any pattern to the classes for which this happens? Also, is there anything earlier in the log? If not, would you mind adding the following under Help>Debug Log Settings so that when it happens next time, we'll have very detailed logs?

    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    #com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer
    #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer
    

    That should show us exactly what all it's doing.

  2. Fernando Machado Account Deactivated reporter

    Hey Scott. Here's the log:

    2017-09-19 10:11:50,332 [68395494]   INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.illuminatedcloud.intellij.builder.ForceComBuilder, #com.illuminatedcloud.intellij.builder.ForceComMetadataApiDeployer, #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer 
    2017-09-19 10:12:38,472 [68443634]  DEBUG - tellij.builder.ForceComBuilder - Asked to build the following files for buildEventType=SAVE, bulkDeploy=false, forceDeploy=true: {file://C:/Users/xxx/IdeaProjects/xxx/src/triggers/trac_DemoTest.trigger}. 
    2017-09-19 10:12:38,472 [68443634]  DEBUG - tellij.builder.ForceComBuilder - Checking whether this is a single item static resource or Lightning bundle file deployment using the Tooling API. 
    2017-09-19 10:12:38,473 [68443635]  DEBUG - der.ForceComToolingApiDeployer - Deploying trac_DemoTest to XXX 
    2017-09-19 10:12:38,560 [68443722]  DEBUG - der.ForceComToolingApiDeployer - Using the tooling API to deploy the following files for module XXX: { trac_DemoTest.trigger }. 
    2017-09-19 10:12:38,560 [68443722]  DEBUG - der.ForceComToolingApiDeployer - Checking for conflicts. 
    2017-09-19 10:12:38,562 [68443724]  DEBUG - tellij.builder.ForceComBuilder - Listing metadata for the following types: ApexTrigger 
    2017-09-19 10:12:39,278 [68444440]  DEBUG - tellij.builder.ForceComBuilder - Comparing local to server timestamps for triggers/trac_DemoTest.trigger: 
    2017-09-19 10:12:39,278 [68444440]  DEBUG - tellij.builder.ForceComBuilder -   lastDeployedDate       = null 
    2017-09-19 10:12:39,278 [68444440]  DEBUG - tellij.builder.ForceComBuilder -   serverLastModifiedDate = null 
    2017-09-19 10:12:39,316 [68444478]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Tue Sep 19 10:12:38 PDT 2017 (raw) 
    2017-09-19 10:12:39,317 [68444479]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Tue Sep 19 10:12:38 PDT 2017 (adjusted) 
    2017-09-19 10:12:39,317 [68444479]  DEBUG - tellij.builder.ForceComBuilder - Local file not on server: triggers/trac_DemoTest.trigger 
    2017-09-19 10:12:39,317 [68444479]  DEBUG - der.ForceComToolingApiDeployer - Creating any missing metadata before saving with the Tooling API. 
    2017-09-19 10:12:39,755 [68444917]  DEBUG - der.ForceComToolingApiDeployer - Using the tooling API to create the following missing metadata for module XXX: trac_DemoTest.trigger. 
    2017-09-19 10:12:39,755 [68444917]  DEBUG - der.ForceComToolingApiDeployer - Deploying trac_DemoTest to XXX 
    2017-09-19 10:12:39,782 [68444944]   INFO - der.ForceComToolingApiDeployer - Using the tooling API to create ApexTrigger trac_DemoTest. 
    2017-09-19 10:12:39,796 [68444958]  DEBUG - der.ForceComToolingApiDeployer - Sending REST request body to https://xxx.my.salesforce.com/services/data/v40.0/tooling/sobjects/ApexTrigger:
    {"body":"/**\n * Created by fmachado on 2017-09-19.\n */\n\ntrigger trac_DemoTest on Asset (before insert, before update) {\n\n}","name":"trac_DemoTest","tableEnumOrId":"Asset"} 
    2017-09-19 10:12:40,589 [68445751]   INFO - ontentsSynchronizationListener - The metadata subscription for module 'XXX' was updated:
    
    ApexTrigger
    ՠtrac_DemoTest [ADD]
    
    2017-09-19 10:12:40,695 [68445857]  DEBUG - der.ForceComToolingApiDeployer - Received expected status code 201. 
    2017-09-19 10:12:40,695 [68445857]  DEBUG - der.ForceComToolingApiDeployer - Received creation response:
    {"id":"01qg0000000A0FgAAK","success":true,"errors":[],"warnings":[]} 
    2017-09-19 10:12:40,695 [68445857]  DEBUG - der.ForceComToolingApiDeployer - Deployed trac_DemoTest in 940 ms. 
    2017-09-19 10:12:40,702 [68445864]  DEBUG - der.ForceComToolingApiDeployer - Looking for an existing metadata container with name IC-XXX. 
    2017-09-19 10:12:40,792 [68445954]  DEBUG - der.ForceComToolingApiDeployer - Found one. Deleting it. 
    2017-09-19 10:12:40,933 [68446095]  DEBUG - der.ForceComToolingApiDeployer - Creating a new metadata container with name IC-XXX 
    2017-09-19 10:12:41,046 [68446208]  DEBUG - der.ForceComToolingApiDeployer - Populating the metadata container. 
    2017-09-19 10:12:41,047 [68446209]  DEBUG - der.ForceComToolingApiDeployer -   Adding Apex trigger trac_DemoTest 
    2017-09-19 10:12:41,155 [68446317]  DEBUG - der.ForceComToolingApiDeployer - Adding members to the metadata container. 
    2017-09-19 10:12:41,402 [68446564]  DEBUG - der.ForceComToolingApiDeployer - Creating a container async request for metadata container 1dcg0000001C0AJAA0 with checkOnly = false. 
    2017-09-19 10:12:41,561 [68446723]   INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 
    2017-09-19 10:12:41,561 [68446723]  DEBUG - der.ForceComToolingApiDeployer - Polling the status of the ContainerAsyncRequest. 
    2017-09-19 10:12:41,646 [68446808]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest is still processing. Waiting 1000 milliseconds and trying again. 
    2017-09-19 10:12:42,647 [68447809]  DEBUG - der.ForceComToolingApiDeployer - Polling the status of the ContainerAsyncRequest. 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest is complete. 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer - Compiled all metadata container members in 1357 ms. 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest state = COMPLETED 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer - Processing deployment result. 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer -   Successfully deployed 1 components. 
    2017-09-19 10:12:42,758 [68447920]  DEBUG - der.ForceComToolingApiDeployer -   Processing triggers/trac_DemoTest.trigger. 
    2017-09-19 10:12:42,759 [68447921]  DEBUG - der.ForceComToolingApiDeployer -   Setting the build success date for triggers/trac_DemoTest.trigger to Tue Sep 19 10:12:42 PDT 2017 
    2017-09-19 10:12:42,759 [68447921]  DEBUG - der.ForceComToolingApiDeployer -   Successfully deployed triggers/trac_DemoTest.trigger 
    2017-09-19 10:13:07,128 [68472290]  DEBUG - tellij.builder.ForceComBuilder - Asked to build the following files for buildEventType=SAVE, bulkDeploy=false, forceDeploy=true: {file://C:/Users/fmachado/IdeaProjects/XXX/src/classes/trac_DemoTest.cls}. 
    2017-09-19 10:13:07,128 [68472290]  DEBUG - tellij.builder.ForceComBuilder - Checking whether this is a single item static resource or Lightning bundle file deployment using the Tooling API. 
    2017-09-19 10:13:07,128 [68472290]  DEBUG - der.ForceComToolingApiDeployer - Deploying trac_DemoTest to XXX 
    2017-09-19 10:13:07,156 [68472318]  DEBUG - der.ForceComToolingApiDeployer - Using the tooling API to deploy the following files for module XXX: { trac_DemoTest.cls }. 
    2017-09-19 10:13:07,156 [68472318]  DEBUG - der.ForceComToolingApiDeployer - Checking for conflicts. 
    2017-09-19 10:13:07,156 [68472318]  DEBUG - tellij.builder.ForceComBuilder - Listing metadata for the following types: ApexClass 
    2017-09-19 10:13:08,394 [68473556]   INFO - ontentsSynchronizationListener - The metadata subscription for module 'XXX' was updated:
    
    ApexClass
    ՠtrac_DemoTest [ADD]
    
    2017-09-19 10:13:18,916 [68484078]  DEBUG - tellij.builder.ForceComBuilder - Comparing local to server timestamps for classes/trac_DemoTest.cls: 
    2017-09-19 10:13:18,916 [68484078]  DEBUG - tellij.builder.ForceComBuilder -   lastDeployedDate       = null 
    2017-09-19 10:13:18,916 [68484078]  DEBUG - tellij.builder.ForceComBuilder -   serverLastModifiedDate = null 
    2017-09-19 10:13:18,917 [68484079]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Tue Sep 19 10:13:06 PDT 2017 (raw) 
    2017-09-19 10:13:18,917 [68484079]  DEBUG - tellij.builder.ForceComBuilder -   localLastModifiedDate  = Tue Sep 19 10:13:06 PDT 2017 (adjusted) 
    2017-09-19 10:13:18,917 [68484079]  DEBUG - tellij.builder.ForceComBuilder - Local file not on server: classes/trac_DemoTest.cls 
    2017-09-19 10:13:18,917 [68484079]  DEBUG - der.ForceComToolingApiDeployer - Creating any missing metadata before saving with the Tooling API. 
    2017-09-19 10:13:19,332 [68484494]  DEBUG - der.ForceComToolingApiDeployer - Looking for an existing metadata container with name IC-XXX. 
    2017-09-19 10:13:19,428 [68484590]  DEBUG - der.ForceComToolingApiDeployer - Found one. Deleting it. 
    2017-09-19 10:13:19,560 [68484722]  DEBUG - der.ForceComToolingApiDeployer - Creating a new metadata container with name IC-XXX 
    2017-09-19 10:13:19,656 [68484818]  DEBUG - der.ForceComToolingApiDeployer - Populating the metadata container. 
    2017-09-19 10:13:19,656 [68484818]  DEBUG - der.ForceComToolingApiDeployer -   Adding Apex class trac_DemoTest 
    2017-09-19 10:13:19,763 [68484925]  DEBUG - der.ForceComToolingApiDeployer - Creating a container async request for metadata container 1dcg0000001C0AdAAK with checkOnly = false. 
    2017-09-19 10:13:19,920 [68485082]   INFO - der.ForceComToolingApiDeployer - Starting deployment with a polling interval of 1000 milliseconds. 
    2017-09-19 10:13:19,920 [68485082]  DEBUG - der.ForceComToolingApiDeployer - Polling the status of the ContainerAsyncRequest. 
    2017-09-19 10:13:20,005 [68485167]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest is still processing. Waiting 1000 milliseconds and trying again. 
    2017-09-19 10:13:21,006 [68486168]  DEBUG - der.ForceComToolingApiDeployer - Polling the status of the ContainerAsyncRequest. 
    2017-09-19 10:13:21,088 [68486250]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest is complete. 
    2017-09-19 10:13:21,088 [68486250]  DEBUG - der.ForceComToolingApiDeployer - Compiled all metadata container members in 1325 ms. 
    2017-09-19 10:13:21,088 [68486250]  DEBUG - der.ForceComToolingApiDeployer - ContainerAsyncRequest state = COMPLETED 
    2017-09-19 10:13:21,088 [68486250]  DEBUG - der.ForceComToolingApiDeployer - Processing deployment result. 
    2017-09-19 10:13:21,088 [68486250]   WARN - der.ForceComToolingApiDeployer - No component successes or failures found in deployment result. Processing based on request state. 
    2017-09-19 10:13:21,089 [68486251]   WARN - der.ForceComToolingApiDeployer -   Adding a component success for classes/trac_DemoTest.cls. 
    2017-09-19 10:13:21,089 [68486251]  DEBUG - der.ForceComToolingApiDeployer -   Successfully deployed 1 components. 
    2017-09-19 10:13:21,089 [68486251]  DEBUG - der.ForceComToolingApiDeployer -   Processing classes/trac_DemoTest.cls. 
    2017-09-19 10:13:21,089 [68486251]  DEBUG - der.ForceComToolingApiDeployer -   Setting the build success date for classes/trac_DemoTest.cls to Tue Sep 19 10:13:21 PDT 2017 
    2017-09-19 10:13:21,090 [68486252]  DEBUG - der.ForceComToolingApiDeployer -   Successfully deployed classes/trac_DemoTest.cls 
    2017-09-19 10:13:38,575 [68503737]   INFO - ide.actions.ShowFilePathAction - 
    Exit code 1 
    

    To replicate it: 1) Create a trigger called trac_DemoTest 2) Create a class with the same name as the trigger: trac_DemoTest

    Results: Trigger is created, but the class is not. The IDE shows the class as created, but if you log in the org, you can see that the class is not there.

  3. Scott Wells repo owner

    Okay, my guess is that there's some issue with the class being deployed and the Tooling API isn't reporting it on failure (or perhaps IC itself isn't reporting the failure coming back from the Tooling API). Let's try this...under Build>Illuminated Cloud>Configure Application in the Validation and Deployment tab, uncheck Prefer Tooling API for>Apex and try to create the class again. Let's see if that behaves differently. Hopefully it'll report a compilation error. If it does then that confirms that I have a bug during creation deployment of an Apex class that has errors.

  4. Fernando Machado Account Deactivated reporter

    Hmmm, it works with that unchecked. Tried 3 times. Should I keep that unchecked to prevent errors? Here's the log:

    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer - Creating a deployment archive. 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -   Processing file trac_DemoTest3.cls 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -     Metadata type = ApexClass 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -     File should be deployed. 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -     Found companion meta.xml file: trac_DemoTest3.cls-meta.xml 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -   Adding files to the archive: 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -     trac_DemoTest3.cls 
    2017-09-19 10:52:07,166 [70812328]  DEBUG - er.ForceComMetadataApiDeployer -     trac_DemoTest3.cls-meta.xml 
    2017-09-19 10:52:09,283 [70814445]  DEBUG - er.ForceComMetadataApiDeployer -   Using the following package.xml for deployment: 
    2017-09-19 10:52:09,283 [70814445]  DEBUG - er.ForceComMetadataApiDeployer - <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Package xmlns="http://soap.sforce.com/2006/04/metadata">
        <types>
            <members>*</members>
            <name>ApexClass</name>
        </types>
        <types>
            <members>*</members>
            <name>AuraDefinitionBundle</name>
        </types>
        <types>
            <members>*</members>
            <name>ApexComponent</name>
        </types>
        <types>
            <members>*</members>
            <name>ApexTrigger</name>
        </types>
        <types>
            <members>*</members>
            <name>StaticResource</name>
        </types>
        <types>
            <members>*</members>
            <name>ApexPage</name>
        </types>
        <version>40.0</version>
    </Package>
    
    2017-09-19 10:52:09,283 [70814445]  DEBUG - er.ForceComMetadataApiDeployer - Submitting a deployment request with rollbackOnError = false; checkOnly = false 
    2017-09-19 10:52:09,555 [70814717]  DEBUG - er.ForceComMetadataApiDeployer - Submitted with ID = 0Afg000000tKtFfCAK 
    2017-09-19 10:52:09,555 [70814717]   INFO - er.ForceComMetadataApiDeployer - Starting deployment with a polling interval of 2000 milliseconds. 
    2017-09-19 10:52:09,555 [70814717]  DEBUG - er.ForceComMetadataApiDeployer - Polling the status of the deployment. 
    2017-09-19 10:52:09,650 [70814812]  DEBUG - er.ForceComMetadataApiDeployer - Deployment is still processing. Waiting 2000 milliseconds and trying again. 
    2017-09-19 10:52:11,650 [70816812]  DEBUG - er.ForceComMetadataApiDeployer - Polling the status of the deployment. 
    2017-09-19 10:52:11,734 [70816896]  DEBUG - er.ForceComMetadataApiDeployer - Deployment is still processing. Waiting 2000 milliseconds and trying again. 
    2017-09-19 10:52:13,734 [70818896]  DEBUG - er.ForceComMetadataApiDeployer - Polling the status of the deployment. 
    2017-09-19 10:52:13,834 [70818996]  DEBUG - er.ForceComMetadataApiDeployer - Deployment is still processing. Waiting 2000 milliseconds and trying again. 
    2017-09-19 10:52:15,835 [70820997]  DEBUG - er.ForceComMetadataApiDeployer - Polling the status of the deployment. 
    2017-09-19 10:52:15,913 [70821075]  DEBUG - er.ForceComMetadataApiDeployer - Deployment is still processing. Waiting 2000 milliseconds and trying again. 
    2017-09-19 10:52:17,914 [70823076]  DEBUG - er.ForceComMetadataApiDeployer - Polling the status of the deployment. 
    2017-09-19 10:52:18,194 [70823356]  DEBUG - er.ForceComMetadataApiDeployer - Processing the deployment result:
    {
      "checkOnly": false,
      "completedDate": {
        "orig_year": 2017,
        "orig_month": 9,
        "orig_day": 19,
        "orig_hour": 17,
        "orig_minute": 52,
        "orig_second": 15,
        "orig_fracSeconds": 0.000,
        "orig_timezone": 0,
        "year": 2017,
        "month": 9,
        "day": 19,
        "timezone": 0,
        "hour": 17,
        "minute": 52,
        "second": 15,
        "fractionalSecond": 0.000
      },
      "createdBy": "005g0000004dQcB",
      "createdByName": "Fernado Machado",
      "createdDate": {
        "orig_year": 2017,
        "orig_month": 9,
        "orig_day": 19,
        "orig_hour": 17,
        "orig_minute": 52,
        "orig_second": 9,
        "orig_fracSeconds": 0.000,
        "orig_timezone": 0,
        "year": 2017,
        "month": 9,
        "day": 19,
        "timezone": 0,
        "hour": 17,
        "minute": 52,
        "second": 9,
        "fractionalSecond": 0.000
      },
      "details": {
        "componentSuccesses": [
          {
            "changed": true,
            "componentType": "",
            "created": false,
            "createdDate": {
              "orig_year": 2017,
              "orig_month": 9,
              "orig_day": 19,
              "orig_hour": 17,
              "orig_minute": 52,
              "orig_second": 15,
              "orig_fracSeconds": 0.000,
              "orig_timezone": 0,
              "year": 2017,
              "month": 9,
              "day": 19,
              "timezone": 0,
              "hour": 17,
              "minute": 52,
              "second": 15,
              "fractionalSecond": 0.000
            },
            "deleted": false,
            "fileName": "package.xml",
            "fullName": "package.xml",
            "success": true
          },
          {
            "changed": true,
            "componentType": "ApexClass",
            "created": true,
            "createdDate": {
              "orig_year": 2017,
              "orig_month": 9,
              "orig_day": 19,
              "orig_hour": 17,
              "orig_minute": 52,
              "orig_second": 15,
              "orig_fracSeconds": 0.000,
              "orig_timezone": 0,
              "year": 2017,
              "month": 9,
              "day": 19,
              "timezone": 0,
              "hour": 17,
              "minute": 52,
              "second": 15,
              "fractionalSecond": 0.000
            },
            "deleted": false,
            "fileName": "classes/trac_DemoTest3.cls",
            "fullName": "trac_DemoTest3",
            "id": "01pg0000000hEM8AAM",
            "success": true
          }
        ],
        "runTestResult": {
          "numFailures": 0,
          "numTestsRun": 0,
          "totalTime": 0.0
        }
      },
      "done": true,
      "id": "0Afg000000tKtFfCAK",
      "ignoreWarnings": false,
      "lastModifiedDate": {
        "orig_year": 2017,
        "orig_month": 9,
        "orig_day": 19,
        "orig_hour": 17,
        "orig_minute": 52,
        "orig_second": 15,
        "orig_fracSeconds": 0.000,
        "orig_timezone": 0,
        "year": 2017,
        "month": 9,
        "day": 19,
        "timezone": 0,
        "hour": 17,
        "minute": 52,
        "second": 15,
        "fractionalSecond": 0.000
      },
      "numberComponentErrors": 0,
      "numberComponentsDeployed": 1,
      "numberComponentsTotal": 1,
      "numberTestErrors": 0,
      "numberTestsCompleted": 0,
      "numberTestsTotal": 0,
      "rollbackOnError": false,
      "runTestsEnabled": false,
      "startDate": {
        "orig_year": 2017,
        "orig_month": 9,
        "orig_day": 19,
        "orig_hour": 17,
        "orig_minute": 52,
        "orig_second": 14,
        "orig_fracSeconds": 0.000,
        "orig_timezone": 0,
        "year": 2017,
        "month": 9,
        "day": 19,
        "timezone": 0,
        "hour": 17,
        "minute": 52,
        "second": 14,
        "fractionalSecond": 0.000
      },
      "status": "SUCCEEDED",
      "success": true
    } 
    2017-09-19 10:52:18,194 [70823356]   INFO - er.ForceComMetadataApiDeployer - Deployment status = SUCCEEDED 
    2017-09-19 10:52:18,194 [70823356]  DEBUG - er.ForceComMetadataApiDeployer - Processing 2 component successes. 
    2017-09-19 10:52:18,194 [70823356]  DEBUG - er.ForceComMetadataApiDeployer -   Successfully deployed package.xml 
    2017-09-19 10:52:18,194 [70823356]  DEBUG - er.ForceComMetadataApiDeployer -   Successfully deployed classes/trac_DemoTest3.cls 
    
  5. Scott Wells repo owner

    Okay, so what you've found is another example of something that exhibits different behavior in the Tooling API vs. the Metadata API. I've seen a handful of these over time. I wouldn't recommend leaving that unchecked all the time, though. The Tooling API is WAY faster than the Metadata API most of the time because it's explicitly designed for tooling/IDE-oriented usage patterns. What I would do is just know that it may occasionally be necessary to switch over if you see weird behavior like this. It's far from an ideal answer, but if it makes you feel any better, I have to work in that mode from time-to-time myself for the exact same reason...different underlying manifestations of differences between the two APIs, but ultimately it comes down to false negatives from the Tooling API.

    If you can find a consistently reproducible standalone case of it happening, please send it my way and I'll use it to work with Salesforce on the root cause of the issue. There have been at least two instances in the past where we've been able to do that and the core API issues were resolved in the next seasonal release. Even if Salesforce can't/won't fix it, sometimes I can "detect" the bad state and either let the user know or work around it within IC.

  6. Scott Wells repo owner

    I'm going to resolve this for now as it's unfortunately out of my control for the most part. If you do come up with a way to reproduce it in isolation, please reopen and attach the details so that I can see whether there's anything better I can do to address the issue.

  7. Log in to comment