Summary:
See D23051239 Since the crash reporter endpoint does not exist anymore, and no data was reported there, removing the corresponding code from Flipper as well. This also fixes the last remaining startup warning as well :) Reviewed By: priteshrnandgaonkar Differential Revision: D23472612 fbshipit-source-id: 7ce9f6a0261cdfe197a7da9b28a86407299effec
This commit is contained in:
committed by
Facebook GitHub Bot
parent
70d28bc60d
commit
9785a03ebd
@@ -22,7 +22,6 @@ import dispatcher from './dispatcher/index';
|
|||||||
import TooltipProvider from './ui/components/TooltipProvider';
|
import TooltipProvider from './ui/components/TooltipProvider';
|
||||||
import config from './utils/processConfig';
|
import config from './utils/processConfig';
|
||||||
import {initLauncherHooks} from './utils/launcher';
|
import {initLauncherHooks} from './utils/launcher';
|
||||||
import initCrashReporter from './utils/electronCrashReporter';
|
|
||||||
import fbConfig from './fb-stubs/config';
|
import fbConfig from './fb-stubs/config';
|
||||||
import {isFBEmployee} from './utils/fbEmployee';
|
import {isFBEmployee} from './utils/fbEmployee';
|
||||||
import WarningEmployee from './chrome/WarningEmployee';
|
import WarningEmployee from './chrome/WarningEmployee';
|
||||||
@@ -118,7 +117,6 @@ function init() {
|
|||||||
ReactDOM.render(<AppFrame />, document.getElementById('root'));
|
ReactDOM.render(<AppFrame />, document.getElementById('root'));
|
||||||
initLauncherHooks(config(), store);
|
initLauncherHooks(config(), store);
|
||||||
const sessionId = store.getState().application.sessionId;
|
const sessionId = store.getState().application.sessionId;
|
||||||
initCrashReporter(sessionId || '');
|
|
||||||
registerRecordingHooks(store);
|
registerRecordingHooks(store);
|
||||||
enableConsoleHook();
|
enableConsoleHook();
|
||||||
window.flipperGlobalStoreDispatch = store.dispatch;
|
window.flipperGlobalStoreDispatch = store.dispatch;
|
||||||
|
|||||||
@@ -1,55 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
* @format
|
|
||||||
*/
|
|
||||||
|
|
||||||
import {exists, mkdir} from 'fs';
|
|
||||||
import {promisify} from 'util';
|
|
||||||
import {crashReporter, remote} from 'electron';
|
|
||||||
import isProduction from '../utils/isProduction';
|
|
||||||
import constants from '../fb-stubs/constants';
|
|
||||||
import {tmpName as tmpNameCallback, TmpNameOptions} from 'tmp';
|
|
||||||
import {resolve} from 'path';
|
|
||||||
|
|
||||||
const tmpName = promisify(tmpNameCallback) as (
|
|
||||||
options?: TmpNameOptions,
|
|
||||||
) => Promise<string>;
|
|
||||||
|
|
||||||
// Cross platform way to find the /tmp directory or equivalent.
|
|
||||||
// The tempPath set should be persistent across app restarts.
|
|
||||||
const tempPathPromise: Promise<string> = tmpName({
|
|
||||||
template: 'tmp-XXXXXX',
|
|
||||||
}).then((name) => resolve(name, '..', 'flipper'));
|
|
||||||
|
|
||||||
export default function initCrashReporter(sessionId: string): Promise<void> {
|
|
||||||
const flipperVersion = remote.app.getVersion();
|
|
||||||
return tempPathPromise.then((tempPath) => {
|
|
||||||
return promisify(exists)(tempPath)
|
|
||||||
.then((pathExists) => {
|
|
||||||
if (!pathExists) {
|
|
||||||
return promisify(mkdir)(tempPath);
|
|
||||||
}
|
|
||||||
return Promise.resolve();
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
remote.app.setPath('temp', tempPath);
|
|
||||||
const electronCrashReporterArgs = {
|
|
||||||
productName: 'Flipper',
|
|
||||||
companyName: 'Facebook',
|
|
||||||
submitURL: 'https://www.facebook.com/intern/flipper/crash_upload',
|
|
||||||
uploadToServer: isProduction() && !constants.IS_PUBLIC_BUILD,
|
|
||||||
ignoreSystemCrashHandler: true,
|
|
||||||
extra: {
|
|
||||||
flipper_version: flipperVersion,
|
|
||||||
session_id: sessionId,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
remote.crashReporter.start(electronCrashReporterArgs);
|
|
||||||
crashReporter.start(electronCrashReporterArgs);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user