Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web interface broken in MacOS Chrome #21

Open
paultiplady opened this issue Jul 29, 2016 · 2 comments
Open

Web interface broken in MacOS Chrome #21

paultiplady opened this issue Jul 29, 2016 · 2 comments

Comments

@paultiplady
Copy link

On Chrome MacOS, the web interface in 0.20.0 is completely broken for me; I'm getting this error on pageload:

angular-1.3.8.js:11594 TypeError: $scope.openStream is not a function
    at HTMLDocument.<anonymous> (controllers.js:100)
    at j (jquery-1.11.0.min.js:2)
    at Object.add [as done] (jquery-1.11.0.min.js:2)
    at n.fn.ready (jquery-1.11.0.min.js:2)
    at n.fn.init (jquery-1.11.0.min.js:2)
    at n (jquery-1.11.0.min.js:2)
    at new <anonymous> (controllers.js:99)
    at Object.invoke (angular-1.3.8.js:4182)
    at extend.instance (angular-1.3.8.js:8441)
    at angular-1.3.8.js:7693
    at forEach (angular-1.3.8.js:331)
    at nodeLinkFn (angular-1.3.8.js:7692)
    at compositeLinkFn (angular-1.3.8.js:7075)
    at compositeLinkFn (angular-1.3.8.js:7078)
    at publicLinkFn (angular-1.3.8.js:6954)
    at hint.js:1480
    at angular-1.3.8.js:1451
    at Scope.$eval (angular-1.3.8.js:14383)
    at Scope.$apply (angular-1.3.8.js:14482)
    at Scope.scopePrototype.$apply (hint.js:1427)
    at bootstrapApply (angular-1.3.8.js:1449)
    at Object.invoke (angular-1.3.8.js:4182)
    at doBootstrap (angular-1.3.8.js:1447)
    at Object.angular.resumeBootstrap (angular-1.3.8.js:1475)
    at maybeBootstrap (hint.js:569)(anonymous function) @ angular-1.3.8.js:11594(anonymous function) @ angular-1.3.8.js:8544$apply @ angular-1.3.8.js:14484scopePrototype.$apply @ hint.js:1427bootstrapApply @ angular-1.3.8.js:1449invoke @ angular-1.3.8.js:4182doBootstrap @ angular-1.3.8.js:1447angular.resumeBootstrap @ angular-1.3.8.js:1475maybeBootstrap @ hint.js:569
angular-1.3.8.js:9814 GET http://localhost:8025/api/v2/jim 404 (Not Found)

Shot in the dark, could it be that the lack of statement terminator on the line before the declaration of openStream is causing problems? I'd expect either a ; or \n to terminate the toggleStream declaration statement.

The UI works for me in MacOS Safari, so it's not fundamentally broken.

@paultiplady
Copy link
Author

Quickly verified that manually declaring the variable $scope.openStream just before hitting that line resolves the problem, so that supports the hypothesis above.

Suggest you use a linter to detect all instances of this problem, since it could cause havoc in unpredictable ways.

@ian-kent
Copy link
Member

I can't seem to reproduce this? Also on Chrome on Mac OS (54.0.2840.71 (64-bit) on Sierra 10.12.1)

Looking at the code, I think toggleStream declaration is ended with a \n? Happy to add a ; if that'll help though!

Admittedly the javascript code is a mess and in need of a bit of attention 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants