Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEbrtc produces W/chromium( 7051): [WARNING:socket_tcp.cc(134)] Error from connecting socket, result=-102 ERROR #2516

Open
1 of 2 tasks
xyzbilal opened this issue Jan 28, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@xyzbilal
Copy link

xyzbilal commented Jan 28, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

While handling RTCPeerconnection offer connectionstatechange event hangs in connecting state and produce "W/chromium( 7051): [WARNING:socket_tcp.cc(134)] Error from connecting socket, result=-102" error. but it works while creating offer with no problem.

Expected Behavior

I m expecting I can handle peerconnection offer with no error.

Steps with code example to reproduce

run local server on main dart
InAppLocalhostServer localhostServer =  InAppLocalhostServer(documentRoot: "assets/html",port: 8090);
void main() async {

  WidgetsFlutterBinding.ensureInitialized();
  await WakelockPlus.enable();

 if (!kIsWeb) {
    await localhostServer.start();
  }

    if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android) {
    await InAppWebViewController.setWebContentsDebuggingEnabled(kDebugMode);
  }

  final sharedPreferencesHelper = SharedPreferencesHelper();
  await sharedPreferencesHelper.init();


  apartId = sharedPreferencesHelper.getString(Keys.apartNumber) ?? "14";
  mqttIdendifier = Uuid().v1();
  flatIdentifier.value = sharedPreferencesHelper.getString(Keys.flatName);
  await initializeDateFormatting('tr_TR');
  runApp(const MyApp());
}
render InappWebview in my widget
Widget videoRenderers() {


    return SizedBox(
      height: MediaQuery.of(context).size.height,
      child: Column(
        children: [
          ObxValue((p0) {
            return _topBanner(p0);
          }, controller.offer),

         Expanded(child:InAppWebView(
    //  initialData: InAppWebViewInitialData(data:data ),
    initialUrlRequest: URLRequest(
      url: WebUri("http://localhost:8090/index.html"),
    ),
    onPermissionRequest: (controller, request) async {
      final resources = <PermissionResourceType>[];
              if (request.resources.contains(PermissionResourceType.CAMERA)) {
                final cameraStatus = await Permission.camera.request();
                if (!cameraStatus.isDenied) {
                  resources.add(PermissionResourceType.CAMERA);
                }
              }
              if (request.resources
                  .contains(PermissionResourceType.MICROPHONE)) {
                final microphoneStatus =
                    await Permission.microphone.request();
                if (!microphoneStatus.isDenied) {
                  resources.add(PermissionResourceType.MICROPHONE);
                }
              }
              // only for iOS and macOS
              if (request.resources
                  .contains(PermissionResourceType.CAMERA_AND_MICROPHONE)) {
                final cameraStatus = await Permission.camera.request();
                final microphoneStatus =
                    await Permission.microphone.request();
                if (!cameraStatus.isDenied && !microphoneStatus.isDenied) {
                  resources.add(PermissionResourceType.CAMERA_AND_MICROPHONE);
                }
              }

              return PermissionResponse(
                  resources: resources,
                  action: resources.isEmpty
                      ? PermissionResponseAction.DENY
                      : PermissionResponseAction.GRANT);
    },

    initialSettings: InAppWebViewSettings(
      mediaPlaybackRequiresUserGesture: false,
      allowsInlineMediaPlayback: true,
    
    ),

    onWebViewCreated: (cc) {
       controller.webViewController = cc;

       controller.webViewController?.addJavaScriptHandler(
          handlerName: "flutterHandler",
          callback: (args) {
             controller.onJavaScriptMessageReceived(args);
          });

       controller.webViewController?.addJavaScriptHandler(
          handlerName: "flutterMqttHandler",
          callback: (args) {
             controller.onJavaScriptMqttMessageReceived(args);
          });
    },
    onConsoleMessage: (controller, consoleMessage) {},
    onCloseWindow: (c) {
       controller.isWebViewInitialized.value = false;
    },
    onLoadStop: (cc, url){
  
    Timer(1.seconds, () async{
     
 
     controller.sendToJavascript("handleFlutterMainMessage", {
      'type': 'connect',
      'url': "ws://${ controller.baseSocketUrl}:8080?deviceId=${ controller.deviceId}",
    });
    });
       controller.isWebViewInitialized.value = true;
    },
  )
         
      
         
         ),

          _bottomBanner(),
        ],
      ),
    );
 // });
}

send ws url to inappwebview
void createOffer(id) async {
    if (doNotDistub.value) {
      isDndActive = true;
      doNotDistub.value = false;
    }
    busy.value = true;

    remoteReady.value = true;
    currentDeviceId = id;

    Timer(1.seconds, () {
      sendToJavascript(
          "handleFlutterMainMessage", {"type": "createoffer", "deviceId": id});
    });
  }

sendToJavascript(String function, Map<String, dynamic> socketMsg) async {
    final jsCode = "$function('${jsonEncode(socketMsg)}');";


    if (isWebViewInitialized.value) {
      webViewController?.evaluateJavascript(source: jsCode);
    } else {
      messages.update(socketMsg["type"],(s)=> jsCode
      ,ifAbsent: ()=> jsCode);
    }
  }

my local javascripy codes
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Video Autoplay Example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
      /* Sayfa ve HTML elemanlarını sıfırlayalım */
      html,
      body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden; /* Kaydırma (scroll) kapansın */
        background-color: #03142c;
      }

      /* Ana kapsayıcı (ekranı kaplasın) */
      .grid-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
      }

      /* Footer ya da video kapsayıcısı */
      .footer {
        flex: 1; /* Kalan alanı kaplasın */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Dikeyde ortalama */
        align-items: center; /* Yatayda ortalama */
      }

      /* Video tam ekranı kaplasın, en-boy oranını korumak için object-fit kullanılır */
      #remoteVideo {
        height: 100%; /* Yükseklik %100 */
        width: 100%; /* Genişlik %95 */
        object-fit: cover; /* veya contain */
      }
    </style>
  </head>

  <body>
    <video id="remoteVideo" autoplay playsinline webkit-playsinline></video>
  

    <script>
      const remoteVideo = document.getElementById('remoteVideo')

      // RTCPeerConnection nesnesi
      let peerConnection
      let remotePeerConnection
      let dataChannel
      let remoteDataChannel
      let deviceId
      let sessionId 
      let stream
      let remoteStrem
      let localStream

      let remoteAudioSender = null
      let audioSender = false
      let ws = null
      let wsUrl = null
      let connected = false
      let isOffer = false

      function closeCommunication() {
 
        // 1. PeerConnection varsa kapat
        if (peerConnection) {
          // Gönderilen track'leri durdur (kamera / mikrofon)
          peerConnection.getSenders().forEach(sender => {
            if (sender.track) {
              sender.track.stop()
            }
          })
          peerConnection.close()
          peerConnection = null
        }
        audioSender = false
        // 2. Remote PeerConnection varsa kapat
        if (remotePeerConnection) {
          remotePeerConnection.close()
          remotePeerConnection = null
          remoteAudioSender = null
        }

        // 3. localStream varsa tüm track'leri durdur
        if (localStream) {
          localStream.getTracks().forEach(track => {
            track.stop()
          })
          localStream = null
        }

        // 4. Video elementindeki kaynağı temizle (UI'da siyah ekrana döner)
        const videoElement = document.getElementById('remoteVideo')
        if (videoElement) {
          videoElement.srcObject = null
        }
        initializePc()

        console.log(
          'Tüm bağlantılar kapatıldı ve medya kaynakları serbest bırakıldı.'
        )
      }

      function sendMessageToFlutter(msg) {
        window.flutter_inappwebview.callHandler(
          'flutterHandler',
          JSON.stringify(msg)
        )
      }

      function sendMessageToMqttFlutter(msg) {
        window.flutter_inappwebview.callHandler(
          'flutterMqttHandler',
          JSON.stringify(msg)
        )
      }

      function handleFlutterMainMessage(message) {
        try {
          console.log('message', message)
          const msg = JSON.parse(message)

          switch (msg.type) {
            case 'connect':
              wsUrl = msg.url
              initWebSocket()
              break
            case 'offer':
              deviceId = msg.deviceId
              handleOffer(msg)
              sendMessageToFlutter(msg)
              break
            case 'answer':
              break
            case 'candidate':
              break
            case 'close':
              closeCommunication()
              break

            case 'hangup':
              closeCommunication()

              msg["sessionId"] = sessionId
              msg["deviceId"] = deviceId
              sendMessageToWebSocket(msg)
              break
            case 'createoffer':
              
              createOffer(msg.deviceId)
              break
            case 'disconnect':
              closeCommunication()
              break
            case 'enabletracks':
              console.log('enabletracks')
              if (localStream) {
                localStream.getTracks().forEach(track => {
                  track.enabled = true
                })
              }

              break
          }
        } catch (e) {
          console.error('WebSocket mesaj parse hatası:', e)
        }
      }

      function handleFlutterMqttMessage(message) {
        const msg = JSON.parse(message)
        switch (msg.type) {
          case 'offer':
            handleMqttOffer(msg)
            break
          case 'answer':
            handleMqttAnswer(msg)
            break
          case 'candidate':
            handleMqttCandidate(msg)
            break
          case 'close':
            // peerConnection.close();
            initializeRemotePc()
            break
          case 'disconnect':
            setTimeout(() => {
              sendMessageToFlutter({ type: 'disconnect' })
            }, 5000)
            break
          case 'enabletracks':
            console.log('enabletracks')

            break
        }
      }

      // Bağlantı yapılandırması (STUN sunucusu eklemek isterseniz buraya ekleyebilirsiniz)
      const configuration = {
       iceServers: [
  
    ]
      }

      const remoteconfiguration = {
        iceServers: [
          { urls: 'stun:stun.l.google.com:19302' }
          /*{
                urls: 'turn:turn.turef.com:3478',
               username: "anka",
               credential: "1234qqqQ"
            }*/
        ]
      }

      // window.add EventListener("socket", onMessage, false);

      const getStream = async incoming => {
        localStream = await navigator.mediaDevices
          .getUserMedia({ audio: true, video: true })
          .catch(error => {
            console.error('mediaDevices', error)
          })

        if (localStream) {
          localStream.getTracks().forEach(track => {
            if (incoming) track.enabled = false
            peerConnection.addTrack(track, localStream)
          })
        }
      }

      const initializeRemotePc = async () => {
        remoteStrem = new MediaStream()

        let configuration = null
        remotePeerConnection = new RTCPeerConnection(configuration)

        // Setup ice handling
        remotePeerConnection.onicecandidate = function (event) {
          if (event.candidate) {
            sendMessageToMqttFlutter({
              type: 'candidate',
              payload: event.candidate
            })
          }
        }

        // creating data channel
        remoteDataChannel = remotePeerConnection.createDataChannel(
          'dataChannel',
          {
            reliable: true
          }
        )

        remoteDataChannel.onerror = function (error) {
          console.log('Error occured on datachannel:', error)
        }

        // when we receive a message from the other peer, printing it on the console
        remoteDataChannel.onmessage = function (event) {
          // console.log("message:", event.data);
        }

        remoteDataChannel.onclose = function () {
          //console.log("data channel is closed");
        }

        remotePeerConnection.ondatachannel = function (event) {
          remoteDataChannel = event.channel
        }

        remotePeerConnection.ontrack = event => {
          const track = event.track

          switch (track.kind) {
            case 'video':
              remoteStrem.addTrack(track, remoteStrem)

              break
            case 'audio':
              const senders = peerConnection.getSenders()
              senders.forEach(sender => peerConnection.removeTrack(sender))
              peerConnection.addTrack(track, event.streams[0])

              createAgainOffer()
              break
            default:
              console.log('got unknown track ' + track)
          }
        }

        remotePeerConnection.addEventListener('connectionstatechange', ev => {
          console.log(
            'connectionstatechange',
            remotePeerConnection.connectionState
          )
          if (remotePeerConnection.connectionState === 'disconnected') {
            sendMessageToMqttFlutter({ type: 'reject' })
          }
          if (remotePeerConnection.connectionState !== 'connected') {
            return
          }

          sendMessage('dataChannel connection established successfully!!')
        })

        remoteDataChannel.onclose(e => {
          //console.log('dataChannel close', e);
        })
      }

      const createMqttOffer = async device => {
        deviceId = device

        if (remotePeerConnection == null) {
          await initializeRemotePc()
        }

        peerConnection.createOffer(
          offer => {
            console.log('offer', offer)

            peerConnection.setLocalDescription(offer)
            sendMessageToMqttFlutter({
              type: 'offer',
              deviceId: device,
              payload: offer
            })
          },
          error => {
            console.error('Error creating an offer', error)
          }
        )
      }

      const handleMqttOffer = async offer => {
        if (remotePeerConnection == null) {
          await initializeRemotePc()
        }

        remotePeerConnection.restartIce()
        remotePeerConnection.setRemoteDescription(
          new RTCSessionDescription({
            sdp: offer.payload.sdp,
            type: 'offer'
          })
        )

        // create and send an answer to an offer
        remotePeerConnection.createAnswer(
          answer => {
            remotePeerConnection.setLocalDescription(answer)
            sendMessageToMqttFlutter({ type: 'answer', payload: answer })
          },
          error => {
            console.error('Error creating an answer', error)
          }
        )
      }

      const handleMqttCandidate = candidate => {
        console.log('candidate', candidate.payload)

        remotePeerConnection
          .addIceCandidate(new RTCIceCandidate(candidateMsg.payload))
          .catch(e => {
            console.error('candidate', e)
          })
        // peerConnection.addIceCandidate(new RTCIceCandidate(JSON.parse(candidate.value).candidate));
      }

      const handleMqttAnswer = answer => {
        remotePeerConnection.setRemoteDescription(
          new RTCSessionDescription({
            sdp: answer.payload.sdp,
            type: 'answer'
          })
        )
      }

      const initializePc = async () => {
        // deviceId = null;
        if (remotePeerConnection == null) {
          await initializeRemotePc()
        }
        stream = new MediaStream()
        remoteVideo.srcObject = null
        let configuration = null
        peerConnection = new RTCPeerConnection(configuration)

      

        // Setup ice handling
        peerConnection.onicecandidate = function (event) {
          if (event.candidate) {
            sendMessageToWebSocket({
              type: 'candidate',
              value: event.candidate
            })
          }
        }

        // creating data channel
        dataChannel = peerConnection.createDataChannel('dataChannel', {
          reliable: true
        })

        dataChannel.onerror = function (error) {
          console.log('Error occured on datachannel:', error)
        }

        // when we receive a message from the other peer, printing it on the console
        dataChannel.onmessage = function (event) {
          // console.log("message:", event.data);
        }

        dataChannel.onclose = function () {
          //console.log("data channel is closed");
        }

        peerConnection.ondatachannel = function (event) {
          dataChannel = event.channel
        }

        peerConnection.ontrack = event => {
          const track = event.track

          stream.addTrack(track)

          switch (track.kind) {
            case 'video':
              remotePeerConnection.addTrack(track, stream)
              remoteVideo.srcObject = stream
              break
            case 'audio':
              if (remoteAudioSender) {
                remoteAudioSender
                  .replaceTrack(track)
                  .then(() => {
                    console.log('Audio track replaced successfully')
                  })
                  .catch(err => {
                    console.error('Error replacing audio track:', err)
                  })
              } else {
                remoteAudioSender = remotePeerConnection.addTrack(track, stream)
              }
              break

            default:
              console.log('got unknown track ' + track)
          }
        }
        try{
        peerConnection.addEventListener('connectionstatechange', ev => {

          console.log('connectionstatechange', peerConnection.connectionState)

          console.log("connectionstatechange event:", ev);
  // Veya:
  console.dir(ev);
  
  // Event içinde genelde `type`, `target`, `currentTarget` gibi alanlar bulunur.
  console.log("Event type:", ev.type);
  
  // `ev.target` tipik olarak `RTCPeerConnection` nesnesidir
  // Bu nesne üzerinden connectionState'e erişebilirsiniz:
  console.log("connectionState:", ev.target.connectionState);
  


          if (peerConnection.connectionState === 'disconnected') {
            sendMessageToWebSocket(JSON.stringify({ type: 'reject' }))
          }

          if (peerConnection.connectionState !== 'connected') {
            return
          }
        })
      }catch(e){
        console.error('connectionstatechange', e)
      }

        dataChannel.onclose(e => {
          //console.log('dataChannel close', e);
        })
      }

      const createAgainOffer = async => {
        peerConnection.createOffer(
          offer => {
            console.log('offer', offer)

            peerConnection.setLocalDescription(offer)
            sendMessageToWebSocket({
              type: 'againoffer',
              value: offer
            })
          },
          error => {
            console.error('Error creating an offer', error)
          }
        )
      }

      const createOffer = async device => {
         deviceId = device
         isOffer = false

        if (peerConnection == null) {
          await initializePc()
        }

        await getStream(false)

        peerConnection.createOffer(
          offer => {
            console.log('offer', offer)

            peerConnection.setLocalDescription(offer)
            sendMessageToWebSocket({
              type: 'offer',
              deviceId: device,
              value: offer
            })
          },
          error => {
            console.error('Error creating an offer', error)
          }
        )
      }

      const handleOffer = async offer => {
        isOffer = true
        if (peerConnection == null) {
          await initializePc()
        }

        peerConnection.restartIce()
       await  peerConnection .setRemoteDescription(new RTCSessionDescription(offer.value))
       .catch(error => {
            console.error('setRemoteDescription hata:', error)
          })

           await onRemoteDescriptionSet() // Burada istediğiniz fonksiyonu çağırın
         

            localStream = await navigator.mediaDevices
          .getUserMedia({ audio: true, video: true })
          .catch(error => {
            console.error('mediaDevices', error)
          })

        if (localStream) {
          localStream.getTracks().forEach(track => {
            track.enabled = false
            peerConnection.addTrack(track, localStream)
          })
        }
        

        // create and send an answer to an offer
        peerConnection.createAnswer(
          answer => {
            peerConnection.setLocalDescription(answer)
            sendMessageToWebSocket({ type: 'answer', value: answer })
          },
          error => {
            console.error('Error creating an answer', error)
          }
        )
      }

      function sendMessageToWebSocket(msg) {
        if (ws && ws.readyState === WebSocket.OPEN) {
          let m = JSON.stringify(msg)
          console.log('WebSocket mesajı gönderiliyor:', m)
          ws.send(m)
        } else {
          console.error('WebSocket bağlantısı açık değil, mesaj gönderilemedi.')
        }
      }

      

      const handleAnswer = answer => {
        peerConnection.setRemoteDescription(
          new RTCSessionDescription(answer.value)
        )
      }

      async function onRemoteDescriptionSet() {
        // remoteDescription ayarlandıktan sonra çağrılır.
        setTimeout(() => {
          console.log('pendingCandidates', pendingCandidates)

          pendingCandidates.forEach(candidateObj => {
            setTimeout(() => {
          peerConnection
            .addIceCandidate(new RTCIceCandidate(candidateObj))
            .catch(e => console.error('candidate error', e))
          }, 500)
        })

        pendingCandidates = []
            }, 2000) // Kuyruktaki candidate'ları ekle
        

      
      }

      let count = 0
      let pendingCandidates = []

      function handleCandidate(candidateMsg) {
        const candidateObj = candidateMsg.value // {candidate, sdpMid, sdpMLineIndex}

    
if(isOffer)      {
  console.log("Remote description yok, candidate'i kuyruğa alıyorum.")
  pendingCandidates.push(candidateObj)

}else{
  peerConnection
    .addIceCandidate(new RTCIceCandidate(candidateObj))
    .catch(e => {
      console.error('candidate error', e)
    })
}
        
      }

      function handleCandidate(candidateMsg) {
        const candidateObj = candidateMsg.value // {candidate, sdpMid, sdpMLineIndex}

        if (isOffer) {
          console.log('Remote description yok, candidate kuyruğa alınıyor.')
          pendingCandidates.push(candidateObj)
        } else {
          peerConnection
            .addIceCandidate(new RTCIceCandidate(candidateObj))
            .catch(e => {
              console.error('candidate error', e)
            })
}
         

       
      }

      /*   const handleCandidate = candidate => {
        console.log('candidate', JSON.stringify(candidate.value))

     
          const candidateObj = {
    candidate: candidate.value.candidate,
    sdpMid: candidate.value.sdpMid,
    sdpMLineIndex: candidate.value.sdpMLineIndex
  };

  peerConnection
    .addIceCandidate(new RTCIceCandidate(candidateObj))
    .catch((e) => {
      console.error("candidate error", e);
      console.log("DOMException name: ", e.name); 
console.log("DOMException message: ", e.message);
console.log("DOMException code: ", e.code);
console.log("DOMException stack: ", e.stack);
    });
 
      
  
  
  }*/

    

      window.addEventListener('load', async () => {
  

        initializePc()
      })

      function handleWsMessage(msg) {
        try {
          if (msg.deviceId) {
            deviceId = msg.deviceId
          }

          if (msg.sessionId) {
            sessionId = msg.sessionId
          }



          switch (msg.type) {
            case 'participants':
              sendMessageToFlutter(msg)
              break
            case 'offer':

              handleOffer(msg)
              sendMessageToFlutter({
                type: 'offer',
                deviceId: deviceId,
                sessionId: msg.sessionId
              })
              break
            case 'answer':
              console.log('answer', msg.value)

              handleAnswer(msg)
              break
            case 'candidate':
              handleCandidate(msg)
              break
            case 'close':
              sendMessageToFlutter({ type: 'hangup', deviceId: deviceId })
              closeCommunication()
              break

            case 'hangup':
              sendMessageToFlutter(msg)
              closeCommunication()
              break

            case 'disconnect':
              setTimeout(() => {
                sendMessageToFlutter({ type: 'disconnect' })
              }, 5000)
              break

              break
          }
        } catch (e) {
          console.error('WebSocket mesaj parse hatası:', e)
        }
      }

      function initWebSocket() {
        ws = new WebSocket(wsUrl)

        // Bağlantı açıldığında çalışacak kısım
        ws.onopen = event => {
          console.log('WebSocket bağlantısı açıldı.', event)
          connected = true
        }

        // Sunucudan gelen mesajları yakalayacağınız kısım
        ws.onmessage = event => {
          const msg = JSON.parse(event.data)
          connected = true
          handleWsMessage(msg)
        }

        // Bağlantı kapandığında çalışacak kısım
        ws.onclose = event => {
          console.log('WebSocket bağlantısı kapandı.', event)
          sendMessageToFlutter({ type: 'hangup' })
          closeCommunication()
          connected = false
        }

        // Hata durumlarını yakaladığınız kısım
        ws.onerror = error => {
          console.error('WebSocket hatası:', error)
          console.error('WebSocket hatası:',JSON.stringify(error))
          connected = false
          setTimeout(() => {
              initWebSocket()
            }, 5000)
            
        }
      }
    </script>
  </body>
</html>

Stacktrace/Logs

Stacktrace/Logs
I/chromium( 7051): [INFO:CONSOLE(605)] "pendingCandidates [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]", source: http://localhost:8090/index.html (605)
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: pendingCandidates [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]}
I/chromium( 7051): [INFO:CONSOLE(467)] "connectionstatechange connecting", source: http://localhost:8090/index.html (467)
I/chromium( 7051): [INFO:CONSOLE(469)] "connectionstatechange event: [object Event]", source: http://localhost:8090/index.html (469)
I/chromium( 7051): [INFO:CONSOLE(471)] "[object Event]", source: http://localhost:8090/index.html (471)
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: connectionstatechange connecting}
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: connectionstatechange event: [object Event]}
I/chromium( 7051): [INFO:CONSOLE(474)] "Event type: connectionstatechange", source: http://localhost:8090/index.html (474)
I/chromium( 7051): [INFO:CONSOLE(478)] "connectionState: connecting", source: http://localhost:8090/index.html (478)
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: [object Event]}
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: Event type: connectionstatechange}
[AndroidInAppWebViewController] (android) WebView ID 0 calling "onConsoleMessage" using {messageLevel: 1, message: connectionState: connecting}
2
W/chromium( 7051): [WARNING:socket_tcp.cc(134)] Error from connecting socket, result=-102

Flutter version

3.27.1

Operating System, Device-specific and/or Tool

Android default flutter sdk version

 defaultConfig {
   
        applicationId = "com.example.intercom_indoor"
        minSdk = flutter.minSdkVersion
        targetSdk = flutter.targetSdkVersion
        versionCode = flutter.versionCode
        versionName = flutter.versionName
    }

Plugin version

6.1.5 , 6.2.0 beta 2

Additional information

I tried both 6.1.5 and 6.2.0 beta 2 versions but same problem
flutter doctor results

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.1.1 24B91 darwin-arm64, locale tr-TR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.96.4)
[✓] Connected device (7 available)
[✓] Network resources

Self grab

  • I'm ready to work on this issue!
@xyzbilal xyzbilal added the bug Something isn't working label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant