Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution upgrade Failed. Error: Solution still exists after upgrade #278

Open
fireaimready opened this issue Feb 15, 2023 · 4 comments
Open
Labels
help wanted Extra attention is needed

Comments

@fireaimready
Copy link

fireaimready commented Feb 15, 2023

Consistently getting this error with the following yml configuration, have not been able to find a configuration which works:

             `   - task: MSCRMPackSolution@12
                   displayName: 'Pack ${{ solution }}'
                   inputs:
                     unpackedFilesFolder: '$(Build.SourcesDirectory)\D365_Managed_Solutions\${{ solution }}'
                     packageType: 'Managed'
                     outputPath: '$(Build.ArtifactStagingDirectory)'
                     
                 - task: MSCRMImportSolution@12
                   inputs:
                     crmConnectionString: '$(ConnectionString)'
                     solutionFile: '$(Build.ArtifactStagingDirectory)\${{ solution }}_managed.zip'
                     holdingSolution: true
                     useAsyncMode: false
                     
                 - task: MSCRMApplySolution@12
                   inputs:
                     crmConnectionString: '$(ConnectionString)'
                     solutionName: '${{ solution }}'
                     crmConnectionTimeout: '453453' `

The log file:
Solution Upgrade Starting.
Async Job Id:
##[error]Solution upgrade Failed. Error: Solution still exists after upgrade: CRMSolution_Upgrade
Finishing: MSCRMApplySolution4

Error Code in CRM: 80071151

EDIT: Should have mentioned the Uninstall/Upgrade job in the environment itself succeeds. Somehow the pipeline task is getting a notification for a failure and shutting the pipeline down. If I wait for the Uninstall/Upgrade job to complete (it always succeeds), then I can restart the pipeline to continue.

@mattp65
Copy link

mattp65 commented Feb 20, 2023

The Upgrade solution still existing after an Apply typically means there is a dependency issue related to something that was removed from the solution. Those items aren't deleted until the 'Apply' runs and that is when the issue is detected. There should be an error elsewhere in the log. You can also try manually applying the changes n the target environment to see what error is returned.

@fireaimready
Copy link
Author

fireaimready commented Feb 20, 2023

Appreciate your comment, I should have specified that the actual apply task in the environment succeeds, its just the pipeline task somehow is receiving a failure and interrupting the pipeline. I just have to wait for the Uninstall/Upgrade subroutine to complete before restarting my pipeline to continue where it left off in my solution list.

I should also mention that I modified my pipeline task to deploy via MS power platform tools (non Wael) via async and the solution will successfully deploy and the pipeline will succeed.

@mattp65
Copy link

mattp65 commented Feb 20, 2023

Try bumping your timeout. Odds are you are exceeding that. The tasks take longer then I would like to see in many areas and the Apply tends to run longer then the Import. The underlying mechanism they provide for these calls is not as robust as it could be and the level of feedback provided to the calling routine is limited.

@WaelHamze
Copy link
Owner

@fireaimready I presume this is working now?

@mattp65 thanks for responding

@WaelHamze WaelHamze added the help wanted Extra attention is needed label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants