Use the project/connection API version for SOAP/REST API calls to Salesforce

Issue #2519 open
yz created an issue

Updating the title to reflect the true nature of this issue. Salesforce has confirmed that Alicloud instances/orgs are not updated to the newest version at the same time as all other instances/orgs. As a result, when IC2 is updated to use the newest API version after a platform release has completed (aside from Alicloud), it will no longer work with the Alicloud instances/orgs due to an incompatible API version.

The most likely options to resolve this are:

  1. To have IC2 use the project/connection API version when making SOAP/REST API calls to Salesforce. The main issue with this would be if there were incompatible changes to the API requests/responses between those two adjacent versions, though in reality I haven’t seen such a breaking change in quite a while.
  2. Have users of Alicloud remain on the last released version of IC2 that used the previous API version for the period of time before those instances/orgs are updated to the latest version.

Given that this is the first time I’ve heard about this issue since I started IC2 in 2015, I’m inclined to go with option two above as it doesn’t introduce any risk to other IC2 users while providing a reasonable option for those affected by this issue during the short window of time that those instances/orgs are not yet upgraded.

ORIGINAL DESCRIPTION

Hello, when I was using the plugin, the test connection displayed as successful, but then an error occurred and the plugin could not be used properly. The following error message kept popping up

I am not using the domain name of Salesforce here. Salesforce has also been implemented in China, so I am using Salesforce deployed in China。

Here are some errors in idea.log:

2024-03-13 11:19:32,542 [63543980]   INFO - #c.i.o.p.u.AbstractProgressIndicatorBase - This progress indicator (Testing Connection Configuration 1978234686: running=true; canceled=false) is indeterminate, this may lead to visual inconsistency. Please call setIndeterminate(false) before you start progress. class com.intellij.openapi.progress.util.ProgressWindow
java.lang.IllegalStateException
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.setFraction(AbstractProgressIndicatorBase.java:197)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorExBase.setFraction(AbstractProgressIndicatorExBase.java:110)
    at com.intellij.openapi.progress.util.ProgressWindow.setFraction(ProgressWindow.java:320)
    at com.illuminatedcloud.intellij.plugin.settings.application.IlluminatedCloudApplicationConnectionsTab$19.run(SourceFile:1544)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:518)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
    at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)
2024-03-13 11:19:33,663 [63545101]   INFO - #c.i.o.p.u.AbstractProgressIndicatorBase - This progress indicator (Retrieving Organization Namespace 1008590692: running=true; canceled=false) is indeterminate, this may lead to visual inconsistency. Please call setIndeterminate(false) before you start progress. class com.intellij.openapi.progress.util.ProgressWindow
java.lang.IllegalStateException
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.setFraction(AbstractProgressIndicatorBase.java:197)
    at com.intellij.openapi.progress.util.AbstractProgressIndicatorExBase.setFraction(AbstractProgressIndicatorExBase.java:110)
    at com.intellij.openapi.progress.util.ProgressWindow.setFraction(ProgressWindow.java:320)
    at com.illuminatedcloud.intellij.plugin.settings.application.IlluminatedCloudApplicationConnectionsTab$20.run(SourceFile:1621)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:518)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
    at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)
2024-03-13 11:19:33,766 [63545204]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi
2024-03-13 11:19:34,320 [63545758]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.partner.SessionHeader took 18 ms.
2024-03-13 11:19:34,338 [63545776]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.partner.CallOptions took 18 ms.
2024-03-13 11:19:34,341 [63545779]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {http://soap.sforce.com/2006/04/metadata}MetadataService from class com.sforce.soap.metadata.MetadataApi
2024-03-13 11:19:34,622 [63546060]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.metadata.SessionHeader took 56 ms.
2024-03-13 11:19:34,673 [63546111]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.metadata.CallOptions took 49 ms.
2024-03-13 11:19:34,676 [63546114]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {urn:partner.soap.sforce.com}PartnerService from class com.sforce.soap.partner.PartnerApi
2024-03-13 11:19:34,691 [63546129]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {http://soap.sforce.com/2006/04/metadata}MetadataService from class com.sforce.soap.metadata.MetadataApi
2024-03-13 11:19:34,709 [63546147]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {http://soap.sforce.com/2006/08/apex}ApexService from class com.sforce.soap.apex.ApexApi
2024-03-13 11:19:34,745 [63546183]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.apex.SessionHeader took 5 ms.
2024-03-13 11:19:34,750 [63546188]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.apex.CallOptions took 5 ms.
2024-03-13 11:19:34,752 [63546190]   INFO - org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {urn:tooling.soap.sforce.com}ToolingService from class com.sforce.soap.tooling.ToolingApi
2024-03-13 11:19:34,970 [63546408]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.tooling.SessionHeader took 51 ms.
2024-03-13 11:19:35,013 [63546451]   INFO - #com.illuminatedcloud.intellij.client.ForceComApiClient - JAXB initialization for com.sforce.soap.tooling.CallOptions took 43 ms.
2024-03-13 11:19:35,456 [63546894]   WARN - #com.illuminatedcloud.intellij.util.IcExceptionUtil - org.apache.cxf.binding.soap.SoapFault: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL
javax.xml.ws.WebServiceException: org.apache.cxf.binding.soap.SoapFault: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL
    at org.apache.cxf.jaxws.JaxWsClientProxy.mapException(JaxWsClientProxy.java:193)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
    at jdk.proxy21/jdk.proxy21.$Proxy339.describeMetadata(Unknown Source)
    at com.illuminatedcloud.intellij.metadata.configCache.DescribeMetadataResultCache.lambda$computeValue$0(SourceFile:81)
    at com.illuminatedcloud.intellij.client.ForceComApiClient.runWithClient(SourceFile:327)
    at com.illuminatedcloud.intellij.client.ForceComApiClient.runWithClient(SourceFile:424)
    at com.illuminatedcloud.intellij.metadata.configCache.DescribeMetadataResultCache.computeValue(SourceFile:79)
    at com.illuminatedcloud.intellij.metadata.configCache.DescribeMetadataResultCache.computeValue(SourceFile:16)
    at com.illuminatedcloud.intellij.metadata.configCache.IlluminatedCloudConfigCacheManager.getOrPopulateCacheFileContents(SourceFile:210)
    at com.illuminatedcloud.intellij.metadata.configCache.IlluminatedCloudConfigCacheManager.getOrPopulateCacheFileContents(SourceFile:116)
    at com.illuminatedcloud.intellij.metadata.configCache.DescribeMetadataResultCache.getDescribeMetadataResult(SourceFile:32)
    at com.illuminatedcloud.intellij.plugin.settings.application.IlluminatedCloudApplicationConnectionsTab$20.run(SourceFile:1634)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$8(CoreProgressManager.java:518)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
    at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.apache.cxf.binding.soap.SoapFault: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:87)
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:53)
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:42)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112)
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:70)
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:35)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:831)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1697)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1571)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1371)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
    ... 33 more

Comments (10)

  1. Scott Wells repo owner
    • changed status to open

    Hi. That's very odd. IC is just calling the Metadata SOAP API describeMetadata with the connection's configured API version. Can you please confirm the API version for the selected connection, specifically that it is no greater than 60.0?

  2. yz reporter

    The Salesforce API version deployed within the China region is version 59, and I am using version 59 for configuration, but this error keeps popping up. Can this issue be due to the deployment of Salesforce in China? The domain names are also different. In China, the domain names that use Salesforce products are https://test-cnde--xxx.sandbox.my.sfcrmproducts.cn/

  3. Scott Wells repo owner

    Hi. I’m not aware of China instances being behind all other instances worldwide in terms of the allowed API version number. I’ll need to follow up with Salesforce to understand that behavior and the timing – if appropriate – for those instances to be upgraded. In the interim, you can downgrade the IC2 plugin to an earlier version that uses the API v59.0 endpoints, specifically this one:

    https://plugins.jetbrains.com/plugin/10253-illuminated-cloud-2/edit/versions/stable/485972

    and make sure that your connections are configured for API v59.0 as well.

    I’ll let you know what I hear from Salesforce. Let me know if the workaround described above doesn’t help.

  4. Scott Wells repo owner

    Hi. Can you please try 2.2.9.8 instead? That was the last version that had absolutely no updates for Sping ‘24 / API v60.0. If that doesn’t work for you, it’s not an API v60.0 issue.

    Note that I’ve also already heard back from Salesforce on this matter and they’re helping to investigate.

  5. Scott Wells repo owner

    Okay. If you’re seeing the same error with 2.2.9.8, it’s not an issue with API v60.0 as that release didn’t attempt to communicate with API v60.0 at all. Let’s see if we can get a log of the API call(s) that are resulting in this message so I can see more specifically what’s going on – and likely use that information to have a more in-depth chat with Salesforce about it.

    Return to the latest released version of the plugin, currently 2.3.0.2 and then please add the following to Help | Diagnostic Tools | Debug Log Settings:

    com.illuminatedcloud.intellij.client.ForceComApiClient
    com.illuminatedcloud.intellij.client.ForceComApiClient!trace
    

    Then restart the IDE completely (required to log SOAP calls), reproduce the error, and then open the file idea.log found using Help | Show Log in Explorer/Finder/Files. Toward the end of that log file you should see the raw SOAP and/or REST API requests and responses included in the log file. Note that these may contain sensitive information in the request/response payloads, so please remove that if necessary before sharing anything. I will, however, need to see as much detail as possible about those API interactions so I can try to understand these failures, so also try to keep them as intact as possible. If you’d prefer, you can email the resulting log to support@illuminatedcloud.com instead of attaching it here.

  6. Log in to comment