Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

GA4 Index and length must refer to a location within the string. Parameter name: length

I could not import the data from Google Analytics due to this error:

ann_ng_0-1702278849927.png

 

The data still get updated in Edit query but I could not load it to my report. How can I fix this?

 

Status: Accepted

Hi all ,

We have seen on the internal platform that other engineers have reported this issue and submitted it. 

The engineers on the product team are now aware and will do their best to resolve the issue. I will update here if there is any progress, so please be patient ! Thank you for your cooperation !

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
alex0509
New Member

Having similar issue with GA4 connector. I'm able to load, but throws 'Length must refer to location in string' error when performing Remove Duplicates step in Power Query. 

v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi  @ann_ng 

Were you able to load data from Google Analytics properly before? If so, have you done any updates recently? What version of Desktop are you currently using to load the data that is reporting errors?

 

Best Regards,
Community Support Team _ Ailsa Tao

ann_ng
Regular Visitor

@v-yetao1-msft Yes. I was doing good with my reports and suddenly on last Wed to Thursday, I was unable to load the data with the above issue.

 

I updated the Power Bi Desktop to the latest version. But I tried to delete the app and install the older version, nothing changed.

 

I'm currently using Power BI Desktop Version: 2.123.742.0 64-bit (November 2023).

 

jfajerwerg
Regular Visitor

Hi there,

I am facing the same issue @v-yetao1-msft ! It seems it happens only when I use a dimension related to the session medium (so including sessionMedium, sessionSourceMedium, sessionDefaultChannelGroup).

Please let me know if you need more information.
I use 2.0 connector for GA4. it works if i try to load data with some other dimensions such as date, session, engagedSession, pagePath.

I have the issue both on Power BI Service using Dataflows Gen1, Gen2 and Power BI Desktop x64 (Version: 2.123.742.0 64-bit (November 2023))
 
On PBI Service, the error after 5 to 15 seconds is "Error: PipelineException: Index and length must refer to a location within the string."
JesTay97
Regular Visitor

I am also getting this!

 

need a way to get around an drefresh the report.

ann_ng
Regular Visitor

@v-yetao1-msftI am creating a different dataset named Analytics Report2 in the photo below. And it can load data to my report before I add: firstUserCampaignName, firstUserDefaultChannelGroup, firstUserMedium, firstUserSource. I think I might continue to work with my report without these dimensions.

 

The Analytics Report is the one couldn't load with the issue above.

ann_ng_1-1702365128745.png

 

jfajerwerg
Regular Visitor

@v-yetao1-msft Hello, what is the status of this issue today? This topic seems to be on "Needs info". Please let us know if you need more information. Thank you for your assistance! 

kletterbilder
Frequent Visitor

Hi, 

 

I have the same problem. I figured out following problems. I checked each field one by one and found out the all field with Medium are not working right now. I need this informations back in my report. Who can help us?

 

Here my overview. After the "//" you will find if it is working or not.

 

{Cube.AddAndExpandDimensionColumn, "date", {"date"}, {"date"}},                                                    //is working
{Cube.AddAndExpandDimensionColumn, "isoWeek", {"isoWeek"}, {"isoWeek"}},                                           //is working
{Cube.AddAndExpandDimensionColumn, "isoYear", {"isoYear"}, {"isoYear"}},                                           //is working
{Cube.AddAndExpandDimensionColumn, "pagePath", {"pagePath"}, {"pagePath"}},                                        //is working
//{Cube.AddAndExpandDimensionColumn, "sourceMedium", {"sourceMedium"}, {"sourceMedium"}},                              //not working
//{Cube.AddAndExpandDimensionColumn, "sessionMedium", {"sessionMedium"}, {"sessionMedium"}},                           //not working
//{Cube.AddAndExpandDimensionColumn, "medium", {"medium"}, {"medium"}},                                                //not working
//{Cube.AddAndExpandDimensionColumn, "firstUserMedium", {"firstUserMedium"}, {"firstUserMedium"}},                     //not working
//{Cube.AddAndExpandDimensionColumn, "firstUserSourceMedium", {"firstUserSourceMedium"}, {"firstUserSourceMedium"}},   //not working
//{Cube.AddAndExpandDimensionColumn, "sessionSourceMedium", {"sessionSourceMedium"}, {"sessionSourceMedium"}},         //not working
//{Cube.AddAndExpandDimensionColumn, "sessionSa360Medium", {"sessionSa360Medium"}, {"sessionSa360Medium"}},            //working - but empty
{Cube.AddAndExpandDimensionColumn, "source", {"source"}, {"source"}},                                              //is working
{Cube.AddMeasureColumn, "totalUsers", "totalUsers"}                                                                //is working

 

 

660420id
Regular Visitor

Hello, @v-yetao1-msft I'm also having the same issue with the GA4 connector. I'm unable to refresh the data in my reports.

 

This is the error meesage I receive: 

Index and length must refer to a location within the string.
Parameter name: length

Microsoft.Mashup.Evaluator.Interface.ErrorException

True

 

I've copied the details below.

 

 

Feedback Type:
Frown (Error)

Timestamp:
2023-12-13T17:26:02.6778908Z

Release:
November 2023

Product Version:
2.123.742.0 (23.11) (x64)

Stack Trace:
Microsoft.Mashup.Host.Document.SerializedException
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.MessageBasedInputStream.ReadNextChunkAndCheckIfClosed()
at Microsoft.Mashup.Evaluator.MessageBasedInputStream.ReadNextChunk()
at Microsoft.Mashup.Common.ChunkedInputStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.OleDb.Serialization.PageReader.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.OleDb.Serialization.PageReader.ReadChars(Int32 count)
at Microsoft.OleDb.Serialization.PageReader.ReadArray(String[] values, Int32 offset, Int32 count)
at Microsoft.OleDb.NullableColumn.Deserialize(PageReader reader)
at Microsoft.OleDb.Serialization.ColumnsPage.Deserialize(PageReader reader)
at Microsoft.OleDb.Serialization.OleDbPageReader.Read(ColumnsPage page)
at Microsoft.Mashup.Common.IPageReaderExtensions.NotifyingPageReader.Read(IPage page)
at Microsoft.Mashup.Engine.Interface.Tracing.TracingPageReader.Read(IPage page)
at Microsoft.Mashup.Evaluator.SoftCancellingDocumentEvaluator.DataReaderSourceEvaluation.SoftCancellingDataReaderSource.SoftCancellingPageReader.Read(IPage page)
at Microsoft.Mashup.OleDbProvider.DataHost.NonBufferingMashupEvaluator.MashupEvaluation.ExceptionResolverPageReader.Read(IPage page)
at Microsoft.Mashup.Common.IPageReaderExtensions.NotifyingEndOfAllResultsPageReader.Read(IPage page)
at Microsoft.Mashup.Engine.Interface.Tracing.TracingPageReader.Read(IPage page)
at Microsoft.Mashup.Common.IPageReaderExtensions.NotifyingEndOfAllResultsPageReader.Read(IPage page)
at Microsoft.OleDb.Serialization.PageReaderRowset.ReadNextPage()
at Microsoft.OleDb.Serialization.PageReaderRowset.Microsoft.OleDb.IRowset.GetNextRows(HCHAPTER hchapter, DBROWOFFSET lRowsOffset, DBROWCOUNT cRows, DBCOUNTITEM& countRowsObtained, HROW** pRows)
at Microsoft.OleDb.Rowset.Microsoft.OleDb.IRowset.GetNextRows(HCHAPTER hReserved, DBROWOFFSET lRowsOffset, DBROWCOUNT cRows, DBCOUNTITEM& countRowsObtained, HROW** pRows)
at Microsoft.Mashup.OleDbProvider.TracingRowset.Microsoft.OleDb.IRowset.GetNextRows(HCHAPTER hReserved, DBROWOFFSET lRowsOffset, DBROWCOUNT cRows, DBCOUNTITEM& countRowsObtained, HROW** pRows)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.123.742.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Host.Document.SerializedException - Microsoft.Mashup.Evaluator.Interface.ErrorException","MethodDef":"OnException","ErrorOffset":"","ErrorCode":""}

 

 

jfajerwerg
Regular Visitor

To everyone who is facing the same issue, please upvote the original post by hitting the like button, so we can capture Microsoft's interest.