-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: added package name prefix to all console.
methods in src/
#699
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you point me in the direction of a fix for this (or at least some docs for the |
Would love some info on why this warning is happening and how to get rid of it, it is clogging up our supabase logs rendering them useless. |
@AdamEisfeld @notjustinshaw The error appears because some config is not set. Ideally, this would not throw an error, but here we are. The solution in nuxt seems to just set this config value to true/false. But I haven't done any deepdive so it could be something else. nuxt-modules/supabase#188 have you tried that? |
We are also having this issue. |
@nfts2me @notjustinshaw @AdamEisfeld this behavior is designed to help devs be aware that they've got a configuration which could cause them issues. There are plenty of documented cases here of why this was done. Hopefully it's worth it. Most of the time, you pass the following option to your supabase client - usually just the server-side ones - the error will go away. const supabase = await createClient(url, key, {
auth: {
persistSession: false
}
} |
I'm not even using auth. Setting an optional param to mute a warning about something we're not using seems not reasonable. |
Good point there! |
Let’s fix this. Seems easy enough to make persist-state:false the default?
…On Jun 27, 2023 at 7:37 AM -0700, Jason Creviston ***@***.***>, wrote:
> I'm not even using auth. Setting an optional param to mute a warning about something we're not using seems not reasonable.
Good point there!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi there, is there still interest in improving the log messages (which this PR was originally intended to be)? Or can I close this and it's fine due to the core issue being fixed. |
IMO this change is still worthwhile, it will make it easier to spot the source of the error before making the changes which are mentioned in the thread to avoid it. |
What kind of change does this PR introduce?
After upgrading @supabase/supabase-js, I stumbled on an error message (
No storage option exists to persist the session, which may result in unexpected behavior when using auth. If you want to set persistSession to true, please provide a storage option or you may set persistSession to false to disable this warning.
).It took me a while to figure out from which package this comes and why. Found it only because it was reported in the nuxt/supabase repo nuxt-modules/supabase#188.
I therefore suggest to prefix console.error / console.warning with this package's name, so you can easily check where this random error in your console comes from.
What is the current behavior?
Errors are logged into the server console without me having an idea from which package they come from.
What is the new behavior?
Now every error/warning has the package name
[@supabase/gotrue-js]
prefixed.