devbaji / vue3-google-login

Add Sign In With Google feature to your Vue 3 application
https://github.com/devbaji/vue3-google-login/
MIT License
208 stars 30 forks source link

Failed to render button because there is no parent or options set. #1

Closed vicserv closed 2 years ago

vicserv commented 2 years ago

I don't know what to do, the following appears Failed to render button because there is no parent or options set. and Invalid value used as weak map key

tghkuma commented 2 years ago

I'm having the same issue with nuxt 3. You can check it Stackblitz.

1st Page: Render Button. 2nd Page -> 1st Page: Failed Render Button.

The cause is that onMounted () does not draw the next on the screen, so document.getElementbyId() becomes null. Element gets with ref.

devbaji commented 2 years ago

@tghkuma Thank you for pointing out the mistake, i removed both buttonId and uuidv4 from the code which is now not required @vidi-server Hope this fix will resolve your issue Please update to the latest version 2.0.7