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

[Desktop] Brave Shields causes createOffer/createAnswer to resolve to undefined when on IP domain #11141

Open
t-mullen opened this issue Aug 9, 2020 · 3 comments
Labels
needs-more-info The report requires more detail before we can decide what to do with this issue. OS/Desktop

Comments

@t-mullen
Copy link

t-mullen commented Aug 9, 2020

Description

When Brave Shields is enabled, RTCPeerConnection.createOffer and RTCPeerConnection.createAnswer can resolve to undefined. The issue occurs when on an IP domain (e.g. 127.0.0.1 and possibly others).

Steps to Reproduce

  1. Enable Shields.
  2. Run the following script on the 127.0.0.1 domain (not localhost)
var pc = new RTCPeerConnection({
  iceServers: [
    {
      urls: [
        'stun:stun.l.google.com:19302',
        'stun:global.stun.twilio.com:3478'
      ]
    }
  ],
  sdpSemantics: 'unified-plan'
})
pc.createOffer().then((offer) => {
  console.log('offer:', offer) // undefined, against specification
})
  1. Disable Shields and refresh.
  2. Observe the above script no longer resolves to undefined.

Actual result:

Brave Shields breaks WebRTC on the 127.0.0.1 domain by causing these core WebRTC methods to resolve incorrectly.

Expected result:

Brave Shields should either reject these promises with an error or allow them to resolve correctly.

Reproduces how often:

Easily reproduced.

Brave version (brave://version info)

Version 1.10.97 Chromium: 83.0.4103.116 (Official Build) (64-bit) OSX

Version/Channel Information:

  • Can you reproduce this issue with the current release?
    Yes.

  • Can you reproduce this issue with the beta channel?
    Unknown - can try to reproduce if it would help.

  • Can you reproduce this issue with the nightly channel?
    Unknown - can try to reproduce if it would help.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
    Yes.

  • Does the issue resolve itself when disabling Brave Rewards?
    No.

  • Is the issue reproducible on the latest version of Chrome?
    No.

Miscellaneous Information:

See discussion of this issue here feross/simple-peer#701.

@t-mullen t-mullen changed the title [Desktop] Brave Shields causes createOffer/createAnswer to resolve to undefined [Desktop] Brave Shields causes createOffer/createAnswer to resolve to undefined when on local IP Aug 9, 2020
@t-mullen
Copy link
Author

t-mullen commented Aug 9, 2020

Updated issue to note that this behaviour is consistent when accessing 127.0.0.1 and possibly other IP domains.

@t-mullen t-mullen changed the title [Desktop] Brave Shields causes createOffer/createAnswer to resolve to undefined when on local IP [Desktop] Brave Shields causes createOffer/createAnswer to resolve to undefined when on IP domain Aug 9, 2020
@cjwijtmans
Copy link

localhost can also be ::1

@rebron
Copy link
Collaborator

rebron commented Sep 11, 2020

cc: @jumde Can you take a look?

@rebron rebron added the needs-more-info The report requires more detail before we can decide what to do with this issue. label Sep 11, 2020
@rebron rebron added this to General May 28, 2024
@rebron rebron moved this to Needs Info in General May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info The report requires more detail before we can decide what to do with this issue. OS/Desktop
Projects
Status: Needs Info
Development

No branches or pull requests

3 participants