From 60e2b6b58fe3799d0db220f7d70362309a2dddeb Mon Sep 17 00:00:00 2001 From: Dennis Li Date: Tue, 15 Aug 2017 12:09:19 -0700 Subject: [PATCH] Temp fix for bad cookies --- dist/manifest.json | 2 +- src/CirculatorManagerView.tsx | 34 ++++++++++++++++++++-------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dist/manifest.json b/dist/manifest.json index 7b0f1de..7000446 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -3,7 +3,7 @@ "name": "Chrome Joule", "description": "Chrome app to control Joule", - "version": "0.0.1", + "version": "0.0.2", "browser_action": { "default_icon": "icon.png", diff --git a/src/CirculatorManagerView.tsx b/src/CirculatorManagerView.tsx index f75aaed..f7f09c3 100644 --- a/src/CirculatorManagerView.tsx +++ b/src/CirculatorManagerView.tsx @@ -29,19 +29,24 @@ class CirculatorManagerView extends React.Component { return } - this.state.circulatorManager.initiateCirculatorManager(userInfo) - await this.state.circulatorManager.circulatorScan() - await this.state.circulatorManager.findLastAccessedCirculator() - - this.state.circulatorManager.currentCirculatorClient.dataObserver.start().progress((data) => { - // HACK to also triggers an update in client.data - this.setState({ circulatorData: data }) - }) - - this.setState({ - userInfo, - authorizing: false, - }) + try { + this.state.circulatorManager.initiateCirculatorManager(userInfo) + await this.state.circulatorManager.circulatorScan() + await this.state.circulatorManager.findLastAccessedCirculator() + this.state.circulatorManager.currentCirculatorClient.dataObserver.start().progress((data) => { + // HACK to also triggers an update in client.data + this.setState({ circulatorData: data }) + }) + this.setState({ + userInfo, + authorizing: false, + }) + } catch (error) { + console.error("Unknown error ocurred", error) + this.setState({ + authorizing: false, + }) + } } public componentWillMount() { @@ -103,7 +108,8 @@ class CirculatorManagerView extends React.Component { Please make sure you are logged in - on chefsteps.com and have cookies enabled + on at chefsteps.com and + have cookies enabled. You can also try logging out and back in.