8000 NullPointerException on Android · Issue #242 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content
NullPointerException on Android #242
Closed
@ycherniavskyi

Description

@ycherniavskyi

Describe the bug
Stacktrace provide full description of this bug:

E/MethodChannel#FlutterWebRTC.Method(18109): Failed to handle method call
E/MethodChannel#FlutterWebRTC.Method(18109): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.cloudwebrtc.webrtc.utils.ConstraintsArray.size(ConstraintsArray.java:19)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.createIceServers(FlutterWebRTCPlugin.java:470)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.parseRTCConfiguration(FlutterWebRTCPlugin.java:520)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.peerConnectionInit(FlutterWebRTCPlugin.java:732)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.cloudwebrtc.webrtc.FlutterWebRTCPlugin.onMethodCall(FlutterWebRTCPlugin.java:174)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at android.app.ActivityThread.main(ActivityThread.java:6669)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#FlutterWebRTC.Method(18109): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/flutter (18109): onError PlatformException(error, Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference, null)
I/flutter (18109): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
I/flutter (18109): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
I/flutter (18109): <asynchronous suspension>
I/flutter (18109): #2      createPeerConnection (package:flutter_webrtc/rtc_peerconnection_factory.dart:18:56)
I/flutter (18109): #3      CallBloc._createPeerConnection (package:webtrit_phone/blocs/call/call_bloc.dart:236:34)
I/flutter (18109): #4      CallBloc._mapCallOutgoingStartedToState (package:webtrit_phone/blocs/call/call_bloc.dart:113:29)
I/flutter (18109): <asynchronous suspension>
I/flutter (18109): #5      CallBloc.mapEventToState (package:webtrit_phone/blocs/call/call_bloc.dart:59:14)
I/flutter (18109): <asynchronous suspension>
I/flutter (18109): #6      Bloc._bindEventsToStates.<anonymous closure> (package:bloc/src/bloc.dart:252:20)
I/flutter (18109): #7      Stream.asyncExpand.onListen.<anonymous closure> (dart:async/stream.dart:576:30)
I/flutter (18109): #8      _rootRunUnary (dart:async/zone.dart:1134:38)
I/flutter (18109): #9      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
I/flutter (18109): #10     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
I/flutter (18109): #11     _Buff

To Reproduce
To reproduce it is enough to call createPeerConnection with empty (not null) maps:

final peerConnection = await createPeerConnection({}, {});

Expected behavior
PeerConnection must be successfully created (for sure it may be not fully operable because of ICE servers absent).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0