HaikuTeam / core

:rice: Interactive UI animation engine for the Web. Core renderer for Haiku Animator.
https://www.haikuforteams.com
Other
763 stars 42 forks source link

timeline.matchesCriteria is not a function #14

Closed paulgalarza closed 6 years ago

paulgalarza commented 6 years ago

I have the next issue apparently with Haiku. When I make a build and run on local It works fine but when I deploy on my https web page It just doesn't work.

HaikuTimeline.js?abdd:411 Uncaught TypeError: timeline.matchesCriteria is not a function
    at eval (HaikuTimeline.js?abdd:411)
    at Array.filter (<anonymous>)
    at Function.HaikuTimeline.where (HaikuTimeline.js?abdd:410)
    at HaikuComponent.fetchTimelines (HaikuComponent.js?4537:325)
    at eval (HaikuComponent.js?4537:315)
    at HaikuComponent.HaikuBase.cacheFetch (HaikuBase.js?419e:78)
    at HaikuComponent.getTimelines (HaikuComponent.js?4537:314)
    at HaikuComponent.assignConfig (HaikuComponent.js?4537:258)
    at new HaikuComponent (HaikuComponent.js?4537:110)
    at new HaikuContext (HaikuContext.js?b900:80)
    at HaikuComponentFactory (HaikuContext.js?b900:338)
    at ProxyComponent.HaikuReactDOMAdapter.HaikuReactComponentInternal.createContext (HaikuReactDOMAdapter.js?4056:138)
    at ProxyComponent.wrappedMethod (react-hot-loader.development.js?d9b4:502)
    at ProxyComponent.HaikuReactDOMAdapter.HaikuReactComponentInternal.attemptMount (HaikuReactDOMAdapter.js?4056:60)
    at ProxyComponent.wrappedMethod (react-hot-loader.development.js?d9b4:502)
    at ProxyComponent.HaikuReactDOMAdapter.HaikuReactComponentInternal.componentDidMount (HaikuReactDOMAdapter.js?4056:56)
    at ProxyComponent.wrappedMethod (react-hot-loader.development.js?d9b4:492)
    at commitLifeCycles (react-dom.development.js?5cd0:8770)
    at commitAllLifeCycles (react-dom.development.js?5cd0:9946)
    at HTMLUnknownElement.callCallback (react-dom.development.js?5cd0:542)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?5cd0:581)
    at invokeGuardedCallback (react-dom.development.js?5cd0:438)
    at commitRoot (react-dom.development.js?5cd0:10050)
    at performWorkOnRoot (react-dom.development.js?5cd0:11017)
    at performWork (react-dom.development.js?5cd0:10967)
    at requestWork (react-dom.development.js?5cd0:10878)
    at scheduleWorkImpl (react-dom.development.js?5cd0:10732)
    at scheduleWork (react-dom.development.js?5cd0:10689)
    at Object.enqueueSetState (react-dom.development.js?5cd0:6212)
    at ProxyComponent.Component.setState (react.development.js?a3af:237)
    at ProxyComponent._callee8$ (index.js?4b73:670)
    at tryCatch (runtime.js?d004:62)
    at Generator.invoke [as _invoke] (runtime.js?d004:296)
    at Generator.prototype.(/anonymous function) [as next] (webpack-internal:///../../../regenerator-runtime/runtime.js:114:21)
    at step (index.js?4b73:481)
    at eval (index.js?4b73:481)
(anonymous) @ HaikuTimeline.js?abdd:411
HaikuTimeline.where @ HaikuTimeline.js?abdd:410
HaikuComponent.fetchTimelines @ HaikuComponent.js?4537:325
(anonymous) @ HaikuComponent.js?4537:315
HaikuBase.cacheFetch @ HaikuBase.js?419e:78
HaikuComponent.getTimelines @ HaikuComponent.js?4537:314
HaikuComponent.assignConfig @ HaikuComponent.js?4537:258
HaikuComponent @ HaikuComponent.js?4537:110
HaikuContext @ HaikuContext.js?b900:80
HaikuComponentFactory @ HaikuContext.js?b900:338
HaikuReactDOMAdapter.HaikuReactComponentInternal.createContext @ HaikuReactDOMAdapter.js?4056:138
wrappedMethod @ react-hot-loader.development.js?d9b4:502
HaikuReactDOMAdapter.HaikuReactComponentInternal.attemptMount @ HaikuReactDOMAdapter.js?4056:60
wrappedMethod @ react-hot-loader.development.js?d9b4:502
HaikuReactDOMAdapter.HaikuReactComponentInternal.componentDidMount @ HaikuReactDOMAdapter.js?4056:56
wrappedMethod @ react-hot-loader.development.js?d9b4:492
commitLifeCycles @ react-dom.development.js?5cd0:8770
commitAllLifeCycles @ react-dom.development.js?5cd0:9946
callCallback @ react-dom.development.js?5cd0:542
invokeGuardedCallbackDev @ react-dom.development.js?5cd0:581
invokeGuardedCallback @ react-dom.development.js?5cd0:438
commitRoot @ react-dom.development.js?5cd0:10050
performWorkOnRoot @ react-dom.development.js?5cd0:11017
performWork @ react-dom.development.js?5cd0:10967
requestWork @ react-dom.development.js?5cd0:10878
scheduleWorkImpl @ react-dom.development.js?5cd0:10732
scheduleWork @ react-dom.development.js?5cd0:10689
enqueueSetState @ react-dom.development.js?5cd0:6212
Component.setState @ react.development.js?a3af:237
_callee8$ @ index.js?4b73:670
tryCatch @ runtime.js?d004:62
invoke @ runtime.js?d004:296
prototype.(anonymous function) @ runtime.js?d004:114
step @ index.js?4b73:481
(anonymous) @ index.js?4b73:481
Promise.then (async)
step @ index.js?4b73:481
(anonymous) @ index.js?4b73:481
(anonymous) @ index.js?4b73:481
RouteData._this2.loadRouteData @ index.js?4b73:680
componentWillMount @ index.js?4b73:688
wrappedMethod @ react-hot-loader.development.js?d9b4:502
callComponentWillMount @ react-dom.development.js?5cd0:6370
mountClassInstance @ react-dom.development.js?5cd0:6435
updateClassComponent @ react-dom.development.js?5cd0:7840
beginWork @ react-dom.development.js?5cd0:8225
performUnitOfWork @ react-dom.development.js?5cd0:10224
workLoop @ react-dom.development.js?5cd0:10288
callCallback @ react-dom.development.js?5cd0:542
invokeGuardedCallbackDev @ react-dom.development.js?5cd0:581
invokeGuardedCallback @ react-dom.development.js?5cd0:438
renderRoot @ react-dom.development.js?5cd0:10366
performWorkOnRoot @ react-dom.development.js?5cd0:11014
performWork @ react-dom.development.js?5cd0:10967
requestWork @ react-dom.development.js?5cd0:10878
scheduleWorkImpl @ react-dom.development.js?5cd0:10732
scheduleWork @ react-dom.development.js?5cd0:10689
scheduleTopLevelUpdate @ react-dom.development.js?5cd0:11193
updateContainer @ react-dom.development.js?5cd0:11231
(anonymous) @ react-dom.development.js?5cd0:15226
unbatchedUpdates @ react-dom.development.js?5cd0:11102
renderSubtreeIntoContainer @ react-dom.development.js?5cd0:15225
render @ react-dom.development.js?5cd0:15290
render @ index.js?84b3:14
(anonymous) @ index.js?84b3:18
(anonymous) @ index.js?84b3:19
../../../../src/index.js @ app.225e5abc.js:1149
__webpack_require__ @ app.225e5abc.js:679
fn @ app.225e5abc.js:89
0 @ app.225e5abc.js:5822
__webpack_require__ @ app.225e5abc.js:679
(anonymous) @ app.225e5abc.js:725
(anonymous) @ app.225e5abc.js:728
index.js?4bfd:2177 The above error occurred in the <HaikuReactComponentInternal> component:
    in HaikuReactComponentInternal (created by Unknown)
    in div (created by StyledComponents__MainAnimation)
    in StyledComponents__MainAnimation (created by Unknown)
    in div (created by StyledComponents__MainSection)
    in StyledComponents__MainSection (created by Unknown)
    in div (created by Unknown)
    in div (created by StyledComponents__HomeContainer)
    in StyledComponents__HomeContainer (created by Unknown)
    in div (created by Unknown)
    in Unknown (created by RouteData)
    in RouteData (created by Route)
    in Route (created by withRouter(RouteData))
    in withRouter(RouteData) (created by ConnectedRouteData)
    in ConnectedRouteData (created by Route)
    in Route (created by Routes)
    in Routes (created by App)
    in div (created by App__AppStyles)
    in App__AppStyles (created by App)
    in RouterScroller (created by Route)
    in Route (created by withRouter(RouterScroller))
    in withRouter(RouterScroller) (created by Router)
    in Router (created by Router)
    in Router (created by App)
    in App (created by HotExportedApp)
    in AppContainer (created by HotExportedApp)
    in HotExportedApp

React will try to recreate this component tree from scratch using the error boundary you provided, Router.
matthewtoast commented 6 years ago

Hi @paulgalarza! I may need to see the way your host codebase is set up exactly in order to know what is going on. Would you be able to share the code with me so I can take a look? Feel free email us directly at contact@haiku.ai.

paulgalarza commented 6 years ago

The problem was after run Object.keys(window.HaikuCore) 2 haiku core version was printed ["3.2.19", "3.4.6"].

I just create a new version of every haiku animation, update dependencies and haiku core version was just on ["3.4.6"]

Thanks hauku team for helping me.