28

I had this page open in Chrome 60: Call a function from another file in Python

(I have/had 25 other tabs open at the same time.)

And my computer would not go into sleep mode (while connected to power source) -

pmset -g assertions
2017-09-16 09:58:56 +0200
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 4017(Google Chrome): [0x0001c1620001a530] 01:43:47 NoIdleSleepAssertion named: "WebRTC has active PeerConnections"
   pid 187(coreaudiod): [0x0001c1620001862b] 01:43:47 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutput:1F,3,0,1,1:0.context.preventuseridlesleep"
    Created for PID: 4017.
   pid 102(hidd): [0x0001d8d10009a6a8] 00:03:48 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968233.11"
    Timeout will fire in 58 secs Action=TimeoutActionRelease
Kernel Assertions: 0x124=USB,THNDR,MAGICWAKE
   id=502  level=255 0x20=THNDR mod=2017-09-16, 09:58 description=NHI0 owner=AppleThunderboltHAL
   id=505  level=255 0x100=MAGICWAKE mod=2017-09-15, 23:52 description=en0 owner=en0
   id=1352  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03400000 owner=USB audio CODEC
   id=1357  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.02200000 owner=USB 2.0 BILLBOARD
   id=1358  level=255 0x100=MAGICWAKE mod=2017-09-16, 07:34 description=en7 owner=en7
   id=1407  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03500000 owner=USB5534B
   id=1409  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03100000 owner=USB2134B
   id=1411  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03120000 owner=Razer Abyssus
   id=1412  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03110000 owner=USB Multimedia Keyboard
Idle sleep preventers: IODisplayWrangler

chrome://webrtc-internals/ is showing:

https://stackoverflow.com/questions/20309456/how-to-call-a-function-from-another-file-in-python, { iceServers: [], iceTransportPolicy: all, bundlePolicy: balanced, rtcpMuxPolicy: require, iceCandidatePoolSize: 0 },

Stats Tables
googLibjingleSession_960116030958803171 (googLibjingleSession)
Statistics googLibjingleSession_960116030958803171
timestamp    16/09/2017, 10:02:16
googInitiator    false

and

https://stackoverflow.com/questions/20309456/how-to-call-a-function-from-another-file-in-python, { iceServers: [], iceTransportPolicy: all, bundlePolicy: balanced, rtcpMuxPolicy: require, iceCandidatePoolSize: 0 },

Stats Tables
googLibjingleSession_1302693407116520926 (googLibjingleSession)
Statistics googLibjingleSession_1302693407116520926
timestamp    16/09/2017, 10:02:32
googInitiator    false

Closing said tab yields:

2017-09-16 10:03:11 +0200
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 102(hidd): [0x0001d8d10009a6a8] 00:08:03 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968219.3"
    Timeout will fire in 55 secs Action=TimeoutActionRelease
Kernel Assertions: 0x124=USB,THNDR,MAGICWAKE
   id=502  level=255 0x20=THNDR mod=2017-09-16, 09:58 description=NHI0 owner=AppleThunderboltHAL
   id=505  level=255 0x100=MAGICWAKE mod=2017-09-15, 23:52 description=en0 owner=en0
   id=1352  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03400000 owner=USB audio CODEC
   id=1357  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.02200000 owner=USB 2.0 BILLBOARD
   id=1358  level=255 0x100=MAGICWAKE mod=2017-09-16, 07:34 description=en7 owner=en7
   id=1407  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03500000 owner=USB5534B
   id=1409  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03100000 owner=USB2134B
   id=1411  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03120000 owner=Razer Abyssus
   id=1412  level=255 0x4=USB mod=1970-01-01, 01:00 description=com.apple.usb.externaldevice.03110000 owner=USB Multimedia Keyboard
Idle sleep preventers: IODisplayWrangler

After reopening the page, the webrt-internals page is empty, and no new power management assertions are taken.

I have not seen this issue before on Stack Overflow - is it a bug in Chrome 60 or on Stack Overflow?

Why does Stack Overflow acquire the WebRTC API at all?

10
  • 13
    What makes you think SO does anything that could possibly affect power management on a device? (Unless HTML and javascript in a browser have suddenly become way more powerful and no one's told me...)
    – Jon Clements Mod
    Commented Sep 16, 2017 at 8:10
  • 11
    Blame Chrome - I usually do, and I'm rarely wrong. Commented Sep 16, 2017 at 13:38
  • 28
    @JonClements I'll look past your unhelpful irony, and hand you some links to APIs that prevent computer sleep: chrome.power API developer.chrome.com/apps/power The WakeLock API draft w3.org/TR/wake-lock It does not seem far fetched that WebRTC would prevent the computer from sleeping. The question you (or, rather I) should be asking - why does SO acquire the WebRTC API at all? Commented Sep 16, 2017 at 14:17
  • 4
    @ErikZ that seems like a much more useful/answerable question than is it a bug in Chrome 60 or on Stack Overflow??
    – Jon Clements Mod
    Commented Sep 16, 2017 at 14:19
  • 2
    @JonClements I have edited my question in that way now. Thank you. Commented Sep 16, 2017 at 14:22
  • 1
    Could this come from an ad / external analytic? I can't repro neither on said page nor any other on chrome 61.
    – Kaiido
    Commented Sep 16, 2017 at 15:14
  • @Kaiido that sounds plausible! Commented Sep 16, 2017 at 15:48
  • 1
    Possibly related meta.stackoverflow.com/q/356651/792066
    – Braiam
    Commented Sep 17, 2017 at 15:12
  • Also possibly related: superuser.com/questions/1174091/…
    – mattm
    Commented Sep 18, 2017 at 3:54
  • 3
    @mattm I'm afraid it's more a sneaky use like shown in stackoverflow.com/a/32841164/3702797
    – Kaiido
    Commented Sep 18, 2017 at 4:43

1 Answer 1

26

As commented and linked by comments to my question above, the probable source of the bug in my question is an advertisement. Furthermore, the reason for using WebRTC seems to be that it is a way for advertisements / trackers to get my IP address.

Sources from the comments section:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .