Auth0 Home Blog Docs

Lock.js: Browser throwing console error: Can't find element with id login-content

lock
lockjs

#1

I’m using Auth0’s Lock. It’s all working great, however, I noticed that whenever I login I see the browser console throw an error message a few times:

Error: Can’t find element with id login-content

It points to: box.js Line 27. Does anyone know how I might be causing this? It doesn’t seem to be pointing to any of my code. The full stack trace is:

[Error] Error: Can't find element with id login-content
	ensure (lock.min.js:9:511392)
	render (lock.min.js:9:511573)
	(anonymous function) (lock.min.js:9:481895)
	(anonymous function) (lock.min.js:9:83664)
	forEach
	_change (lock.min.js:9:548041)
	M (lock.min.js:9:97853)

#2

I can get that exact error, Can't find element with id login-content, if I configure Lock with the container option pointing to a login-content element and that element is not available in my page.

If you’re using that option you need to ensure there’s a corresponding HTML element with the ID you provided, in this case the ID would be login-content.


#3

Hi,
Any update about this?
I’m having the same issue.

Regards


#4