- changed title to New Classes not being deployed
New Classes not being deployed
When trying to Deploy on save new Apex classes, they are not deployed.
Event log:
17:38 Illuminated Cloud
The metadata subscription for module 'Full Copy' was updated:
ApexClass
• TestClass [ADD]
17:38 Deployment Complete: Deployed 0/0 components to Full Copy in 23 s 766 ms with status SUCCEEDED.
idea.log
2019-12-05 17:42:11,772 [1990264] INFO - ontentsSynchronizationListener - The metadata subscription for module 'Full Copy' was updated:
ApexClass
• TestClass [ADD]
2019-12-05 17:42:20,568 [1999060] INFO - ij.builder.ForceComBuilderUtil - Enumerated metadata for connection Full Copy in 8 s 755 ms.
2019-12-05 17:42:21,790 [2000282] INFO - der.ForceComToolingApiDeployer - Some metadata must be created. Using the Metadata API for this deployment.
2019-12-05 17:42:27,305 [2005797] INFO - ij.builder.ForceComBuilderUtil - Enumerated metadata for connection Full Copy in 5 s 503 ms.
2019-12-05 17:42:29,204 [2007696] INFO - er.ForceComMetadataApiDeployer - Deployment status = SUCCEEDED
2019-12-05 17:42:31,708 [2010200] INFO - rationStore.ComponentStoreImpl - Saving Module: 'Full Copy'FacetManager took 89 ms
2019-12-05 17:42:31,781 [2010273] INFO - rationStore.ComponentStoreImpl - Saving Project (name=Full Copy, containerState=ACTIVE, componentStore=/home/ruiter/projects/salesforce/Full Copy) IlluminatedCloudWorkspaceSettings took 45 ms
2019-12-05 17:42:32,690 [2011182] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 1127 ms
Comments (18)
-
reporter -
repo owner Can you please enable debug logging for metadata deployment, reproduce this issue, and post the resulting
idea.log
(Help>Show Log in Finder/Explorer/Files)? -
Hello, I think I have the same problem.
I create new apex class, select it, click deploy all metadata, class appeared in deploy modal window, i push Deploy.
after that I receive message
8:53 PM Deployment Complete: Deployed 0/0 components to overmes@empathetic-moose-svfnww.com in 1 s 614 ms with status SUCCEEDED.
I’m using Pycharm
PyCharm 2020.1.1 (Professional Edition) Build #PY-201.7223.92, built on April 30, 2020 Licensed to Artem Bezukladichnyi Subscription is active until November 10, 2020 Runtime version: 11.0.6+8-b765.40 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.4.0-31-generic GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Non-Bundled Plugins: AceJump, PlantUML integration, TabSwitch, NodeJS, com.illuminatedcloud2.intellij, com.jetbrains.intellij.datalore, net.ashald.envfile, org.toml.lang, org.rust.lang Current Desktop: KDE
Here is logs from .idea
By the way, it is amaysing plugin.
-
repo owner Hi, Artem. Can you verify that you're creating the class under a configured source root?
-
Hello @Scott.
Sorry what is
configured source root
? I added it to git and marked force-app as Source in project structure in IDE.I think I found. Was it about this:
I updated OfflineTables + pushed update on this page and now I can see my class there, but still can not deploy.
Actually it is a project from traillhead.
https://github.com/dreamhouseapp/dreamhouse-sfdx.git
but i have same problem in my production project. Currently I just deploy all through sfdx command line tool, and then I can change and deploy it in IDE.
I cleaned up project and tried to redeploy with the same steps.
Logs: https://pastebin.com/irLq1YwD
Class name is
SomeCls
.Plugin version
2.1.2.2
-
@Scott Wells Hello. Can any other additional data help?
-
repo owner Hi. So sorry for the delayed response. Based on the provided log it does appear that something is misconfigured. Can you also provide you project's
.iml
file for review? I think it's likely just a matter of getting the content and source roots right. -
I am also encountering this issue. I can deploy modified classes but cannot deploy new ones. I agree this is likely an issue with my own config so I will wait for Artem’s response.
My current workaround is to create new Apex classes in Developer Console and then actually do development in IC.
-
repo owner Artem and Hing, just so I understand, the following steps would reproduce this for you, correct?
- Right-click on the
classes
folder and select New>Apex Class. - Provide a class name and click OK.
- Potentially accept prompts about adding to the metadata subscription, version control, etc.
- The new class is not deployed, nor does Ctrl+S/Cmd+S deploy it.
Is that correct? If so I'm not reproducing it so hopefully it is a configuration issue. Hing, I'm happy to look at your
.iml
file as well if you'd like. - Right-click on the
-
I actually managed to fix this problem by wiping everything, recloning the project from git and recreating a new project in Intellij.
As far as I can recall, the repro steps as you describe are correct. Unfortunately, I do not have a .iml file to provide you.
I appreciate your responsiveness!
-
repo owner Okay, my guess is that it was a source root configuration problem in the original project. If you do see this again, please let me know and we can verify that.
-
repo owner Hi, Artem. Just following up. Is this problem still happening for you? If so, can you please attach your
.iml
file for review? -
Sorry for late response, last few weeks was tough. @Scott Wells
I think i found problem. Because I switched from vscode, i just opened project in Pycharm. This time i tried to do same, but i opened project through
new project
and choose illuminated cloud template. I have deployed class successfully.Is it this file?
<?xml version="1.0" encoding="UTF-8"?> <module type="IlluminatedCloud" version="4"> <component name="FacetManager"> <facet type="IlluminatedCloud" name="Illuminated Cloud"> <configuration> <option name="connectionName" value="overmes@empathetic-moose-svfnww.com" /> <option name="connectionType" value="MDAPI" /> <option name="defaultSourceRootUrl" value="file://$MODULE_DIR$/force-app" /> <option name="moduleContents"> <ModuleContents> <option name="contentSelectionType" value="SELECTED" /> <option name="manifest"> <Manifest> <option name="types"> <set> <MetadataType> <option name="entries"> <list> <MetadataEntry> <option name="name" value="SomeCls" /> <option name="selected" value="true" /> </MetadataEntry> </list> </option> <option name="name" value="ApexClass" /> <option name="wildcard" value="false" /> </MetadataType> <MetadataType> <option name="entries"> <list> <MetadataEntry> <option name="name" value="README" /> <option name="selected" value="true" /> </MetadataEntry> </list> </option> <option name="name" value="CustomMetadata" /> <option name="wildcard" value="false" /> </MetadataType> <MetadataType> <option name="entries"> <list> <MetadataEntry> <option name="name" value="illuminatedCloud" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="misc" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="modules" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="profiles_settings" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="vcs" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="workspace" /> <option name="selected" value="true" /> </MetadataEntry> </list> </option> <option name="name" value="EmailServicesFunction" /> <option name="wildcard" value="false" /> </MetadataType> </set> </option> </Manifest> </option> </ModuleContents> </option> </configuration> </facet> </component> <component name="NewModuleRootManager"> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/force-app" isTestSource="false" /> <excludeFolder url="file://$MODULE_DIR$/.sfdx/typings" /> </content> <orderEntry type="jdk" jdkName="IlluminatedCloud (dreamhouse-sfdx/overmes@empathetic-moose-svfnww.com)" jdkType="IlluminatedCloud" /> <orderEntry type="sourceFolder" forTests="false" /> </component> </module>
-
repo owner Hi. Yes, that's the file, and I can see the issue from it. Notice that your metadata entries for
EmailServicesFunction
are the project's root folders and not the metadata type folders such asclasses
,triggers
, etc. That's because you have the entire project set as a source root:<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
Please remove that and update your metadata subscription to include only metadata type/objects and I think you'll be good to go.
-
Hi Scott, thanks for a great product and for being responsive to your users. I’ve had two highly relevant issues to this in the last few days.
A new line was added to my
.iml
file, just like in Artem’s case. Is it fair to say that adding files to a project without creating them through IC is a bad idea? I needed a ton of quick actions so I created them as text files and tried to deploy them through IC. This caused the0/0 deployed
error. I’m not sure how simply copying files into the folder would create a line in the XML containing a new folder that didn’t even exist.In my case, I had
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
where the
/src
one was created randomly.
Second, I see the comments above around
EmailServicesFunction
. Recently, when deploying to this org, I am getting this error.I can’t find any references to
EmailServicesFunction
anywhere in my project, so I’m not sure why it’s trying to deploy that, nor do I have any idea what I might have done to cause it. My.iml
file is missing this entire tree:
<MetadataType> <option name="entries"> <list> <MetadataEntry> <option name="name" value="illuminatedCloud" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="misc" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="modules" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="profiles_settings" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="vcs" /> <option name="selected" value="true" /> </MetadataEntry> <MetadataEntry> <option name="name" value="workspace" /> <option name="selected" value="true" /> </MetadataEntry> </list> </option> <option name="name" value="EmailServicesFunction" /> <option name="wildcard" value="false" /> </MetadataType>
Thanks for any thoughts on how I’m getting in my own way.
-
repo owner Hi, Bob. I'm fairly sure the issue is this line from your
.iml
file:<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
That's adding the project root as a source root, so IC is finding things under that root that aren't actually source. You can remove that from the
.iml
file explicitly, or you can do so by editing the project structure.Please let me know if that doesn't help.
-
repo owner - changed status to resolved
Resolving based on the last comment about a source root change. If that change has been made and this is still happening, feel free to reopen and provide new diagnostic logs.
-
repo owner - changed component to Metadata Deployment/Retrieval/Removal
- Log in to comment