Remove startup errors (#1484)

Summary:
This diff removes some irrelevant error messages that are always logged in the OSS build, and got even reported a few times.

The yarn lock file somehow got in a state where emotion/core was included twice (probably due to having a really old yarn version here), causing the logs view to crash. So fixed that manually.

P.S. the fact that the warning in the screenshot does not take the full width is an issue in console-feed component itself, I opened https://github.com/samdenty/console-feed/pull/50 for that

## Changelog

changelog: Removed some irrelevant errors from startup flow

Pull Request resolved: https://github.com/facebook/flipper/pull/1484

Test Plan:
Before

![Screenshot from 2020-08-19 14-18-51](https://user-images.githubusercontent.com/1820292/90639856-33454100-e227-11ea-8d34-94ec4e7ea61d.png)

After

![Screenshot from 2020-08-19 14-11-52](https://user-images.githubusercontent.com/1820292/90639881-3b9d7c00-e227-11ea-9cef-e3a96a89ba9d.png)

Reviewed By: jknoxville

Differential Revision: D23220937

Pulled By: mweststrate

fbshipit-source-id: 5f7b28adfbf99c938ad3abba75f26c6917463510
This commit is contained in:
Michel Weststrate
2020-08-21 10:05:19 -07:00
committed by Facebook GitHub Bot
parent 81eb09e7b0
commit 223f4ac2c5
2 changed files with 9 additions and 2 deletions

View File

@@ -38,8 +38,10 @@ async function isMetroRunning(): Promise<boolean> {
resolve(isMetro);
});
})
.on('error', (err) => {
console.debug('Could not connect to METRO ' + err);
.on('error', (err: any) => {
if (err.code !== 'ECONNREFUSED') {
console.error('Could not connect to METRO ' + err);
}
resolve(false);
});
});

View File

@@ -12,8 +12,13 @@ import {Logger} from '../fb-interfaces/Logger';
import {login, logout} from '../reducers/user';
import {getUser, logoutUser} from '../fb-stubs/user';
import {sideEffect} from '../utils/sideEffect';
import config from '../fb-stubs/config';
export default (store: Store, _logger: Logger) => {
if (!config.isFBBuild) {
return;
}
getUser()
.then((user) => {
store.dispatch(login(user));