Closed iosgnanavel closed 3 years ago
Hi @iosgnanavel, you should be login in chat before getVideoChatWebRTCSignalingManager,
if (!chatService.isLoggedIn()) { chatService.login(QBUser user);}
this error still appears. Its randomly make crash. i also check isLoggedIn
Hi, @petergayduchik, what version SDK do you use? Is this issue reproducible on videosample?
@RomanPronin 3.3.4 im using.
compile 'com.quickblox:quickblox-android-sdk-chat:3.3.4'
compile 'com.quickblox:quickblox-android-sdk-core:3.3.4'
compile 'com.quickblox:quickblox-android-sdk-messages:3.3.4'
compile 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.3.4'
compile project(':quickblox-android-sdk-content-3.3.4')
this error realy randomly showing. I cant reproduce this bug. When i forgot about this error - error come to my head -_-
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.quickblox.chat.QBVideoChatWebRTCSignalingManager.addSignalingManagerListener(com.quickblox.chat.listeners.QBVideoChatSignalingManagerListener)' on a null object reference
on line
QBChatService.getInstance().getVideoChatWebRTCSignalingManager()
.addSignalingManagerListener(new QBVideoChatSignalingManagerListener() {
@Override
public void signalingCreated(QBSignaling qbSignaling, boolean createdLocally) {
if (!createdLocally) {
QBRTCClient.getInstance(context).addSignaling((QBWebRTCSignaling) qbSignaling);
Logger.d("add signalling ");
}
}
});
here
.addSignalingManagerListener(new QBVideoChatSignalingManagerListener() {
before i see this error in logcat - its take to time. Like app loading... bla bla errors also here
org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: 'chat.quickblox.com:5223' failed because java.net.SocketTimeoutException: failed to connect to chat.quickblox.com/34.192.242.204 (port 5223) after 30000ms
sure its can be internet access problem. I just cant reproduce. Everything what i have - i show here.
If you successfully logged in to chat, before addSignalingManagerListener(), and still have a issue, in that case, I can offer you to check qbVideoChatWebRTCSignalingManager != null, before adding listener, to avoid NullPointerException.
private void loginToChat(QBUser qbUser) {
chatService.login(qbUser, new QBEntityCallback
@Override
public void onError(QBResponseException e) {
Log.d(TAG, "login onError " + e.getMessage());
sendResultToActivity(false, e.getMessage() != null
? e.getMessage()
: "Login error");
}
});
}
private void initQBRTCClient() { rtcClient = QBRTCClient.getInstance(getApplicationContext()); // Add signalling manager if (chatService != null && chatService.getVideoChatWebRTCSignalingManager() != null) { chatService.getVideoChatWebRTCSignalingManager().addSignalingManagerListener((qbSignaling, createdLocally) -> { if (!createdLocally) { rtcClient.addSignaling((QBWebRTCSignaling) qbSignaling); } }); } // Configure QBRTCConfig.setDebugEnabled(true); SettingsUtil.configRTCTimers(CallService.this);
// Add service as callback to RTCClient
rtcClient.addSessionCallbacksListener(WebRtcSessionManager.getInstance(this));
rtcClient.prepareToProcessCalls();
}
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.quickblox.chat.QBWebRTCSignaling com.quickblox.chat.QBVideoChatWebRTCSignalingManager.getSignaling(int)' on a null object reference
at com.quickblox.videochat.webrtc.QBRTCSession.initSignallingWithOpponents(QBRTCSession.java:950)
at com.quickblox.videochat.webrtc.QBRTCSession.
@islavstan please provide full log from start login to the chat to getting this error for better understanding your issue (chat's logs must be enabled QBChatService.setDebugEnabled(true);)
I have the same issue. I provide my log
11-19 21:33:44.625 20464-20464/? I/art: Late-enabling -Xcheck:jni
11-19 21:33:44.818 20464-20464/call.biz.vomer.voip D/Proxy: setHttpRequestCheckHandler
11-19 21:33:45.928 20464-20464/call.biz.vomer.voip I/MultiDex: VM with version 2.1.0 has multidex support
11-19 21:33:45.928 20464-20464/call.biz.vomer.voip I/MultiDex: install
11-19 21:33:45.928 20464-20464/call.biz.vomer.voip I/MultiDex: VM has multidex support, MultiDex support library is disabled.
11-19 21:33:45.972 20464-20464/call.biz.vomer.voip D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
11-19 21:33:46.020 20464-20464/call.biz.vomer.voip D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
11-19 21:33:46.110 20464-20464/call.biz.vomer.voip I/FA: App measurement is starting up, version: 11400
11-19 21:33:46.111 20464-20464/call.biz.vomer.voip I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
11-19 21:33:46.169 20464-20464/call.biz.vomer.voip V/FA: Collection enabled
11-19 21:33:46.170 20464-20464/call.biz.vomer.voip V/FA: App package, google app id: call.biz.vomer.voip, 1:593952674245:android:416e593acf288561
11-19 21:33:46.171 20464-20464/call.biz.vomer.voip I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app call.biz.vomer.voip
11-19 21:33:46.171 20464-20464/call.biz.vomer.voip D/FA: Debug-level message logging enabled
11-19 21:33:46.246 20464-20464/call.biz.vomer.voip V/FA: Registered activity lifecycle callback
11-19 21:33:46.248 20464-20464/call.biz.vomer.voip I/FirebaseInitProvider: FirebaseApp initialization successful
11-19 21:33:46.251 20464-20464/call.biz.vomer.voip I/InstantRun: starting instant run server: is main process
11-19 21:33:46.253 20464-20557/call.biz.vomer.voip V/FA: Persisting first open: 1511120026079
11-19 21:33:46.380 20464-20464/call.biz.vomer.voip I/CrashlyticsCore: Initializing Crashlytics 2.4.1.19
11-19 21:33:46.403 20464-20561/call.biz.vomer.voip W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
11-19 21:33:46.403 20464-20561/call.biz.vomer.voip W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
11-19 21:33:46.456 20464-20464/call.biz.vomer.voip D/QBASDK: Restored custom endpoints. ApiEndpoint: , ChatEndpoint: . lastUpdateTime: Thu Jan 01 03:00:00 GMT+02:00 1970
11-19 21:33:46.459 20464-20464/call.biz.vomer.voip D/QBASDK: DEVICE_ID = ffffffff-9635-fa42-7d20-a8af288ce5e5
11-19 21:33:46.509 20464-20464/call.biz.vomer.voip D/QBASDK: creating app secured preferences
11-19 21:33:46.919 20464-20557/call.biz.vomer.voip V/FA: State of service unknown
11-19 21:33:46.919 20464-20557/call.biz.vomer.voip V/FA: Checking service availability
11-19 21:33:46.921 20464-20557/call.biz.vomer.voip V/FA: Service available
11-19 21:33:46.921 20464-20557/call.biz.vomer.voip V/FA: Setting useService: true
11-19 21:33:46.922 20464-20557/call.biz.vomer.voip V/FA: Using measurement service
11-19 21:33:46.937 20464-20557/call.biz.vomer.voip V/FA: Connecting to remote service
11-19 21:33:46.952 20464-20557/call.biz.vomer.voip V/FA: Using measurement service
11-19 21:33:46.952 20464-20557/call.biz.vomer.voip V/FA: Connection attempt already in progress
11-19 21:33:48.194 20464-20464/call.biz.vomer.voip I/MultiDex: install
11-19 21:33:48.194 20464-20464/call.biz.vomer.voip I/MultiDex: VM has multidex support, MultiDex support library is disabled.
11-19 21:33:48.196 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.196 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.196 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.197 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.197 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.197 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.197 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.198 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.198 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.198 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.199 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.199 20464-20464/call.biz.vomer.voip I/art: Rejecting re-init on previously-failed class java.lang.Class<org.greenrobot.greendao.database.DatabaseOpenHelper$EncryptedHelper>
11-19 21:33:48.238 20464-20464/call.biz.vomer.voip I/greenDAO: Creating tables for schema version 1
11-19 21:33:48.330 20464-20576/call.biz.vomer.voip I/stetho: Listening on @stetho_call.biz.vomer.voip_devtools_remote
11-19 21:33:48.528 20464-20464/call.biz.vomer.voip W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-19 21:33:48.606 20464-20464/call.biz.vomer.voip V/FA: onActivityCreated
11-19 21:33:48.607 20464-20464/call.biz.vomer.voip I/Timeline: Timeline: Activity_launch_request id:call.biz.vomer.voip time:167387909
11-19 21:33:48.676 20464-20561/call.biz.vomer.voip W/ResourcesManager: Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
11-19 21:33:48.676 20464-20561/call.biz.vomer.voip W/ResourcesManager: Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
11-19 21:33:48.679 20464-20487/call.biz.vomer.voip I/art: Background sticky concurrent mark sweep GC freed 43878(1696KB) AllocSpace objects, 1(20KB) LOS objects, 0% free, 17MB/17MB, paused 3.872ms total 116.117ms
11-19 21:33:48.753 20464-20464/call.biz.vomer.voip V/FA: onActivityCreated
11-19 21:33:48.776 20464-20487/call.biz.vomer.voip I/art: Background partial concurrent mark sweep GC freed 34437(1120KB) AllocSpace objects, 1(3MB) LOS objects, 39% free, 12MB/20MB, paused 6.417ms total 92.276ms
11-19 21:33:48.819 20464-20464/call.biz.vomer.voip D/ContextImpl: isCts() value : -1
11-19 21:33:48.819 20464-20464/call.biz.vomer.voip D/ContextImpl: isCts() package name : call.biz.vomer.voip
11-19 21:33:48.819 20464-20464/call.biz.vomer.voip D/wangcy9: setStatusIcon occur wrong theme!
11-19 21:33:49.179 20464-20464/call.biz.vomer.voip I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
11-19 21:33:49.271 20464-20464/call.biz.vomer.voip I/PermissionHelper: PERMISSION: Permission Granted
11-19 21:33:49.362 20464-20557/call.biz.vomer.voip V/FA: Using measurement service
11-19 21:33:49.362 20464-20557/call.biz.vomer.voip V/FA: Connection attempt already in progress
11-19 21:33:49.366 20464-20557/call.biz.vomer.voip V/FA: Activity resumed, time: 510241990
11-19 21:33:49.369 20464-20590/call.biz.vomer.voip D/OpenGLRenderer: Render dirty regions requested: true
11-19 21:33:49.370 20464-20557/call.biz.vomer.voip I/FA: Tag Manager is not found and thus will not be used
11-19 21:33:49.381 20464-20464/call.biz.vomer.voip D/Atlas: Validating map...
11-19 21:33:49.384 20464-20557/call.biz.vomer.voip D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=1941906671156581182}]
11-19 21:33:49.443 20464-20557/call.biz.vomer.voip V/FA: Using measurement service
11-19 21:33:49.443 20464-20557/call.biz.vomer.voip V/FA: Connection attempt already in progress
11-19 21:33:49.444 20464-20557/call.biz.vomer.voip D/FA: Connected to remote service
11-19 21:33:49.444 20464-20557/call.biz.vomer.voip V/FA: Processing queued up service tasks: 4
11-19 21:33:49.471 20464-20590/call.biz.vomer.voip I/Adreno-EGL:
Hello QuickBlox customer,
This is Nikolay from QuickBlox support.
The issue was closed as it is outdated.
Please check the relevant section of our documentation here: https://docs.quickblox.com/docs/android-video-calling
Also, please update the SDK to the latest version: https://github.com/QuickBlox/quickblox-android-sdk-releases/releases/tag/3.9.11
Additionally, please check our new samples: https://docs.quickblox.com/docs/code-samples#video-calling-samples
If it is still relevant after reviewing the updated information, feel free to open a new issue.
Have a nice day.
Hi Team, Following Exception occur while start CallService in QB.. How can i fix this issue. Issue :Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.quickblox.chat.QBVideoChatWebRTCSignalingManager.addSignalingManagerListener(com.quickblox.chat.listeners.QBVideoChatSignalingManagerListener)' on a null object reference at com.wtf.services.CallService.initQBRTCClient(CallService.java:149) at com.wtf.services.CallService.startActionsOnSuccessLogin(CallService.java:129) at com.wtf.services.CallService.access$100(CallService.java:34) at com.wtf.services.CallService$1.onSuccess(CallService.java:114) at com.wtf.services.CallService$1.onSuccess(CallService.java:110) at com.quickblox.core.helper.CommonUtils.notifyEntityCallbackOnSuccess(Unknown Source) at com.quickblox.chat.QBChatService$4.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Source Code:
private void initQBRTCClient() { rtcClient = QBRTCClient.getInstance(getApplicationContext()); // Add signalling manager if (chatService == null) { createChatService(); } _
_ @Override public void signalingCreated(QBSignaling qbSignaling, boolean createdLocally) { if (!createdLocally) { rtcClient.addSignaling((QBWebRTCSignaling) qbSignaling); } } });