Forum Discussion
There is an error in XML document (1, 1).
Hi,
This morning I am unable to open up a blank or any of my existing .PBIX files. I get an error stating "There is an error in XML document (1, 1). I've been reading posts and have uninstalled and re-installed my Power BI desktop and Personal Gateway. I've also deleted the AppData file users have mentioned but nothing seems to work. Below is a copy of the code I copied from the error. I'm not sure why all of a sudden this is having issues as my Power BI Desktop was working fine last friday. Also, I had another member open up a file and test and they had no issues so it seems to be on my PC. Does anyone know how to fix?
| Feedback Type: |
| Frown (Error) |
| Error Message: |
| There is an error in XML document (1, 1). |
| Stack Trace: |
| at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) |
| at Microsoft.Mashup.Storage.Xml`1.DeserializeBytes(Byte[] bytes) |
| at Microsoft.Mashup.Host.Document.Storage.Local.LocalCredentialsStorage.CredentialsStorageContext.TryGetPart(CredentialsList& part) |
| at Microsoft.Mashup.Host.Document.Storage.Local.LocalStorageContext`1.Init() |
| at Microsoft.Mashup.Host.Document.Storage.Local.LocalCredentialsStorage.GetCredentials() |
| at Microsoft.Mashup.Host.Document.Storage.TracingCredentialsStorage.GetCredentials() |
| at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.CreateCredentialManager() |
| at Microsoft.PowerBI.Client.Windows.AnalysisServices.PersistedModelSanitizer.TryRestoreModel(IDataModel dataModel, ModelChange& modelChange) |
| at Microsoft.PowerBI.Client.Windows.AnalysisServices.AnalysisServicesDatabaseLocal.BuildActionToRestoreConnectionStringCredentials(Action& restoreCredentialsAction) |
| at Microsoft.PowerBI.Client.Windows.ReportPreparer.ApplyStoredDirectQueryCredentials(Report report, IPowerBIWindowService windowService) |
| at Microsoft.PowerBI.Client.Windows.Services.PowerBIPackagingService.Open(FileStream fileStream, IPowerBIWindowService windowService, Nullable`1 entryPoint, PowerBIPackageOpenOptions options, Boolean& allCredentialsSatisfied) |
| at Microsoft.PowerBI.Client.Windows.Services.FileManager.<LoadFromPbix>d__5.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__DisplayClassa`1.<<BlockUIAndRun>b__9>d__c.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(Task task) |
| at Microsoft.PowerBI.Client.Windows.Services.UIBlockingService.BlockUIAndRun[T](Func`1 asyncMethod) |
| at Microsoft.PowerBI.Client.Windows.Services.FileManager.OpenFile(IPowerBIWindowService windowService, IPbixFile fileToOpen, Nullable`1 entryPoint) |
| at Microsoft.PowerBI.Client.Program.TryOpenOrCreateReport(IUIHost uiHost, ISplashScreen splashScreen, IFileManager fileManager, IFileHistoryManager fileHistoryManager, String filePath, FileType fileType) |
| at Microsoft.PowerBI.Client.Program.<>c__DisplayClass10.<Main>b__0() |
| at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass7.<HandleExceptionsWithNestedTasks>b__6() |
| at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action) |
| Stack Trace Message: |
| There is an error in XML document (1, 1). |
| Invocation Stack Trace: |
| at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace() |
| at Microsoft.Mashup.Client.UI.Shared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace, String exceptionMessage) |
| at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.GetStackTraceInfo(Exception e) |
| at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture) |
| at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0() |
| at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e) |
| at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action) |
| at Microsoft.PowerBI.Client.Program.Main(String[] args) |
| InnerException.Stack Trace Message: |
| Data at the root level is invalid. Line 1, position 1. |
| InnerException.Stack Trace: |
| at System.Xml.XmlTextReaderImpl.Throw(Exception e) |
| at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() |
| at System.Xml.XmlTextReaderImpl.ParseDocumentContent() |
| at System.Xml.XmlReader.MoveToContent() |
| at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCredentialsList.Read6_CredentialsList() |
| InnerException.Invocation Stack Trace: |
| at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace() |
| at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.GetFeedbackValuesFromException(Exception e, String prefix) |
| at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo.CreateAdditionalErrorInfo(Exception e) |
| at Microsoft.Mashup.Client.UI.Shared.FeedbackErrorInfo..ctor(String message, Exception exception, Nullable`1 stackTraceInfo, String messageDetail) |
| at Microsoft.PowerBI.Client.Windows.Telemetry.PowerBIUserFeedbackServices.ReportException(IWindowHandle activeWindow, IUIHost uiHost, FeedbackPackageInfo feedbackPackageInfo, Exception e, Boolean useGDICapture) |
| at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0() |
| at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e) |
| at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action) |
| at Microsoft.PowerBI.Client.Program.Main(String[] args) |
Thanks,
I found that these solutions worked by finding the Power BI Desktop AppData folder and deleting out.
3 Replies
- v-yulgu-msft
Microsoft Employee
Hi chudson,
Right click Power BI deesktop and choose "Run as Administrator" for a try. Also, add PowerBi Desktop to firewall app on Windows Defender to see if it works.
If problem persists, I would suggest you create a support ticketfor further analysis.
Best regards,
Yuliana Gu
- chudson
Helper IV
I found that these solutions worked by finding the Power BI Desktop AppData folder and deleting out.
- SAM1998New Member
Yes,Surely it's right solution. If anyone feels error is still there after trying above solution,then delete each folders and files seperately from PowerBi Desktop folder.
follow this directory :%appdata%\Microsoft\Power BI Desktop\Cache