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

Username undefined in catalogue view #1187

Closed
jykae opened this issue Jun 20, 2016 · 6 comments
Closed

Username undefined in catalogue view #1187

jykae opened this issue Jun 20, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@jykae
Copy link
Contributor

jykae commented Jun 20, 2016

Latest develop in catalogue view might give "username" undefined.
It seems to work as "admin" user but normal user OR not logged in user gets empty catalogue page and client console log "username undefined.

Apologies, this is caused by my helper with insufficient error handling: https://github.com/apinf/api-umbrella-dashboard/blob/develop/apis/collection/backend.js#L781

TypeError: Cannot read property 'username' of undefined
    at http://localhost:3000/app/app.js?hash=1bab8dd88c2d06a5ae5f223f17745bd4afe72b1d:5596:42
    at Array.map (native)
    at Function._.map._.collect (http://localhost:3000/packages/underscore.js?hash=27b3d669b418de8577518760446467e6ff429b1e:167:56)
    at Document.getApiManagersByName (http://localhost:3000/app/app.js?hash=1bab8dd88c2d06a5ae5f223f17745bd4afe72b1d:5593:27)
    at http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:245:19
    at Spacebars.call (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:172:18)
    at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:106:25)
    at Object.Spacebars.mustache (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:110:39)
    at ._render (http://localhost:3000/app/app.js?hash=1bab8dd88c2d06a5ae5f223f17745bd4afe72b1d:32643:24)
    at doRender (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2027:25)
@jykae jykae added the bug label Jun 20, 2016
@jykae
Copy link
Contributor Author

jykae commented Jun 21, 2016

Update: did not occur with normal user in nightly as I checked out this morning. To be verified and checked later whether this was wrong call..

@saralavanip
Copy link
Contributor

saralavanip commented Jun 21, 2016

@jykae, @bajiat , verified on nightly.apinf.io : Sign in as anonymous user/regular user /API owner shows empty catalog page.

Screenshot:
empty_catalog_page

@jykae jykae self-assigned this Jun 21, 2016
@jykae
Copy link
Contributor Author

jykae commented Jun 21, 2016

ok, thanks @saralavanip
Taking a look.

@jykae
Copy link
Contributor Author

jykae commented Jun 21, 2016

As part of this I may have found reason why @saralavanip Managed APIs disappear on nightly. I am getting on adding API backend: "insert failed: Access denied. No allow validators set on restricted collection for method 'insert'." Anyway, that somehow succeeds on the client minimongo and is visible on the client but on the server side Mongo allow/deny rules restrict the addition to persistent storage.

So My Managed APIs disappear also locally after Meteor server restart when doing changes for code.

@55
Copy link
Contributor

55 commented Jun 21, 2016

@saralavanip, please confirm.

@55 55 reopened this Jun 21, 2016
@jykae jykae closed this as completed Jun 22, 2016
@jykae jykae added this to the Sprint 25 milestone Jun 22, 2016
@saralavanip
Copy link
Contributor

saralavanip commented Jun 22, 2016

Verified this resolved issue.

Findings:
@jykae , Info text for all APIs shown as 'Added by admin' by default.

Screenshot:
catalog_added_api_admin

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

No branches or pull requests

3 participants