Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά παραβίασης».

Μάθετε περισσότερα

Firefox 148: DataChannel send() fails with InvalidStateError after onopen triggers

  • Καμία απάντηση
  • 0 έχουν αυτό το πρόβλημα
  • 91 προβολές
  • Open

WebRTC DataChannel worked perfectly in Firefox 147 and earlier, but after upgrading to Firefox 148, send() throws InvalidStateError immediately after onopen fires. Same code works in Chrome and previous Firefox versions.

const dataChannel = pc.createDataChannel('kvsDataChannel', {

   ordered: true,
   maxPacketLifeTime: 3000

});

dataChannel.onopen = () => {

   console.log('open, state:', dataChannel.readyState); // Shows "open"
   try {
       dataChannel.send('hello'); // Throws InvalidStateError
   } catch (e) {
       console.error('Failed:', e.name, e.message);
   }

};

Error: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable

Environment: Firefox 148.0: Fails OS: Windows 11 Firefox 147 and earlier: Works

Question: What changed in Firefox 148 that broke DataChannel send()? Any workaround while this gets fixed?

WebRTC DataChannel worked perfectly in Firefox 147 and earlier, but after upgrading to Firefox 148, send() throws InvalidStateError immediately after onopen fires. Same code works in Chrome and previous Firefox versions. ''const dataChannel = pc.createDataChannel('kvsDataChannel', { ordered: true, maxPacketLifeTime: 3000 }); dataChannel.onopen = () => { console.log('open, state:', dataChannel.readyState); // Shows "open" try { dataChannel.send('hello'); // Throws InvalidStateError } catch (e) { console.error('Failed:', e.name, e.message); } };'' '''Error''': InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable '''Environment''': Firefox 148.0: Fails OS: Windows 11 Firefox 147 and earlier: Works '''Question''': What changed in Firefox 148 that broke DataChannel send()? Any workaround while this gets fixed?

Πρέπει να συνδεθείτε στον λογαριασμό σας για να απαντήσετε σε δημοσιεύσεις. Ξεκινήστε μια νέα ερώτηση εάν δεν διαθέτετε ακόμα λογαριασμό.