Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Cannot invoke on WebView2 Web Browser in its current state

Hi team

 

I am getting this error "Cannot invoke on WebView2 Web Browser in its current state"

  when trying to open any file or work with Power BI.

Can anyone please tell me how to fix this?

 

Errors:

 

 

 

I did disable "WebView2 Web browser" few days ago when I was trying get another issue resolved (link below of that thread) Power BI Desktop >> preview features >> disable the infrastructure update

https://community.powerbi.com/t5/Desktop/Unable-to-sign-in-to-Salesforce-Account-on-Power-BI-Desktop/m-p/2247156#M818004

 

However then I have reenabled this feature and restarted laptop, which did not work and then did multiple uninstalls and reinstalls but nothing seems to work.

Please help!

 

Details from the logs:

Release:
       December 2021

Product Version:
       2.100.785.0 (21.12) (x64)

 

Stack Trace:
Microsoft.PowerBI.Client.Windows.WebView2.WebView2ProcessCrashException
at Microsoft.PowerBI.Client.Windows.WebView2.WebView2BrowserWrapper.OnWebViewProcessFailed(Object sender, CoreWebView2ProcessFailedEventArgs args)

 

Browser Name:
       ExplorationBrowser

Browser Source:
       https://ms-pbi.pbi.microsoft.com/pbi/Web/Views/ReportView.htm

Browser ExitCode:
       3

Browser Crash Reason:
       Crashed

 

Browser Crash Kind:
       RenderProcessExited

 

Browser Process Description:


PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.100.785.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.WebView2.WebView2BrowserWrapper","Error":"Microsoft.PowerBI.Client.Windows.WebView2.WebView2ProcessCrashException - WebView2 Process Failed: ExplorationBrowser, Source:https://ms-pbi.pbi.microsoft.com/pbi/Web/Views/ReportView.htm ExitCode:3 Reason:Crashed ProcessFailedKind:RenderProcessExited ProcessDescription:","MethodDef":"OnWebViewProcessFailed","ErrorOffset":"125"}

 

OS Version:
       Microsoft Windows NT 10.0.18363.0 (x64 en-US)

 

CLR Version:
       4.7 or later [Release Number = 528040]

 

IE Version:
       11.1411.18362.0

 

Workbook Package Info:
       1* - en-US, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: True.

 

Telemetry Enabled:
       True

 

Enabled Preview Features:

PBI_shapeMapVisualEnabled
PBI_enableWebView2
PBI_useModernFormatPane
PBI_sparklines
PBI_scorecardVisual

 

Disabled Preview Features:

PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_dataPointLassoSelect
PBI_compositeModelsOverAS
PBI_dynamicParameters
PBI_enhancedTooltips
PQ_WebView2Connector

 

Disabled DirectQuery Options:
       TreatHanaAsRelationalSource

 

 

 

Regards

Sumeet

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hello,

    From looking at the exception, it is the WebView2 browser process which is crashing. We are working with the WebView2 team to figure out the cause for this but it would be nice to have some more information to help investigate. 
    Would it be possible for you to provide the following - 

    1 – the WebView2 crash dumps.
    You will find them under: “C:\Users\<<UserAlias>>\AppData\Local\Microsoft\Power BI Desktop\WebView2\EBWebView\Crashpad\reports”
    Or if you ran desktop as Admin, the under : “C:\Users\<<UserAlias>>\AppData\Local\Microsoft\Power BI Desktop\WebView2Elevated\EBWebView\Crashpad\reports”
    2 - your device Id -You can go to Windows -> settings -> system -> about and see the device id there.

    You can send the information to me at [email protected]
    Workaround: 

    To workaround this issue for now, you can go to File->Options and Settings -> Options -> Preview Features and disable the "Power BI Desktop Infrastructure Update" feature switch. That should stop using WebView2. 

    If you cannot get to the Options due to app not launching, you can set the following environment variable to disable the feature for now:

    Environment Variable : "PBI_enableWebView2Preview"
    Value: "0"

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello,

    From looking at the exception, it is the WebView2 browser process which is crashing. We are working with the WebView2 team to figure out the cause for this but it would be nice to have some more information to help investigate. 
    Would it be possible for you to provide the following - 

    1 – the WebView2 crash dumps.
    You will find them under: “C:\Users\<<UserAlias>>\AppData\Local\Microsoft\Power BI Desktop\WebView2\EBWebView\Crashpad\reports”
    Or if you ran desktop as Admin, the under : “C:\Users\<<UserAlias>>\AppData\Local\Microsoft\Power BI Desktop\WebView2Elevated\EBWebView\Crashpad\reports”
    2 - your device Id -You can go to Windows -> settings -> system -> about and see the device id there.

    You can send the information to me at [email protected]
    Workaround: 

    To workaround this issue for now, you can go to File->Options and Settings -> Options -> Preview Features and disable the "Power BI Desktop Infrastructure Update" feature switch. That should stop using WebView2. 

    If you cannot get to the Options due to app not launching, you can set the following environment variable to disable the feature for now:

    Environment Variable : "PBI_enableWebView2Preview"
    Value: "0"

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

       

      Thank you for your assistance. 

       

      Workaround of disabling "Power BI Desktop Infrastructure Update" feature switch which stopped using WebView2, has worked.

      However, I would still request you please not to drop the ball and do try to get the issue resolved with WebView2.

       

      I will use the Power BI and report back if I come accross any issue.

       

      Regards

      Sumeet

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hello Sumeet,

        We are looking into the issue. From the exit code (3) for the WebView2 render process failure. It seems like something is blocking the WebView2 process. Do you have any Antivirus which could potentially be blocking the webview2 process ? if yes can you try adding pbidesktop and msedgewebview2 to the exemption list and then see if you can get desktop launch with WebView2 ? 

    • emilplan's avatar
      emilplan
      Frequent Visitor

      Hi!

      I also ran into this issue despite having the webview2 runtime installed. The workaround worked though, using an environment variable. 

       

      My question then is how to handle this going forward? When checking the settings after the workaround, the infrastructure update switch is missing. That might make sense since I disabled it, but how to get back to a "vanilla" install? 

       

      regards

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hey,

        The environment variable workaround is only a temporary way to disable WebView2. We need to understand why is this failing on your machine. We need to get the failure traces. Can you please reach out to me at [email protected]

        thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

    What version of power bi desktop are you working on? Have you checked the prerequisite of webview2 features to confirm you have successfully installed the software environment?

    Power BI Desktop Installer Changes & WebView2 

    In addition, any update applied to your device about the system or software environments?  Please share some more detail to help us clarify your scenario:

    How to Get Your Question Answered Quickly  

    Regards,

    Xiaoxin Sheng

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Thank you for trying to help 🙂

     

    I have the updated version of the Power BI.

     

    Release:
           December 2021

    Product Version:
           2.100.785.0 (21.12) (x64)

     

    I have managed to enable the WebView2 feature(via GetData/PowerQuery/Options) but still I'm getting almost the same error.


    PowerBINonFatalError:
     {"AppName":"PBIDesktop","AppVersion":"2.100.785.0","ModuleName":"Microsoft.PowerBI.Client.Windows.dll","Component":"Microsoft.PowerBI.Client.Windows.ScriptAsyncInvokeAttempt`1","Error":"System.InvalidOperationException","MethodDef":"get_Result","ErrorOffset":"23"}

     

    InnerException0.Stack Trace Message:
     Invoke Attempt Failed

     

    Enabled Preview Features:
     PBI_shapeMapVisualEnabled
     PBI_azureMapVisual
     PBI_dataPointLassoSelect
     PBI_compositeModelsOverAS
     PBI_dynamicParameters
     PBI_enhancedTooltips
     PBI_enableWebView2
     PQ_WebView2Connector
     PBI_useModernFormatPane
     PBI_sparklines
     PBI_scorecardVisual

     

    Disabled Preview Features:
     PBI_SpanishLinguisticsEnabled
     PBI_qnaLiveConnect

     

    Disabled DirectQuery Options:
     TreatHanaAsRelationalSource

     

    InnerException0.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.GetFeedbackValuesFromInnerExceptions(Exception e, Int32 depth)
    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__DisplayClass15_0.<HandleException>b__0()
    at Microsoft.Mashup.Client.UI.Shared.UnexpectedExceptionHandler.HandleException(Exception e)
    at Microsoft.PowerBI.Client.PowerBIUnexpectedExceptionHandler.HandleException(Exception e)
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at Microsoft.Mashup.Client.UI.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
    at Microsoft.Mashup.Client.UI.Shared.WebDialogs.WebDialog.<>n__0(IWindowHandle owner)
    at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
    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__DisplayClass15_0.<HandleException>b__0()
    at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass2_1.<SendAndMarshalExceptions>b__0(Object null)
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at Microsoft.Mashup.Client.UI.Windows.DialogWindowBase.ShowModal(IWindowHandle windowHandle)
    at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
    at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.TryShowDialog(Report report, IExceptionHandler exceptionHandler, IPowerBIWindowService windowService, IQueryServices queryServices, IDesktopModelingHost modelingHost, LocalizedString title, LoadToModelContext loadToModelContext)
    at Microsoft.PowerBI.Client.Windows.FloatingDialog.KoLoadToReportDialog.<>c__DisplayClass16_0.<TryShowDialogForQueries>b__0()
    at Microsoft.PowerBI.Client.Windows.Report.<>c__DisplayClass64_0`1.<SynchronizeLooselyWithQueries>b__0()
    at Microsoft.PowerBI.Client.Windows.Report.<SynchronizeLooselyWithQueriesAsync>d__65`1.MoveNext()
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
    at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueriesAsync[T](Func`1 getTask)
    at Microsoft.PowerBI.Client.Windows.Report.SynchronizeLooselyWithQueries[T](Func`1 action)
    at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.LoadQueries(IEnumerable`1 queriesToLoad)
    at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.OnImportSuccess(IEnumerable`1 addedQueries, DataImportDestination destination)
    at Microsoft.Mashup.Client.UI.Shared.DataImporter.ProcessImportedQueries(IEnumerable`1 importedQueries, DataImportDestination destination)
    at Microsoft.PowerBI.Client.Windows.PowerBIDataImporter.ImportTextSource(Query query, PreviewResult previewResult, String formulaTitle)
    at Microsoft.Mashup.Client.UI.Shared.DataImporter.OnGetPreviewResult(PreviewResult preview, Query query, String sourceID, String formulaTitle, Nullable`1 explicitImportDestination, Boolean isNewQuery, Boolean isFromEditor)
    at Microsoft.Mashup.Client.UI.Shared.DataImporter.GetPreviewResult(Query query, String sourceID, String formulaTitle, Boolean isNewQuery, Boolean isFromEditor, Nullable`1 explicitImportDestination)
    at Microsoft.Mashup.Client.UI.Shared.DataImporter.<>c__DisplayClass88_1.<OnQuerySettingsResolved>b__0()
    at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
    at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at Microsoft.Mashup.Client.UI.Shared.WindowManager.ShowModal[T](T dialog, Func`1 showModalFunction)
    at Microsoft.PowerBI.Client.Program.<>c__DisplayClass4_1.<Main>b__2()
    at Microsoft.PowerBI.Client.Windows.IExceptionHandlerExtensions.<>c__DisplayClass3_0.<HandleExceptionsWithNestedTasks>b__0()
    at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
    at Microsoft.PowerBI.Client.Program.Main(String[] args)

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      HI Anonymous,

      According to the error message, I suppose this issue might be a specific device. Did this issue only appear with the current device? Have you tested with another device with the same version of power bi desktop? 

      In addition, you can also try to use diagnose command to check the system status to confirm if this is related to your system environment.

      Diagnostics, feedback, and privacy in Windows (microsoft.com)

      Use the System File Checker tool to repair missing or corrupted system files (microsoft.com)
      Regards,

      Xiaoxin Sheng

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

         

        Thank you for the suggestion. However I'm trying to use it on office laptop so I don't have the option to change laptop. Our IT does not even support System Restore to previous date. So I'm stuck and will need to fix the current machine.

        In addition to that I could not run the Diagnostics as you suggested (blocked by IT).

         

        I'm waiting to fun the system file checker and will try to repair the system files and report back if that fixes the issue.

         

         

        Regards

        Sumeet

  • To summarize:

    1. Check if webview2 is installed on the server (eg. with this solution - https://support.templafy.com/hc/en-us/articles/360017470437-How-to-check-for-and-install-WebView2.
    2. If not either:
    Run "Edit environment variables for your account" from Windows' search box
                Add the following user environment variable:
                Variable name: "PBI_enableWebView2Preview"
                Value: "0"​