nuxt-vue3-google-signin
nuxt-vue3-google-signin copied to clipboard
Random "missing required parameter client_id" errors
I really dont know what is happening... randomly i get "missing required parameter client_id" in console... one day it works.. the next it doesnt...
Any one else experiencing this... using this with nuxt 3
I am also experiencing the same thing in local. Had to restart the build for it to work. Haven't deployed to uat/staging but if this happens it can be concerning...
Can you provide an example? this seems to be an bug
I followed exact steps in the instructions, adding the module and adding googleSignIn.clientId
However, like simonmaaas said, sometimes it works, sometimes it doesn't. Mine seems to not work on first build, then had to stop everything and restart then it works fine. So very difficult to replicate the bug.
Just a question, I looked at the code file plugin.ts, and it's getting the signin from: const { googleSignIn } = useRuntimeConfig().public
So shouldnt the googlesignin not be inside public? So would the nuxt.config.ts be: modules: [ 'nuxt-vue3-google-signin' ], public: { googleSignIn: { clientId: 'CLIENT ID OBTAINED FROM GOOGLE API CONSOLE', } }
But like I mentioned, it is working but for me just on first build it doesnt.
its picking up the config from nuxt config here and injecting it to runtime
https://github.com/wavezync/nuxt-vue3-google-signin/blob/8b6af9f251e648566a32b38dbe1f6aad24d87b84/src/module.ts#L43-L45
can you specify nuxt versions? so i can take a look
@pokaiCheng @simonmaass
can you share a example repo with nuxt3 using your exact configuration for the plugin?
@kasvith Vue 3.3.4, nuxt 3.6.5
Unfortunately I don't have an example repo. I'll see if I can build a simple repo with same configs and see if I can replicate the error.
It would be nice to have a example repo with your exact configuration
i am using the same versions as @pokaiCheng and also my config is as described above...
Can you please provide a repo with your exact configuration related to the project
That would help me to understand whats the problem
I've created a branch from your working example and changed the configs and package to match my versions. Very difficult to replicate the bug but sometimes the bug appears. What I did is switching between branches: one with the googleSignIn.clientId in the nuxt.config and one doesn't, then sometimes the bug will appear. Here's my branch: https://github.com/pokaiCheng/nuxt-vue3-google-signin-example/tree/missing-required-parameter-client-id
Thanks @pokaiCheng will take a look
we still have it and we really dont know what to do....
Hi @simonmaass i didn't have time for looking at this, i will give an update
Hi, do you have any updates please ?
@zola33dsf unfortunately i couldn't reproduce this yet. would you share a repo which i can reproduce this?
Yes @kasvith It is random so if it's not happening the first time you can try to refresh the page :
https://stackblitz.com/edit/github-7tvhqt?file=nuxt.config.ts,app.vue
You need to open the developper tools to see the error warning in the console
Hi @zola33dsf I could reproduce this, seems something is wrong with the injection symbol.
After upgrading to the new release of Nuxt 3.8.1, it seems that the problem has disappeared.
Thanks for report @zola33dsf
Hi @simonmaass @pokaiCheng can you also check and verify this works in nuxt3.8.1 ?
I opened a bug report in nuxt https://github.com/nuxt/nuxt/issues/24155
Hi, after upgrading to the latest release of Nuxt 3.9.0 the issue came back..
Just a question, I looked at the code file plugin.ts, and it's getting the signin from: const { googleSignIn } = useRuntimeConfig().public
So shouldnt the googlesignin not be inside public? So would the nuxt.config.ts be: modules: [ 'nuxt-vue3-google-signin' ], public: { googleSignIn: { clientId: 'CLIENT ID OBTAINED FROM GOOGLE API CONSOLE', } }
@pokaiCheng got a valid point see plugin.ts
But if we add it in runtimeConfig.public.googleSignIn
that'll through exception of googleSigIn.clientId
required.
@kasvith here is complete procedure to reproduce it.
"nuxt": "^3.9.0", "nuxt-vue3-google-signin": "^0.0.10",
1.Take any nuxt app, upgrade it to latest for now it's 3.9.0
2. configure nuxt.config.ts
Or one can Change IAM_GOOGLE_CLIENT_ID to NUXT_PUBLIC_GOOGLE_CLIENT_ID as mentioned here
export default defineNuxtConfig({
...,
modules: [
'nuxt-vue3-google-signin',
],
googleSignIn: {
clientId: process.env.IAM_GOOGLE_CLIENT_ID,
}
});
- now remove
node_modules
and runnpm i
ornpm ci
and runnpm run dev
, after Nitro finishes build, visit server url e.g.http://localhost:3000/
, in console you'll be able to see Error
Hi @abdulla-iqbal this seems an upstream issue with nuxt dev server, already created an issue there
Is there any way to solve it ?
Unfortunately we have to wait till Nuxt team to resolve this.
On Sat, Dec 30, 2023 at 4:03 PM Abdullah Iqbal @.***> wrote:
Is there any way to solve it ?
— Reply to this email directly, view it on GitHub https://github.com/wavezync/nuxt-vue3-google-signin/issues/11#issuecomment-1872501242, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCQC76QPFA4IF74ESWQPDYL7UXXAVCNFSM6AAAAAA3NDPREGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGUYDCMRUGI . You are receiving this because you were mentioned.Message ID: @.***>
got it.
Hi, do you have any updates please ?
Hi @zola33dsf still waiting on nuxt team's update. it is a problem with upstream nuxt