Jump to content

javascript api error when using autoConnectEvenHub:true


danimic

Recommended Posts

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

  • danimic changed the title to javascript api error when using autoConnectEvenHub:true
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...