okta / okta-signin-widget

HTML/CSS/JS widget that provides out-of-the-box authentication UX for your organization's apps
Other
376 stars 319 forks source link

remove() method results in "Uncaught TypeError: this.controller is undefined" #1397

Open eric-schmidt opened 4 years ago

eric-schmidt commented 4 years ago

I'm submitting a

Background info

I am receiving the following error when trying to call renderEl() via JS that runs multiple times on a page:

Uncaught Error: An instance of the widget has already been rendered. Call remove() first.

Seems like a simple enough fix -- just run remove() first before trying to re-render. Unfortunately, when calling remove() and then attempting to re-render, I am then met with the following error:

Uncaught TypeError: this.controller is undefined

Expected Behavior

Widget is properly removed before attempting to re-run renderEl, and widget properly re-renders on page when JS is run multiple times.

Your environment

swiftone commented 4 years ago

@eric-schmidt - thanks for the report, I'll see what I can do to reproduce and recommend some workarounds.

mzbyszynski commented 3 years ago

Seems like this was fixed in commit 28ee99d. Hopefully they will release a new version with it soon.

jamesnw commented 3 years ago

Seems like this was fixed in commit 28ee99d. Hopefully they will release a new version with it soon.

It looks like this was not included in the 5.5.4 release, also hoping for an update soon.

shuowu commented 3 years ago

@jamesnw If the change has been merged into master, then it will be available in the next minor version update, which should be the 5.6.0 release.

jamesnw commented 3 years ago

This appears to be fixed in 5.6.0. Thanks!