microsoft / PowerBI-visuals-tools

Contains tools for building/packaging Power BI visuals
https://www.powerbi.com
MIT License
334 stars 150 forks source link

Touch events on PowerBI Desktop throw an error #67

Closed Knagis closed 1 year ago

Knagis commented 7 years ago

Copy from https://github.com/Microsoft/PowerBI-visuals/issues/124 - perhaps this repository is being monitored as opposed to that one.


When using our library within a custom visual in Power BI Desktop app, each tap produces an error.

As far as I can tell, it is not caused directly by our code since I can remove all event handlers and still the error is shown. Also the charts do process the events correctly (once the error popup is closed). Though it should be noted that the debugging of the visual within the desktop app is very problematic.

Strangely in the desktop app the visual receives TouchEvent-s and not PointerEvent-s which should be the case since it seems that the app uses IE WebBrowser control.

The pbix file: https://dl.dropboxusercontent.com/u/398967/test1.pbix

Feedback Type:
Frown (Error)

Timestamp:
2017-01-20T11:12:22.7140122Z

Local Time:
2017-01-20T13:12:22.7140122+02:00

Product Version:
2.42.4611.701 (PBIDesktop) (x64)

Release:
January 2017

IE Version:
11.713.10586.0

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

CLR Version:
4.6.1 or later [Release Number = 394254]

Workbook Package Info:
1* - lv-LV, fastCombine: Disabled.

Peak Working Set:
391 MB

Private Memory:
268 MB

Peak Virtual Memory:
34 GB

JS Error Message:
Cannot read property 'length' of undefined

Error Message:
An error occurred while rendering the report.

Stack Trace:
Microsoft.Mashup.Host.Document.JavaScriptException: An error occurred while rendering the report.
TypeError: Cannot read property 'length' of undefined
    at HTMLDocument.<anonymous> (ms-pbi://pbi.microsoft.com/minerva/scripts/powerbi.common.externals.js:46532:53)
    at SandboxDelegate.onRelayMouseEvent (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostUI.js:1027:66)
    at SandboxVisualProxy.onMessageReceived (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostUI.js:519:278)
    at ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostUI.js:459:34
    at WindowMessageProxy.invokeHandler (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostCore.js:1557:38)
    at WindowMessageProxy.dispatchMessage (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostCore.js:1547:26)
    at WindowMessageProxy.onMessageReceived (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostCore.js:1532:30)
    at WindowMessageProxy.windowMessageHandler (ms-pbi://pbi.microsoft.com/minerva/scripts/VisualHostCore.js:1452:34)
    at n.event.dispatch (ms-pbi://pbi.microsoft.com/opensource/jquery/jquery-2.1.1.js:3:6404)
    at r.handle (ms-pbi://pbi.microsoft.com/opensource/jquery/jquery-2.1.1.js:3:3179)

Invocation Stack Trace:
   at Microsoft.Mashup.Host.Document.ExceptionExtensions.GetCurrentInvocationStackTrace()
   at Microsoft.Mashup.Client.ClientShared.StackTraceInfo..ctor(String exceptionStackTrace, String invocationStackTrace)
   at Microsoft.Mashup.Client.ClientShared.FeedbackErrorInfo..ctor(String message, Nullable`1 errorCode, String requestId, Exception exception)
   at Microsoft.Mashup.Client.ClientShared.UnexpectedExceptionHandler.<>c__DisplayClass1.<HandleException>b__0()
   at Microsoft.Mashup.Host.Document.SynchronizationContextExtensions.<>c__DisplayClass3.<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.ClientShared.WindowManager.ShowDialog[T](T form, IWin32Window owner)
   at Microsoft.PowerBI.Client.Program.<>c__DisplayClassb.<Main>b__0()
   at Microsoft.Mashup.Host.Document.ExceptionHandlerExtensions.HandleExceptions(IExceptionHandler exceptionHandler, Action action)
   at Microsoft.PowerBI.Client.Program.Main(String[] args)

User ID:
66b57a27-b5e9-4fdf-a29a-2bae3df2cc3f

Session ID:
a496c78c-6729-46c2-adca-f343acdf72b2

Telemetry Enabled:
True

Model Default Mode:
Import

Snapshot Trace Logs:
C:\Users\knagis\AppData\Local\Microsoft\Power BI Desktop\FrownSnapShot1495795172.zip

Performance Trace Logs:
C:\Users\knagis\AppData\Local\Microsoft\Power BI Desktop\PerformanceTraces.zip

Disabled Preview Features:
PBI_RedShift
PBI_Impala
PBI_Snowflake
PBI_shapeMapVisualEnabled
PBI_allowBiDiCrossFilterInDirectQuery
PBI_clusteringEnabled
PBI_esriEnabled

Disabled DirectQuery Options:
DirectQuery_Unrestricted

Cloud:
GlobalCloud

Recent Actions:
VisualConversion, VisualConversion

DPI Scale:
100%

Supported Services:
Power BI

Formulas:

section Section1;

shared hr = let
    Source = Excel.Workbook(File.Contents("C:\Users\Demo\Desktop\hr.xlsx"), null, true),
    hr_Sheet = Source{[Item="hr",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(hr_Sheet),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Name", type text}, {"Title", type text}, {"Department", type text}, {"Region", type text}, {"Date", type date}, {"Payout", Int64.Type}, {"Seniority", type text}})
in
    #"Changed Type";

Active Section Contract:
{"id":0,"name":"ReportSection","displayName":"Page 1","ordinal":0,"visualContainers":[{"x":640.3888213851762,"y":66.48845686512759,"z":1,"width":601.895504252734,"height":303.57229647630624,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":640.3888213851762,\"y\":66.48845686512759,\"z\":1,\"width\":601.895504252734,\"height\":303.57229647630624}}],\"singleVisual\":{\"visualType\":\"PBI_CV_33C9F325_D337_408C_98D4_E1D4E1EAD704\",\"projections\":{\"Values\":[{\"queryRef\":\"Sum(hr.Payout)\"}],\"Category\":[{\"queryRef\":\"hr.Department\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"h\",\"Entity\":\"hr\"}],\"Select\":[{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Payout\"}},\"Function\":0},\"Name\":\"Sum(hr.Payout)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Department\"},\"Name\":\"hr.Department\"}]}},\"name\":\"VisualContainer\"}"},{"x":23.620899149453223,"y":25.370595382746053,"z":2,"width":633.3900364520049,"height":624.6415552855408,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":23.620899149453223,\"y\":25.370595382746053,\"z\":2,\"width\":633.3900364520049,\"height\":624.6415552855408}}],\"singleVisual\":{\"visualType\":\"PBI_CV_33C9F325_D337_408C_98D4_E1D4E1EAD703\",\"projections\":{\"Category\":[{\"queryRef\":\"hr.Region\"},{\"queryRef\":\"hr.Seniority\"}],\"Values\":[{\"queryRef\":\"Sum(hr.Payout)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"h\",\"Entity\":\"hr\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Region\"},\"Name\":\"hr.Region\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Payout\"}},\"Function\":0},\"Name\":\"Sum(hr.Payout)\"},{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Seniority\"},\"Name\":\"hr.Seniority\"}]}},\"name\":\"VisualContainer1\"}"},{"x":738.3718104495748,"y":397.1810449574727,"z":3,"width":412.92831105710815,"height":279.951397326853,"config":"{\"layouts\":[{\"id\":0,\"position\":{\"x\":738.3718104495748,\"y\":397.1810449574727,\"z\":3,\"width\":412.92831105710815,\"height\":279.951397326853}}],\"singleVisual\":{\"visualType\":\"PBI_CV_33C9F325_D337_408C_98D4_E1D4E1EAD705\",\"projections\":{\"Category\":[{\"queryRef\":\"hr.Date\"}],\"Values\":[{\"queryRef\":\"Sum(hr.Payout)\"}]},\"prototypeQuery\":{\"Version\":2,\"From\":[{\"Name\":\"h\",\"Entity\":\"hr\"}],\"Select\":[{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Date\"},\"Name\":\"hr.Date\"},{\"Aggregation\":{\"Expression\":{\"Column\":{\"Expression\":{\"SourceRef\":{\"Source\":\"h\"}},\"Property\":\"Payout\"}},\"Function\":0},\"Name\":\"Sum(hr.Payout)\"}]}},\"name\":\"VisualContainer2\"}"}],"displayOption":1,"width":1280,"height":720,"config":"{}"}
Knagis commented 7 years ago

Are there any plans to address this issue?

AleksSavelev commented 1 year ago

Closing due to age