peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Calling `close` on an incoming UNANSWERED call does not fire the outgoing call's `close` event

Open vladmashk opened this issue 11 months ago • 5 comments

Please, check for existing issues to avoid duplicates.

  • [x] No similar issues found.

What happened?

(Note, issues #636, #734, #752, #780, #832, #1032, #1084, #1089 and undoubtably more are similar to this, however they are all about calling close on an answered call, so the fix for this (commit e3b67a6) doesn't fix this issue.)

If Alice calls Bob and Bob 'declines' the call by calling close on it without answering it, Alice's call doesn't fire the close event.

I have found that you can work around this by having Bob answer the call without passing a stream and then call close on the call after a small amount of time. However, this seems like a hack. It shouldn't have to work this way.

How can we reproduce the issue?

  1. Alice calls Bob
  2. Bob calls close on the call without answering
  3. The close event handler that Alice has set doesn't execute

What do you expected to happen?

The close event handler that Alice has set DOES execute

Environment setup

  • OS: Windows 11
  • Platform:
  • Browser: Chrome, Firefox

Is this a regression?

No response

Anything else?

No response

vladmashk avatar Jan 04 '25 11:01 vladmashk

I am also experiencing this!

therealPaulPlay avatar Jan 18 '25 00:01 therealPaulPlay

how to resolve this problem?

radiorz avatar Feb 26 '25 02:02 radiorz

Pretty sure this is related to this Chrome bug that I reported: https://issuetracker.google.com/issues/395420661

therealPaulPlay avatar Mar 25 '25 17:03 therealPaulPlay

Isn't this a privacy feature rather than a bug? The connection reveals potentially sensitive information about the parties involved, so there should be a way to ignore the connection early in the signaling process to avoid exchanging that information.

Edited for clarity.

FlippingBinary avatar Apr 09 '25 12:04 FlippingBinary

Same problem here, on firefox

ryssbowh avatar Oct 03 '25 05:10 ryssbowh