Attachment Schema Missing from Offline Symbol Table
The Attachment object doesn’t seem to be created when generating the Offline Symbol Table. This presents itself in a few different ways:
- Missing an entry in the Schema folder of the Offline Symbol Table
- Unavailable in the list of SObject Types when trying to create an Apex Trigger
- Numerous Inspection Warnings when reviewing existing Attachment-related code
This feels like it might have something to do with my org or IntelliJ/Illuminated Cloud 2 settings, but can you validate?
This should be valid code, to replicate the third issue:
trigger AttachmentTrigger on Attachment (after insert) {}
Comments (6)
-
repo owner -
reporter That’s interesting (and good to know it might just be my setup)! I guess I can utilize that for the meantime.
As for your ideas, I can’t find anything glaringly wrong:
- IntelliJ IDEA 2021.3.3, Build #IU-213.7172.25, built on March 15, 2022 - that appears to be the latest version of the IDE. Illuminated Cloud 2 plugin is on 2.2.1.4
-
As far as I can tell, I’m authorized to read all SObjects (or at least the Attachment):
- I have the default System Administrator profile.
- The Attachment SObject is listed with a Schema.getGlobalDescribe(); OR ((SObject)Type.forName('Schema','Attachment').newInstance()).getSObjectType();
- I can run a basic SOQL query for [SELECT Id FROM Attachment]
-
We don’t have a local Apex class or trigger named “Attachment” specifically, but we do have a plural Attachments.cls, following FFLIb’s naming convention for domain layer classes.
-
reporter Started up a new project today on another org and after Illuminated Cloud built the Offline Symbol Table, I looked into Schema and saw Attachment present. This is odd - is there anything else I could look for, in logs or otherwise, to identify why the Attachment SObject might be omitted? The org is ~15 years old and has more than its fair share of metadata, so I wouldn’t be surprised about a timeout, legacy setting, or surpassed threshold.
-
repo owner I'm happy to look at a debug log from OST generation against that org to see if there's anything that stands out. Please enable debug logging for OST generation--no need to include the
!trace
entry for the first log--and either attach the resultingidea.log*
file(s) here or email them to support@illuminatedcloud.com. -
repo owner - attached IlluminatedCloud2.zip
This is the custom build that I proposed which only tries to generate the OST entry for the
Attachment
SObject type when you regenerate the OST for SObjects only. Download the archive (but don't extract it) and install it using Settings / Preferences > Plugins > Install plugin from disk (under the gear drop-down menu). After the IDE restarts, make sure you have the following in Help > Diagnostic Tools > Debug Log Settings (you likely should based on what you've already done):#com.illuminatedcloud.symtab.OfflineSymbolTable #com.illuminatedcloud.symtab.OfflineSymbolTable!trace #com.illuminatedcloud.intellij.settings.project.OfflineSymbolTableGenerator #com.illuminatedcloud.symtab.SystemDeclarations
Then regenerate the OST choosing the SObjects Only option. Once that completes, grab the debug logs and either attach them here or email them to me, and finally fully regenerate your OST one more time to ensure it's not based on this diagnostic hack.
I'll be very interested to see what these logs show...
-
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
- Log in to comment
Hi. I'm seeing that SObject in all of my OSTs, e.g.:
Can you do the following?
Attachment
in the project. That shouldn't matter, but just in case it might be confusing IC2 during OST generation, let's check that.