devbaji / vue3-google-login

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

Node ExitCode 13 when used in Quasar SRR app-vite@2 running in AWS Lambda #61

Closed paya-cz closed 1 month ago

paya-cz commented 2 months ago

I experienced a problem when my app uses Quasar SSR while running in AWS Lambda. The lambda would return exit code 13 during init phase. I believe this is caused by a promise that never resolves. I think this is the culprit:

https://github.com/devbaji/vue3-google-login/blob/553095e8eadf2eca7663d1b83ad23a97d8d8ea74/src/plugin/utils.ts#L36

When running on the server, the promise executor never calls 'resolve' or 'reject' and leaves the promise dangling forever. I believe the NodeJs runtime in AWS Lambda kills the process because of this. The loadGApi should reject the promise if running on the server, and not leave the promise dangling.

devbaji commented 1 month ago

@paya-cz Sorry for the late reply, ideally this plugin should not be run on server side. Since you pointed this out, in version 2.0.29 patch, I have added logic to reject an error if tried to run this plugin on server side. Please check if this resolves your issue.

Closing this issue for now, please reopen if issue still exists