Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

After restarting with the installation of Teletype, Atom throws the error: Cannot redefine property: ontrack #382

Closed
rubin110 opened this issue May 27, 2018 · 6 comments
Labels

Comments

@rubin110
Copy link

rubin110 commented May 27, 2018

edit by @rsese to add a couple of notes

Also reproducible on macOS 10.12.6 off of 1.29.0-dev-74c496ccd.

And as mentioned in #382 (comment), looks like no error on 1.27.1.


Description

After restarting with the installation of Teletype, Atom throws the error: Cannot redefine property: ontrack

Steps to Reproduce

  1. @annthurium wants to show you something cool and asks you to install Teletype
  2. Open Atom 1.28.0-beta1 on a machine running Debian Sid under KDE 5.12.5
  3. Install Teletype 1.32.2
  4. Restart Atom
  5. Observe

Expected:
Atom opens and @annthurium shows you a cool thing.

Actual:
Atom opens and throws the following error:

TypeError: Cannot redefine property: ontrack
    at Function.defineProperty (<anonymous>)
    at Object.wrapPeerConnectionEvent (/home/rubin110/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/utils.js:60:10)
    at Object.shimSenderReceiverGetStats (/home/rubin110/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js:288:13)
    at module.exports (/home/rubin110/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/adapter_factory.js:76:18)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/adapter_core.js:13:18)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/webrtc-adapter/src/js/adapter_core.js:15:3)
    at Module.get_Module._compile (/usr/share/atom-beta/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom-beta/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (file:///usr/share/atom-beta/resources/app.asar/static/index.js:47:45)
    at require (/usr/share/atom-beta/resources/app/src/native-compile-cache.js:66:33)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-connection.js:1:156)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-connection.js:280:3)
    at Module.get_Module._compile (/usr/share/atom-beta/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom-beta/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (file:///usr/share/atom-beta/resources/app.asar/static/index.js:47:45)
    at require (/usr/share/atom-beta/resources/app/src/native-compile-cache.js:66:33)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-pool.js:3:24)
    at Object.<anonymous> (/home/rubin110/.atom/packages/teletype/node_modules/@atom/teletype-client/lib/peer-pool.js:194:3)
    at Module.get_Module._compile (/usr/share/atom-beta/resources/app/src/native-compile-cache.js:106:36)
    at Object.value [as .js] (/usr/share/atom-beta/resources/app/src/compile-cache.js:240:29)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (file:///usr/share/atom-beta/resources/app.asar/static/index.js:47:45)

Reproduces how often:

100% of the time

Versions

Atom 1.28.0-beta1
Debian Sid under KDE 5.12.5
Teletype 1.32.2

@rubin110
Copy link
Author

I should note this works fine with Atom stable, 1.27.1.

bitmoji

@maritzuhcom
Copy link

Seeing same issue

Atom       : 1.28.0-beta1
Electron  : 2.0.1
Chrome   : 61.0.3163.100
Node        : 8.9.3
teletype   : 0.13.2

@rsese
Copy link

rsese commented May 28, 2018

Thanks for the report @rubin110 - reproduced on macOS 10.12.6 with Atom 1.29.0-dev-74c496ccd. In my case I didn't need to restart, just installing Teletype was enough to cause the error. The error pops up after restarting too though.

Also had 1.27.1 installed and didn't see the error there.

@rsese rsese added the bug label May 28, 2018
@50Wliu
Copy link
Contributor

50Wliu commented May 28, 2018

Should be fixed by upgrading to at least webrtc-adapter@6.2.0, which includes https://github.com/webrtc/adapter/pull/817. However, it looks like teletype-client should already be picking up that version?
https://github.com/atom/teletype-client/blob/f15e39c3ad451e8660781f72eb4eeee1ab4330d8/package.json#L18

@thomasjo
Copy link

@50Wliu Yes, except the published version is using v6.1.5, so someone with access to publish a new package on npm will need to bump the locked dependency and then publish a new version.

jasonrudolph added a commit to atom/teletype-client that referenced this issue May 29, 2018
Upgrading from webrtc-adapter 6.1.5 to 6.2.1 breaks the build similar to
the problem reported in atom/teletype#382. The
package-lock.json file already uses webrtc-adapter 6.1.5 👌, but when
apm installs the teletype package, webrtc-adapter `^6.1.5` gets resolved
to webrtc-adapter `6.x`, for the highest value of x. As a result, this
currently resolves to 6.2.1, which causes the problems referenced above.
By depending on  to webrtc-adapter 6.1.y, we resolve the issue. 😅

[1] https://travis-ci.org/atom/teletype-client/jobs/385265540#L1006
@jasonrudolph
Copy link
Contributor

@rubin110: Thanks for reporting this issue. ⚡🙇

We've published Teletype 0.13.3, and that should resolve this issue. If you continue to experience this problem, please let us know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants