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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Marcisshadow
Frequent Visitor

AI: StringValueTooLong on Embedded Report

Hi folks - I'm getting a JS Console error when clicking a bar in a 100% stacked bar visual on an embedded report. The report works perfectly on PBI Service and in PBI Desktop, and was working perfectly via embedded for a month or so until today (no changes to the report have occurred at our end)... error appears to only be thrown when embedded, and we're at a loss as to whether the issue is in our Report structure, our Data, or something to do with PBI JS Internals...

 

The issue occurs in all browsers on both Win 10 Pro and MacOS, and we're at a complete loss as to how to investigate further.

 

 

ai.0.js:1 AI: StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:Throwing exception: {\name\:\BasicFilterOperatorNotFound\,\message\:\Basic filter requires an operator (In | Not).\}.\nStack:\nError\n    at Object.o [as error] (https://app.powerbi.com/13.0.11747.192/scripts/powerbiportal.dependencies.bundle.min.js:14:19603)\n    at Object.g [as throwException] (https://app.powerbi.com/13.0.11747.192/scripts/powerbiportal.dependencies.bundle.min.js:12:28553)\n    at Object.l [as getOperator] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:18263)\n    at Object.i [as serializeFilter] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:16893)\n    at Object.n [as fromSemanticFilter] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:13774)\n    at https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:5744\n    at Array.map (<anonymous>)\n    at r.tryGetFilters (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:5701)\n    at r.tryGetSelectedDataPoints (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilt}"
o.warnToConsole @ ai.0.js:1
o.throwInternal @ ai.0.js:1
t.sanitizeString @ ai.0.js:1
t.sanitizeProperties @ ai.0.js:1
n @ ai.0.js:1
n.trackEvent @ ai.0.js:1
e.trackEventInternal @ reportEmbed.min.js:1
e.endTimedEvent @ reportEmbed.min.js:1
e.logEvent @ reportEmbed.min.js:1
e.logEvent @ reportEmbed.min.js:1
e.logEventInternal @ reportEmbed.min.js:1
e.logTrace @ reportEmbed.min.js:1
p @ powerbiportal.dependencies.bundle.min.js:14
o @ powerbiportal.dependencies.bundle.min.js:14
g @ powerbiportal.dependencies.bundle.min.js:12
l @ jsonfilter.min.js:1
i @ jsonfilter.min.js:1
n @ jsonfilter.min.js:1
(anonymous) @ jsonfilter.min.js:1
r.tryGetFilters @ jsonfilter.min.js:1
r.tryGetSelectedDataPoints @ jsonfilter.min.js:1
(anonymous) @ jsonfilter.min.js:1
r @ reportembed.common.bundle.min.js:21
(anonymous) @ reportembed.common.bundle.min.js:21
a @ reportembed.common.bundle.min.js:21
(anonymous) @ reportembed.externals.bundle.min.js:1337
$digest @ reportembed.externals.bundle.min.js:1348
(anonymous) @ reportEmbed.min.js:1
i @ reportEmbed.min.js:1
t.__tryOrUnsub @ reportEmbed.min.js:1
t.next @ reportEmbed.min.js:1
t._next @ reportEmbed.min.js:1
t.next @ reportEmbed.min.js:1
t.next @ reportEmbed.min.js:1
t.emit @ reportEmbed.min.js:1
__ @ reportEmbed.min.js:1
onHasTask @ reportEmbed.min.js:1
t.hasTask @ reportembed.externals.bundle.min.js:1197
t._updateTaskCount @ reportembed.externals.bundle.min.js:1197
e._updateTaskCount @ reportembed.externals.bundle.min.js:1197
e.runTask @ reportembed.externals.bundle.min.js:1197
y @ reportembed.externals.bundle.min.js:1197
e.invokeTask @ reportembed.externals.bundle.min.js:1197
_ @ reportembed.externals.bundle.min.js:1197
b @ reportembed.externals.bundle.min.js:1197
Show 15 more frames from Library code

 

Any suggestions...?!

 

13 REPLIES 13
mholloway
Frequent Visitor

It's now 2022 and I'm seeing these errors, with no resolution noted in this years-old thread. Anybody have meaningful input on what actually causes this error message, and how to resolve it?

Glide
New Member

Same error here.

Additionally, I have some source map errors on both Chrome & Firefox browsers (Linux):

 

DevTools failed to load source map: Could not parse content for https://app.powerbi.com/13.0.18354.31/scripts/ai.0.js.map: Unexpected token < in JSON at position 2
DevTools failed to load source map: Could not load content for https://content.powerapps.com/resource/powerbiwfe/scripts/interact.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

 

But not sure it has anything to do with the "StringValueTooLong" error, which BTW I only see in Chrome.

Anyway the embedded report appears as if we are not logged in (on both browsers).

 

Report was showing fine previously and still showing on a host where I had it running before, seems like due to the cache because it's crashing on an incognito instance of this same host.

DPC-CSOFFSHORE
New Member

Any update on the subject please...

Check the default values saved in your original PBIX file's slicers, filters & measures for a reference to a value that is no longer actually present / available in the dataset... fix any you find to a value that IS available. Save and republish. (I think!)

(ai.0.js needs rewriting by [whoever at MS] to gracefully handle this specific error type being thrown by PowerBI js embedding client) rather than crashing JS out.

dnair322
Microsoft Employee
Microsoft Employee

@Marcisshadow  Hi, Did we get any solution for this issue? Even I am facing the same problem.

xli629b
Helper II
Helper II

I am seeing a similar error intermittently with a report with slicers:

ai.0.js:1 AI: StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:TypeError: n.ignoreDefaultFilter is not a function\n    at Object.d [as convert] (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:2:31520)\n    at i.converter (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:4:17770)\n    at i.render (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:4:16809)\n    at v.renderSlicer (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:3:10989)\n    at v.render (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:3:10681)\n    at v.dataChanged (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:3:8140)\n    at v.update (https://app.powerbi.com/13.0.11888.316/scripts/slicerVisual.min.js:3:7887)\n    at r.<anonymous> (https://app.powerbi.com/13.0.11888.316/scripts/reportembed.common.bundle.min.js:42:6863)\n    at r (https://app.powerbi.com/13.0.11888.316/scripts/reportembed.common.bundle.min.js:21:18460)\n    at Object.next (https://app.powerbi.com/13.0.11888.316/scripts/reportembed.common.}"

 

raghuyt
Regular Visitor

@Marcisshadow  Are you solve these issues? I am also facing the same when I select table type visual 

For More details

 ai.0.js:1 AI: StringValueTooLong message:"string value is too long. It has been truncated to 1024 characters." props:"{value:Throwing exception: {\name\:\BasicFilterOperatorNotFound\,\message\:\Basic filter requires an operator (In | Not).\}.\nStack:\nError\n at Object.o [as error] (https://app.powerbi.com/13.0.11747.192/scripts/powerbiportal.dependencies.bundle.min.js:14:19603)\n at Object.g [as throwException] (https://app.powerbi.com/13.0.11747.192/scripts/powerbiportal.dependencies.bundle.min.js:12:28553)\n at Object.l [as getOperator] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:18263)\n at Object.i [as serializeFilter] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:16893)\n at Object.n [as fromSemanticFilter] (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:13774)\n at https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:5744\n at Array.map (<anonymous>)\n at r.tryGetFilters (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilter.min.js:1:5701)\n at r.tryGetSelectedDataPoints (https://app.powerbi.com/13.0.11747.192/scripts/jsonfilt}"

No - I suspect it's due to the version of powerbi.min.js that the embedding website is using (v2.2.6, whereas latest is v2.10.3), but can't get any confirmation on that at the moment.

Further up the tree... I now suspect an issue in https://github.com/microsoft/ApplicationInsights-JS (a dependency of PowerBI-client). I’m getting similar errors when trying to switch various MS service pages (eg: Graph Security) to new preview mode also, so this is definitely coming from something upstream of the powerbi-client JS package that’s common to a lot of MS JS SDKs.

@Marcisshadow  Thank you for your responses, we have not added ApplicationInsights-JS services in our power bi and also I am added updated(new version v2.10.2 ) powerbi.js file, no use it's showing the same error.

You don't need to add it, it's brought in automatically whenever you initialise the powerbi javascript client (check your JS Console and look for ai.0.js appearing in network or resources once you've gone to load the report)

yes @Marcisshadow  (https://app.powerbi.com/13.0.11747.247/scripts/ai.0.js) it's loading from the network, so then we need to wait for Microsoft power bi report team response 

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.