Element-web: JS console is being spammed with Promise being deprecated

Created on 27 Sep 2018  路  9Comments  路  Source: vector-im/element-web

Warning: Promise.defer is deprecated and will be removed in a future version. Use new Promise instead.

This started happening with the webpack 4 changes

maintenance p1 question

All 9 comments

The last thing the console needs is more spam.

What's the right way to fix this? Silence the warnings? Or heed them?

I'd vote for fixing them. They seem to be coming from deep within the js-sdk, so this may be non-trivial to fix. I'm not sure suppressing them is a good idea given it's already at the deprecation stage and we risk forgetting about it and having it all break down on us.

Hopefully they are all that simple...

Current status: I turned the warnings off in https://github.com/vector-im/riot-web/pull/7462 https://github.com/matrix-org/matrix-react-sdk/pull/2198 and https://github.com/matrix-org/matrix-js-sdk/pull/757 . @aaronraimist fixed the ones in riot-web and tuned warnings back on in https://github.com/vector-im/riot-web/pull/7444 but there are still plenty in react-sdk and js-sdk.

Actually I didn't turn them back on. I tried. It seems like when I did it turned the warnings back on in Riot-web, they also turned back on for matrix-react-sdk and matrox-js-sdk.

There are a few more I can do in matrix-react-sdk but I'm afraid there are a bunch that I'm not sure if I understand enough to be able to rewrite them.

Not-so related to this topic, but do you know a way to turn off ALL console logs? I heard that logs are very important for you guys, but they might cause performance (possibly security) issues. Have you tried to hide them through a babelrc / webpack configuration?

Thanks for the answer!

@sparky-raccoon this is the kind of question that is better answered in #riot-web:matrix.org than on a github issue. To answer it though: performance is marginally impacted by the console logging as we don't spam it. Where there are security issues, please report them to us under https://matrix.org/security-disclosure-policy/

Bluebird is now gone :D

Was this page helpful?
0 / 5 - 0 ratings