ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
124 stars 111 forks source link

TypeError: undefined is not a constructor (evaluating 'new _authService.default()') #213

Closed devteamtalkag1 closed 3 years ago

devteamtalkag1 commented 3 years ago

This is the error I'm getting after integrating the RNVideoChat example, into my existing app ! It came with several other errors image Not really know where it's coming from or what is causing it !

ccvlad commented 3 years ago

Did you call ConnectyCube.init(credentials, config) ?

https://developers.connectycube.com/reactnative/?id=initialize

devteamtalkag1 commented 3 years ago

Exact ! I dit it till the opening of the app, in the constructor same as in the example App !

ccvlad commented 3 years ago

Please, show your code with the method

devteamtalkag1 commented 3 years ago

OK ! In my Main.js which serves as an opening file for the project, I do all the setting including the init : image

and after I've simplified the screen on which I make the call by just navigating this way : image and the rest point to the VideoScreen folder index screen as in the code sample as shown in the three here : image

ccvlad commented 3 years ago
import ConnectyCube from 'react-native-connectycube';

...

export default class AuthService {
  init = () => {
    ConnectyCube.init(...config);

    console.log(config);
    console.log(ConnectyCube)
  }

  ...

Modify your AuthService.init() to check logs.