Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Upload bacpac file to LCS asset library issue

(0) ShareShare
ReportReport
Posted on by
Hello,
 
I am trying to upload the .bacpac file from my local drive to LCS asster library, and I am end with an error which does not have much details. Please help if anybody have solutions. Please let me know if any further questions.
 
Here is the error I am receiving on console:
[17:15:56][Start-LcsUploadV2] Something went wrong while working against the LCS API. | Response status code does not indicate success: 500 (Internal Server Error).
WARNING: [17:15:56][Start-LcsUploadV2] Stopping because of errors
 
Here is the code:
  • Dieter Profile Picture
    Dieter 127 on at
    Upload bacpac file to LCS asset library issue
    Running into the same issue.
    Here's a little more information as to why the error occurs, when adding the -Verbose flag:
     
    Still not very helpful, something with payload...?
     
    When adding the below parameter to the Invoke-D365LcsUpload statement: 
    -EnableException $true
    The error shows:
     
    After adding a value for the "RetryTimeout" on which it's complaining, the process still fails, with a similar error:
     
     
    I still don't know why this is occurring...
     
    This is my command:
    Invoke-D365LcsUpload -ProjectId $projectId -BearerToken "Bearer $($token.access_token)" -FilePath $LcsAssetFilePath -FileType "DataPackage" -Name "testbacpacupload" -Filename "backup.bacpac" -FileDescription $LcsAssetDescription -LcsApiUri "https://lcsapi.lcs.dynamics.com" -RetryTimeout "00:01:00" -EnableException $true -Verbose
     
     
  • CU09081210-0 Profile Picture
    CU09081210-0 on at
    Upload bacpac file to LCS asset library issue
     
    HI Kevin,
     
    Thanks for your reply.
     
    Catch block is not executing in this case. Seems Invoke-D365LcsUpload is using some internal function called "Start-LcsUploadV2" which is causing the issue. 
    Start-LcsUploadV2 is handled the error by source code. my code is not throwing any error. I am passing all necessary information which is required for cmdlet.
     
    Regards
  • Suggested answer
    Kevin Xia Profile Picture
    Kevin Xia Microsoft Employee on at
    Upload bacpac file to LCS asset library issue
    Hi,
    500 Internal server error, most probably means something went wrong in code. So we need to know what is the message that comes with this 500 error. I noticed that you're already using try and catch blocks, are you catching the error correctly? Try to catch errors with try and catch so we can see which piece of code is wrong.
    Best regards,
    Kevin

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans