halin
halin copied to clipboard
exception while running latest master in Development Mode
trafficstars
I followed the instruction in README, run halin locally on master:
halin git:(master) git rev-parse origin/master
c736e767515abbe0844c9a695b3f9ff8d63d92d2
After connecting to the database and pressing Diagnostic, I got the following error in browser:
TypeError: Cannot read property 'indexOf' of null
ProxyComponent.componentDidMount
src/components/diagnostic/GeneratePackage/GeneratePackage.js:116
113 | }
114 |
115 | componentDidMount() {
> 116 | if (window.halinContext.getCurrentUser().roles.indexOf('admin') === -1) {
| ^ 117 | return this.setState({ userIsAdmin: false });
118 | }
119 |
View compiled
▶ 4 stack frames were collapsed.
HTMLUnknownElement.sentryWrapped
src/helpers.ts:85
82 | // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
83 | // means the sentry.javascript SDK caught an error invoking your application code. This
84 | // is expected behavior and NOT indicative of a bug with sentry.javascript.
> 85 | return fn.apply(this, wrappedArguments);
| ^ 86 | // tslint:enable:no-unsafe-any
87 | } catch (ex) {
88 | ignoreNextOnError();
And I get another exception when pressing "About":
TypeError: Cannot read property 'length' of null
ProxyComponent.render
src/components/settings/DetectedSettings/DetectedSettings.js:23
20 | const ctx = window.halinContext;
21 |
22 | let roles = ctx.getCurrentUser().roles;
> 23 | if (roles.length === 0) {
| ^ 24 | roles = ['(no roles)'];
25 | }
26 |
View compiled
▶ 6 stack frames were collapsed.
HTMLUnknownElement.sentryWrapped
src/helpers.ts:85
82 | // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
83 | // means the sentry.javascript SDK caught an error invoking your application code. This
84 | // is expected behavior and NOT indicative of a bug with sentry.javascript.
> 85 | return fn.apply(this, wrappedArguments);
| ^ 86 | // tslint:enable:no-unsafe-any
87 | } catch (ex) {
88 | ignoreNextOnError();
View compiled
▶ 14 stack frames were collapsed.
HTMLDocument.sentryWrapped
src/helpers.ts:85
82 | // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
83 | // means the sentry.javascript SDK caught an error invoking your application code. This
84 | // is expected behavior and NOT indicative of a bug with sentry.javascript.
> 85 | return fn.apply(this, wrappedArguments);
| ^ 86 | // tslint:enable:no-unsafe-any
87 | } catch (ex) {
88 | ignoreNextOnError();
View compiled
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.
Sorry for the late response. With v0.16.0 halin has been deprecated, and unfortunately I'm not able to take up changes anymore. I'm not sure what the cause of this error is, but it may be related to running using Community. Given the age of this report, I'd suggest to try again with the latest.