armackey / nativescript-twilio-video

A Nativescript video chat plugin.
12 stars 8 forks source link

.NullPointerException: Video renderer must not be null #10

Open vnvicky opened 5 years ago

vnvicky commented 5 years ago

ERROR Error: java.lang.NullPointerException: Video renderer must not be null JS: com.twilio.video.Preconditions.checkNotNull(Preconditions.java:786) JS: com.twilio.video.VideoTrack.addRenderer(VideoTrack.java:50) JS: com.twilio.video.LocalVideoTrack.addRenderer(LocalVideoTrack.java:213) JS: com.tns.Runtime.callJSMethodNative(Native Method) JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203) JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:1083) JS: com.tns.Runtime.callJSMethod(Runtime.java:1070) JS: com.tns.Runtime.callJSMethod(Runtime.java:1050) JS: com.tns.Runtime.callJSMethod(Runtime.java:1042) JS: com.tns.gen.java.lang.Object_vendor_101593_32_ClickListenerImpl.onClick(Object_vendor_101593_32_ClickListenerImpl.java:18) JS: android.view.View.performClick(View.java:5647) JS: android.view.View$PerformClick.run(View.java:22465) JS: android.os.Handler.handleCallback(Handler.java:754) JS: android.os.Handler.dispatchMessage(Handler.java:95) JS: android.os.Looper.loop(Looper.java:163) JS: android.ap... JS: ERROR CONTEXT { JS: "view": { JS: "def": { JS: "nodeFlags": 402653185, JS: "rootNodeFlags": 402653185, JS: "nodeMatchedQueries": 6, JS: "flags": 0, JS: "nodes": [ JS: { JS: "nodeIndex": 0, JS: "parent": null, JS: "renderParent": null, JS: "bindingIndex": 0, JS: "outputIndex": 0, JS: "checkIndex": -1, JS: "flags": 402653184, JS: "childFlags": 0, JS: "directChildFlags": 0, JS: "childMatchedQueries": 0, JS: "ngContentIndex": -1, JS: "matchedQueries": {}, JS: "matchedQueryIds": 0, JS: "references": {}, JS: "childCount": 0, JS: "bindings": [], JS: "bindingFlags": 0, JS: "outputs": [], JS: "element": null, JS: "provider": null, JS: "text": null, JS: "query": { JS: "id": 1, JS: "filterId": 2, JS: "bindings": [ JS: { JS: "propName": "localvideo", JS: "bindingType": 0 JS: } JS: ] JS: },

and on android renderer side I am getting the error in the title

please let me know

armackey commented 5 years ago

Well you didn't post any code so I have to ask very basic questions.

Are you using namescaping in the view? I.e <localvideo.../localvideo> and are you getting a reference of that view element in your business logic?

Or are you creating the view object dynamically? I.e new LocalVideo(); if so, are you inserting it onto the page before making a call?