getMarksAsync() sometimes throws "Enum Mapping not found" error
Frequently when I call the getMarksAsync() method from an event listener that fired when selecting a header, I get an "Enum Mapping not found" error coming from the api-platfor-js.js file. The line that throws the error references an unhanded promise rejection.

We are experiencing the same issue. It also sometimes happens when you exclude data from your summarydata sheet.
this is happening to me as well. It has me pretty much dead in the water. Does anyone have any solution? I have tried every trick in the book.
its actually happening here:

The "Enum Mapping not found" is not the real problem. That error is just coming up because "internalError.errorCode" is undefined. the real error message is
"Error: ExecuteCommand failed, with result: null"
Can someone provide server logs for this? Or if this is happening in desktop, the desktop logs? That way we can take a look at the underlying issue. I am opening a bug to deal with the "Enum Mapping not found" but that does not appear to be the root of the issue. Thanks!
Its happening on desktop for me, where can i find the logs for that? @LGraber
@LGraber i have my desktop logs for you. I deleted the existing and got a fresh set where i did was open tableau, reproduce the issue and close. How can i send them to you?
Logs.zip neveremind here they are, i just wanted to check them and make sure no passwords were embedded in them.
Thanks Jacob. I looked through your log and found the error that is actually occuring underneath the Enum Mapping problem. I will add this info to our bug and someone will take a look at it. Apologies for couple of days delay. We are going to get better at following issues on this channel. Thanks
Great, thanks. Is there anything i can do on my end to get around/prevent the issue from occurring?
We are experiencing this issue as well.
This is becoming a huge sticking point for an enterprise dashboard. Is there a timeline for a fix?
I am not sure all of you are experiencing the same issue (unless you all work for the same company). I can't give you an exact timeline but we are working on the fix(es). The question is whether others are hitting the same assert. As for avoiding it ... let me see. There are a lot of team members out right now so turn around time is not great for issues but I will see what we can find
@kostenickj The error is on line 2967 of your log.txt file. I don't know how to fix that or workarounds for it, but maybe you can figure out something for yourself based on what your repro steps are and the errors around that line.
@MichaelHallak @mcenergy The issue here is that this error is misleading, please check your logs / console to find the underlying error and attempt to fix that instead.
In the meantime, we'll work on getting this 'enum mapping not found' removed and not confusing people.
Can anyone hitting this issue post their api version on this thread? Would be great to know what versions are having this issue. Thanks!
Is this still an issue? Currently I'm working with the latest version of the extensions API and this is happening to me. It seems the call to await event.getMarksAsync(); is being triggered twice. Could this be possible?
$(document).ready(function () {
tableau.extensions.initializeAsync().then(() => {
try {
let worksheets = tableau.extensions.dashboardContent.dashboard.worksheets;
const usaWS = worksheets.find(ws => ws.name === 'usa');
data_sources_list.push(usaWS.getDataSourcesAsync());
usaWS.addEventListener(
tableau.TableauEventType.MarkSelectionChanged, rate);
}
catch(err) {
console.log(err);
}
});
});
//this event seems to be trigger twice. Even though I only click once in worksheet row
const rate = async event => {
let data = await event.getMarksAsync();
data = data.data[0];
let dataSources = await event.worksheet.getDataSourcesAsync();
// I had to add this check because this event function gets trigger twice
// the second time, it fails because data.columns is null
if(!data || !data.columns || !data.columns.find(col => col.fieldName === FEEDBACK_FIELD_NAME)){
alert(data)
console.log("something is happening here");
console.log(data);
return;
}
... more code below
```
Hi @github4es I just verified that the event is fired once. Remember that it will fire for a selection, but also for a non-selection. For example, click on a mark, then click into another window, clicking back on the viz will unselect the current mark, and fire the event again. Also, dashboard actions can cause selections. If none of these are at play, and you are still seeing a double event, please share a non-confidential workbook that we could help figure out what is happening. John
@johnDance yes. I've verified that the event triggers when you click on it and also when you move somewhere else to select something else. thanks.