Refresh or Retrieve metadata doesnt work

Issue #1097 resolved
Sachin Kadian created an issue

Almost all the developers in my company are having this issue.

When we right click on any component or folder and retrieve/refresh metadata from salesforce , it doesnt reflect the latest code. Sometimes if we close the component and reopen, it loads the latest but most of the times it doesnt. Due to this , we are ending up with overwriting the code.

This is really becoming frustrating for us now. Any body faced same issue before? any workaround?

Comments (8)

  1. Scott Wells repo owner

    Sachin, I'm not sure that I follow the issue. Can you provide two things? First, can you enable debug logging for metadata retrieval as documented here:

    http://www.illuminatedcloud.com/support/debuglogging

    then reproduce the issue and then send me your idea.log using Help>Show Log in Finder/Explorer. Second, along with the log can you either provide a step-by-step of what you've done or a short recorded video of the reproduction. I just want to make sure I understand the issue completely. Thanks!

  2. Scott Wells repo owner

    Thanks for the video, Sachin. It's very odd that it's not bringing up Finder to show you the folder in which logs are written. However, here's how you can find them yourself:

    https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files

    It's going to be important to get those logs so that I can see what's happening under the hood, both for the refresh issue and even for why it's not showing logs. It's possible they're related, e.g., a corrupted installation. If you can, please grab all the logs and feel free to email them to me (support@illuminatedcloud.com) if they might contain sensitive information you'd prefer not to post here.

    While I'm waiting to see those logs, could you please try one thing for me? Could you see if forcing the IDE to refresh its state from the local filesystem does in fact show the updated file? You can do that by using File>Synchronize after the retrieve/refresh operation has completed. That will tell us whether the metadata is in fact being retrieved/refreshed from the org but not picked up by the IDE, or if the latest metadata is just not being pulled down and placed properly. By default the IDE should synchronize against the local filesystem immediately upon receiving focus, and IC also sends a message to the IDE that it needs to do so after it has completed placing files from a retrieve/refresh, but perhaps it's not doing that properly here. I just want to characterize the issue as much as possible so I know next steps.

    Thanks again! With that info I promise that we'll get this sorted out for you and your team quickly.

  3. Sachin Kadian reporter

    Thanks scott.

    i tried to synchronize it manually as mentioned by you in last comment and looks like thats the issue. Its not sybchronizing automatically when i am refreshing the metadata but if i switch the tabs or reopen the tab or synchronizing it from file menu, its reflecting the latest code. I am not sure if this is problem from intelliJ or IC2.

    i got the log file finally and just sent you on your email.

  4. Scott Wells repo owner

    Thanks for the log. Yeah, I see it placing the files properly:

    2018-09-03 01:11:55,372 [ 438420]   INFO - lder.ForceComMetadataRetriever - Populated /Users/sachinkadian/Desktop/Projects/Avid Claims/src/aura/Avid_NewRecordTemplate/Avid_NewRecordTemplate.cmp. 
    2018-09-03 01:11:55,372 [ 438420]   INFO - lder.ForceComMetadataRetriever - Populated /Users/sachinkadian/Desktop/Projects/Avid Claims/src/aura/Avid_NewRecordTemplate/Avid_NewRecordTemplate.css. 
    2018-09-03 01:11:55,373 [ 438421]   INFO - lder.ForceComMetadataRetriever - Populated /Users/sachinkadian/Desktop/Projects/Avid Claims/src/aura/Avid_Base/Avid_Base.cmp. 
    2018-09-03 01:11:55,373 [ 438421]   INFO - lder.ForceComMetadataRetriever - Populated /Users/sachinkadian/Desktop/Projects/Avid Claims/src/aura/Avid_Base/Avid_BaseHelper.js. 
    

    I just tried this locally and on Windows and Linux it synchronizes properly but on Mac it doesn't. I'll need to investigate that. Let's keep this issue open (I'll update the subject to be more specific) to track that specific fix. In the interim you should have an effective (though it should be unnecessary) workaround. I'll keep you posted on progress toward the fix via the issue.

  5. Scott Wells repo owner

    I have a prospective fix for this in the next build. With it things are always synchronized properly after a retrieve/retrieve for me on my Mac. That build should be released tomorrow.

  6. Scott Wells repo owner

    Prospective fix delivered with 2.0.3.6. Please let me know if an explicit sync is still required on refresh after updating to this build.

  7. Log in to comment