coopermaruyama / tableau-react

Tableau React component integrated with Tableau JS API.
MIT License
77 stars 60 forks source link

serialized.indexOf is not a function console error #12

Closed daraclare closed 4 years ago

daraclare commented 5 years ago

Hi, thanks for the library! Issue: Using React 16.6 and Next 7, I'm getting this error in the console:

Uncaught TypeError: serialized.indexOf is not a function
    at Function.tab__ApiCommand$parse [as parse] (tableau-2.0.0.js:731)
    at tab__crossDomainMessageRouter$_handleCrossDomainMessage [as _handleCrossDomainMessage] (tableau-2.0.0.js:1025)
    at tab__crossDomainMessageRouter.<anonymous> (tableau-2.0.0.js:1017)
    at delegate (tableau-2.0.0.js:181)

It looks like serialized is an object, not a string or an array, so indexOf is not a valid function:

serialized: Object
reactBuildType: "development"
source: "react-devtools-detector"

Would updating to tableau-2.2.2.js resolve this? Or is this a problem when in development mode only?

Thanks in advance!

Hartzi commented 5 years ago

Any update to this?

coopermaruyama commented 5 years ago

Hi, this seems to be an issue in the child dependency of tableau-api which uses tablueau-2.0.0.js

I no longer maintain this package, but it should be relatively easy to just add the new version into this repo and remove the child dependency. Feel free to open a PR

voglster commented 5 years ago

Looks like he opened a PR that points to Tableau 2.2.2 #14 by pointing to a different npm installable repo with that version in it. Can we get it merged?

kinly-wmusial commented 5 years ago

Hi, PR seems good to me, hopefully we can merge it soon.

glaucopater commented 5 years ago

Hi, is there any update about the merge? Thx!

coopermaruyama commented 4 years ago

Sorry for the delay. I checked it, it was not wrapped correctly. I just published a new version using 2.3.0 which can be installed using npm install tableau-react@beta