question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception right after login

See original GitHub issue

So I was giving this project a try but as soon as I click that “Login” button it throws an exception. It only does it, when the user and password match with what’s in users.json. It does not crash when it was not able to login but shows the login page again as expected.

TypeError: Cannot read property 'length' of undefined
   at Object.select (<PATH>\node_modules\express-admin\lib\qb\lst.js:42:27)
   at _data (<PATH>\node_modules\express-admin\routes\listview.js:38:9)
   at Object.exports.get [as handle] (<PATH>\node_modules\express-admin\routes\listview.js:26:2)
   at next_layer (<PATH>\node_modules\express-admin\node_modules\express\lib\router\route.js:103:13)
   at Object.exports.restrict [as handle] (<PATH>\node_modules\express-admin\routes\auth.js:20:31)
   at next_layer (<PATH>\node_modules\express-admin\node_modules\express\lib\router\route.js:103:13)
   at Route.dispatch (<PATH>\node_modules\express-admin\node_modules\express\lib\router\route.js:107:5)
   at <PATH>\node_modules\express-admin\node_modules\express\lib\router\index.js:213:24
   at Function.proto.process_params (<PATH>\node_modules\express-admin\node_modules\express\lib\router\index.js:286:12)
   at next (<PATH>\node_modules\express-admin\node_modules\express\lib\router\index.js:207:19)

Anyone experienced the same problem?

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bnnycommented, May 12, 2015

I ran into the same problem. I am using an sqlite db without explicitly specified primary keys. Adding “pk”: “rowid” to every table in settings.json fixed it for me.

0reactions
jb92130commented, Aug 1, 2017

Hello,

Same for me like bnny, I’d to add the pk. The generator doesn’t detect the pk. Same for the kind of field. If it’s date, I’d to change manually in the config for the controller.

Kind regards.

JB.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Would it be appropriate to throw exceptions for login/register ...
Exceptions are slow and don't serve any better purpose than your own validation, so it sounds like you did it right the first...
Read more >
Exceptions
The login method needs to throw an exception reporting that the login failed. ... Here, if we omit the catch on LoginFailedException, Java...
Read more >
Windows 10 Login UI Application Error - The exception ...
In the Task Manager window under startup tab, right click on each startup item which are enabled and select 'Disable'. g) Click 'OK',...
Read more >
How to Fix the System Service Exception Stop Code in ...
In the Start menu search bar, input cmd, then right-click on Command Prompt and select Run as administrator. When the Command Prompt launches,...
Read more >
Fix: The Exception Breakpoint Has Been Reached
This error message will usually pop up while opening or running some apps. But you may also see it right after logging in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found