danimic Posted June 28, 2021 Report Share Posted June 28, 2021 Hello, I'm begining to deal with the Ftrack api and since my idea is to make a Next.js app, I'm using the javascript API. Following the example codes, I can create a session and do queries without issues. But now I'm trying to use the eventhub and following the example code I'm doing: const session = new Session( "https://ftrackurl:443", "FTRACKUSER", "FTRACKKEY", { autoConnectEventHub: true } ); session.eventHub.isConnected();... So I'm including the port in the server url. When I try to run the application I'm receiving the following error: TypeError: Cannot read property 'port' of undefined I also tried: session.initializing.then(function () { console.info("API session initialized successfully."); session.eventHub.connect(); session.eventHub.isConnected(); }).catch(error => console.log(error)); but I got the same error. What am I doing wrong? Thanks Link to comment Share on other sites More sharing options...
Henrik Norin Posted July 5, 2021 Report Share Posted July 5, 2021 Hi, I verified your code and could not get the issue you are reporting (testing on 4.7.0.current.13.277). Could you please create a ticket at support@ftrack.com and supply your ftrack details - ftrack url (and version, if onprem). Cheers /Henrik danimic 1 Link to comment Share on other sites More sharing options...
Guest Posted July 14, 2021 Report Share Posted July 14, 2021 We've updated the docs to clarify that the Event Hub is not supported under Node. Please let us know if you encountered this error in some other environment. https://ftrack-javascript-api.readthedocs.io/en/latest/handling_events.html#node-support Link to comment Share on other sites More sharing options...
danimic Posted July 15, 2021 Author Report Share Posted July 15, 2021 Hello, yes, the code was running server-side. Thank you for clarifying this issue! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now