FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

QoS Issue for the Week of 08/17: Cannot read property 'indexOf' of undefined

Open ruchika-m opened this issue 6 years ago • 2 comments

Describe the bug

Seeing the following failure to load component that looks like its coming from the framework code

Message: Cannot read property 'indexOf' of undefined Stack: TypeError: Cannot read property 'indexOf' of undefined at new r (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:237:6177) at Be.request (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:155:7791) at se.componentHasInitialized (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:233:17434) at se.initializeInternal (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:314:1628) at async se.initialize (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:311:624) at async se.initialize (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:233:17189) at async c.instantiateInstance (https://officefluidprodversionedcdn.azureedge.net/5476077/container/officeContainer.js:325:913)

Prettifying the callstack on callstack prettier here: https://fluidpreviewlivesitehub.azureedge.net/callstack, tells me that this is coming from requestParser

To Reproduce

Seeing this through telemetry so unfortunately have no repro steps

Logs

Use the following query to look through sessions facing the issue:

union kind = outer (Office_Fluid_OfficeWebHost_Error | where Data_eventName == "UnhandledError" or Data_eventName == "UnhandledRejection"), (Office_Fluid_OfficeWebHost_Activity_LoadComponentInDiv | where Data_inIframe=="false" | where Activity_Success=="false"), (Office_Fluid_OfficeWebHost_Activity_LoadComponentInIframe | where Activity_Success=="false"), (Office_Fluid_App_Error | where Data_isQoSError=="true") | where App_Version != '1234' or App_Version != 'NaN' | where todatetime(Event_Time) >= ago(7d) | where Data_message contains "Cannot read property 'indexOf' of undefined" | summarize dcount(Data_hostCorrelationId), any(Data_stack) by Data_message, Data_eventName, Data_hostName

ruchika-m avatar Aug 24 '20 17:08 ruchika-m

The request url is not defined, so when creating a new RequestParser it fails to find indexOf("?") within the url. The type of IRequest.url is string, so it is not expecting it to be null or undefined.

  1. A value is attempted to be set in the root map of the root component during initializingFirstTime().
  2. Then that value is fetched from the root map during hasInitialized()
  3. That value is passed as the url to ContainerRuntime.request() which eventually reaches the above breaking code

The value that is supposedly set in (1) above is when creating the Scriptor singleton component. It calls the "_create" request for scriptor type in ContainerRuntime, then it tries to get the response.value.IFluidLoadable and gets the url property of that.

arinwt avatar Aug 25 '20 18:08 arinwt

The request being passed in does not match the type defined, because the url property is undefined.

arinwt avatar Sep 03 '20 18:09 arinwt