-
Notifications
You must be signed in to change notification settings - Fork 417
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
[FabricPS-PBIP] Export-FabricItems: PNG image files in ReportName.Report\StaticResources\RegisteredResources are corrupted #266
Comments
Thanks James, I'm looking into this. Not sure if its caused by the Fabric Get Definition API or my code. |
@RuiRomano, is there any way I can be of assistance in sorting this out? |
Sorry for the late reply. It was a bug in the Fabric API that was fixed last week. The fix is expected to hit production tenants by the end of the month. |
Thank you, @RuiRomano! |
For anyone who might be curious about this bug in the future, here's a peek at the inside of two PNG files. The first file was taken directly from a local PBIP report file, and the second file was taken from a copy of that same report, which had been published in the Power BI service and then exported as PBIP using the Fabric REST APIs.
As we can see by comparing the contents of these two PNG files, both the file header and the entire contents of the file were corrupted during the export process, rendering the file completely unusable and unrecoverable. I've also attached a zip file containing both files and a PowerShell script that you can run to compare their hexadecimal contents for yourself. |
When a report is saved in PBIP format, all images embedded in that report are saved as PNG files in the
ReportName.Report\StaticResources\RegisteredResources
folder (adjacent to the .PBIP file).When the report is saved locally by Power BI Desktop, these PNG files are valid image files, and they can be opened by any image viewer app. But when the report is exported from the Power BI service by
Export-FabricItems
, those same PNG files are corrupted, so they cannot be opened in any image viewer app.As a result, if the user opens a
ReportName.Report\definition.pbir
file that was exported withExport-FabricItems
in Power BI Desktop, none of the embedded images will display properly, and if the user publishes that report from Power BI Desktop to the Power BI service, the embedded images will not display properly there either.The PNG files that were saved locally with Power BI Desktop are actually smaller than the ones that were exported with
![image](https://private-user-images.githubusercontent.com/37491308/341586011-67514160-05aa-4545-93f9-ca44b3ab0758.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4Nzk1NjcsIm5iZiI6MTczODg3OTI2NywicGF0aCI6Ii8zNzQ5MTMwOC8zNDE1ODYwMTEtNjc1MTQxNjAtMDVhYS00NTQ1LTkzZjktY2E0NGIzYWIwNzU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDIyMDEwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4ZGEzNzRiNTA0YzAwMmUzODdkYjZmOGJjMmFmMjMwNGY0YWRjOGFiODU0MWQwMzYzYzM0MDk0Njc5Mzk1YjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.TSJ8PCfWolZ6u94cqwwppICqptpEtof5UQScc1sLuME)
Export-FabricItems
, so I think it's pretty likely that some extra bytes of data are being added to the files during the export process, and that is causing them to become corrupted.@RuiRomano, please let me know if I may be of any assistance with sorting this out.
The text was updated successfully, but these errors were encountered: