deploy VF Failed

Issue #504 resolved
SpringZhang created an issue

When I am trying to deploy the VFpage to another environment. it failed and the error message of eventlog is as follow:

FIELD_INTEGRITY_EXCEPTION - No such relation 'Profile' on entity 'User'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names

While this issue has occured to me for many times. If I create and deploy a new VF page with name only (empty content) in another environment , eventlog writes :

"Deployment Complete: All files are up-to-date"

but the fact is nothing changed in the file there. You can refer to the IDEA Log as follow

2017-01-04 10:39:21,677 [3278417] INFO - der.ForceComToolingApiDeployer - Using the tooling API to create ApexPage CsEventPage. 2017-01-04 10:39:22,157 [3278897] WARN - der.ForceComToolingApiDeployer - Failures when trying to create missing metadata. Aborting deployment.

Comments (24)

  1. Scott Wells repo owner

    Sorry for the issue. Would you mind adding the following to Help>Debug Log Settings and reproducing the issue, then providing your idea.log for me to review:

    #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer
    #com.illuminatedcloud.intellij.builder.ForceComBuilder
    
  2. Scott Wells repo owner

    Thanks for the log. I'm not seeing where you added those classes for debug logging, though, so I'm not seeing the response details which would explain the failure. Would you mind verifying that you've added the entries as indicated in my previous comment before reproducing the issue? If done properly, you should see DEBUG entries for the classes ForceComToolingApiDeployer and ForceComBuilder.

  3. SpringZhang reporter

    Thanks, I already know how to do it in Debug Log Settings, add #com.illuminatedcloud.intellij.builder.ForceComToolingApiDeployer #com.illuminatedcloud.intellij.builder.ForceComBuilder I just tried to do not reproduce this problem, the next time, if again, to the idea.log has been(Sorry, These are translated by the translation software,because my English is bad)

  4. Scott Wells repo owner

    Not a problem at all! It looks like you omitted the leading hashes (#) on the entries in that window. It should look exactly like:

    DebugLogSettings.png

    Please make sure it looks like that and then try to reproduce the issue so that you get the detailed information in the log.

  5. Scott Wells repo owner

    It sounds like perhaps the problem isn't reproducing for you now. If that's the case, I'll keep this issue open for a bit in case it does recur so that we can get good logs for the issue. Keep me posted.

  6. Scott Wells repo owner

    I'm going to resolve this for now. If/when the problem recurs, please feel free to reopen with detailed logs attached.

  7. SpringZhang reporter

    hello, the same problem recurs to me again, I made two videos , the first piece is about the issue when I deploying and the second one describes the I created the same file in another environment and system alerts that the files are duplicated do not need to deploy again. when i changed the file and deployed again, it succeeded.

  8. Scott Wells repo owner

    Thank you for the additional details. I'll review the information and let you know if I need anything further from you to debug the issue.

  9. Scott Wells repo owner

    Okay, I'm not seeing the issue in the log, but I do see it in the video you've provided. It looks like Salesforce is reporting that the field User.ProfileID is not valid. Illuminated Cloud seems to be showing the error properly, though. I see the Problems view light up on the bottom of the window, and I'm pretty sure if you open that view you'll see the error reported for the VF page you were trying to deploy.

    The thing that concerns me here is that User.ProfileId is in fact a valid field even though it's being reported by Salesforce as invalid. Can you explain to me how that field is being used in this VF page and/or its Apex controller? Also, would you mind trying to deploy this page (when it's producing this error) using the metadata API? I've seen a handful of issues where code that compiles just fine with the metadata API produces strange/incorrect errors with the tooling API. There are two ways that you can try to corner this:

    1. Try to save the same page through Developer Console which uses the tooling API as well. If it fails with the same error there, it's definitely a reproducible Salesforce issue.
    2. Configure Illuminated Cloud to deploy Visualforce using the metadata API. You can do that under Settings>Illuminated Cloud>Validation and Deployment by unchecking Prefer Tooling API for>Visualforce.

    I'll also try to reproduce this locally. I'll let you know what I find. I'll be interested to know your findings as well.

  10. Scott Wells repo owner

    I just tried to reproduce this by adding a User property to an Apex controller class and querying the current user including the ProfileId field, then adding an expression on the Visualforce page to show user.ProfileId. Both files deployed fine using the Tooling API. I'll definitely need to hear back from you minimally how User.ProfileId is being used in this page, and ideally with you seeing whether the same issue is reproducible in Developer Console and not when deploying via the metadata API. Thanks!

  11. Scott Wells repo owner

    Still unable to reproduce and haven't heard anything from the reporter in a while on the topic. If the problem still exists, please feel free to reopen with details on how to reproduce.

  12. SpringZhang reporter

    The question has been renewed。 When I create a new file, write the code and click Save to the service. This error is prompted in the log panel。 When I create a new file in SFDC, copy the code and save it in IDEA, then there is no problem

  13. Scott Wells repo owner

    Issue tracker grooming. If this is still happening, please feel free to reopen, ideally with a concrete reproducible use case.

  14. Log in to comment