Forum Discussion
PBIP won't save in Feb 2025
A preexisting report refuses to save in PBIP format in the latest version. The debug output is below - seems to be some kind of error out of "Microsoft.PowerBI.Modeling.Common.Contract", so maybe a contract violation for the model? Saving the same report to PBIX works OK.
Saving 'partly' succeeds, i.e. some files get updated - in particular, "\*.SemanticModel\definition.pbism" has its 'version' field incremented from 4.0 to 4.1, so maybe there's some incompatibility where the old version was OK with it and the new is not.
I haven't yet found another PBIP report that hits this error, but I also haven't found another report that's trying to update this PBISM from 4.0 to 4.1 in the latest release.
The error emitted in the error popup when saving fails is "UserErrorDetails doesn't make sense if the error is not caused by the user" - so I guess it tries to present an error to me/the end user but the error system thinks it's an internal error, and doesn't present user-facing info.
Feedback Type:
Frown (Error)
Timestamp:
2025-03-05T02:09:27.0594435Z
Local Time:
2025-03-05T13:09:27.0594435+11:00
Session ID:
23380c04-a723-4930-9671-bc0a1423fdc5
Release:
February 2025
Product Version:
2.140.1205.0 (25.02)+2ab3defe107764e1cf486b42122d9362df7f34ea (x64)
Stack Trace:
System.InvalidOperationException
at Microsoft.PowerBI.Modeling.Common.Contract.FailCore(String msg)
at Microsoft.PowerBI.Client.Windows.ExceptionHandling.PowerBIException..ctor(String message, ErrorSource errorSource, UserErrorDetails userErrorDetails, Exception innerException, String errorCode, Dictionary`2 telemetryValues)
at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<SaveReportIntoProjectRelatedFile>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.BiProjectOperationHandler.<TrySaveArtifact>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.CurrentArtifactManager.<TrySaveFileAndSetAsCurrent>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.<>c__DisplayClass17_0`1.<<BlockUIAndRun>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.WaitOnUIThreadForTaskCompletion[T](Task`1 task)
at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod, PowerBIProgress progress)
at Microsoft.PowerBI.Client.Windows.LocalFileOpenSaveUI.ShowSaveUIAndWait(IPowerBIWindowService windowService, IExceptionHandler exceptionHandler, IPowerBIArtifactInfo artifactInfo, Func`2 performSaveMethod)
at Microsoft.PowerBI.Client.Windows.Services.FileOperationUIHandler.<TrySaveFile>d__51.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<HandleAwaitableAsyncExceptions>d__1.MoveNext()
PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.140.1205.0","ModuleName":"Microsoft.PowerBI.Modeling.Common.dll","Component":"Microsoft.PowerBI.Modeling.Common.Contract","Error":"System.InvalidOperationException","MethodDef":"FailCore","ErrorOffset":"28","ErrorCode":""}
OS Version:
Microsoft Windows NT 10.0.19045.0 (x64 en-US)
CLR Version:
4.8 or later [Release Number = 533325]
Peak Virtual Memory:
71.8 GB
Private Memory:
835 MB
Peak Working Set:
1.2 GB
IE Version:
11.3636.19041.0
User ID:
d45e7958-761c-4db4-812d-d0d3fcd0b535
Workbook Package Info:
1* - en-AU, Query Groups: 3, fastCombine: Disabled, runBackgroundAnalysis: False.
Telemetry Enabled:
True
Model Default Mode:
Import
Model Version:
PowerBI_V3
Enabled Preview Features:
PBI_sparklines
PBI_scorecardVisual
PBI_fieldParametersSuperSwitch
PBI_setLabelOnExportPdf
PBI_oneDriveSave
PBI_oneDriveShare
PBI_useModernPublishDialogs
PBI_gitIntegration
PBI_tmdlInDataset
PBI_directLakeRemoteModeling
PBI_newCard
PBI_buttonSlicerAuthoring
PBI_EimLessElevatedUser
PBI_mobileAutoReportLayout
PBI_daxInlineCopilot
PBI_aiNarrativesVisual
PBI_generateMeasureDescriptionsButton
PBI_visualCalculationsAuthoring
PBI_desktopReportAuthoringCopilot
PBI_tmdlViewToggle
Disabled Preview Features:
PBI_snowflakeAdbcVersionEnabled
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_metricsArtifactsOnDesktop
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PBI_onObject
PBI_odspSaveBackgroundUpload
PBI_modernOfficeFilePicker
PBI_publishDialogsSupportSubfolders
PBI_enhancedReportFormat
PBI_advancedSlicerTypeList
PBI_textSlicer
PBI_qnaImproveLsdlCopilot
PBI_UserInstalledVerticaODBCDriver
Disabled DirectQuery Options:
TreatHanaAsRelationalSource
Cloud:
GlobalCloud
DPI Scale:
100%
Supported Services:
Power BI
OK yep, the cause of the error is the presence of the 'TMDLScripts' folder under *.SemanticModel/. Deleting that folder causes the error to go away. (It was not sufficient to disable the tmdlView feature, disabling the feature while the folder remained present produced the same error.)
Possibly the presence of that folder would have been OK if it were in some other state, I'm unsure: as it was, it was completely empty, with an empty .pbi subfolder.
EDIT: also verified on a different, working report. Adding the TMDLScripts folder produces the same error.
EDIT EDIT: The very latest release, 2.140.1454, seems to have resolved this issue: no error is emitted and the empty TMDLScripts directory gets removed automatically on save.
4 Replies
- Al_KingFrequent Visitor
OK yep, the cause of the error is the presence of the 'TMDLScripts' folder under *.SemanticModel/. Deleting that folder causes the error to go away. (It was not sufficient to disable the tmdlView feature, disabling the feature while the folder remained present produced the same error.)
Possibly the presence of that folder would have been OK if it were in some other state, I'm unsure: as it was, it was completely empty, with an empty .pbi subfolder.
EDIT: also verified on a different, working report. Adding the TMDLScripts folder produces the same error.
EDIT EDIT: The very latest release, 2.140.1454, seems to have resolved this issue: no error is emitted and the empty TMDLScripts directory gets removed automatically on save.
- Al_KingFrequent Visitor
Provisionally, rolling back to Jan 2025 (version 2.139.2054.0) is working OK.
- AnonymousNot applicable
Hi Al_King
Here are some steps for your reference:
The error suggests a potential incompatibility with the semantic model version (4.0 to 4.1). Try the following:
1. Open the PBIP file and check if there are any unsupported features or settings in the semantic model.
2. If possible, recreate the semantic model in the latest version.Or create a new PBIP file in the latest version and try saving it. If the new file saves without issues, the problem might be specific to the preexisting report.
If the issue persists, please consider using the previous version first, and you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.
The link of Power BI Support: https://powerbi.microsoft.com/en-us/support/
For how to create a support ticket, please refer to How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you for your understanding.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Al_KingFrequent Visitor
Hi Zhengdong, thanks for your reply!
I would love to check for disabled features but as far as I can tell there's no way of knowing what differs between versions 4.0 and 4.1, I guess it's informative internally at Microsoft.
Some comments on Feb 2025 Announcement post point to some kind of issue with the "TMDL view" preview feature, so I'll try toggling that, and maybe removing tables from the model to see if I can narrow it down to a particular table (which might suggest a culprit feature?). Model refresh takes a while on this one but maybe I'll truncate the tables to a few rows so I can try making changes more quickly.
Using the previous version does seem provisionally to be doing the trick, though fingers crossed a subsequent update to the latest gets things working OK again. I'll try a support ticket if I don't make any progress!