Skip to content
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

Google Auth error #5836

Open
kvaster opened this issue Oct 10, 2022 · 9 comments
Open

Google Auth error #5836

kvaster opened this issue Oct 10, 2022 · 9 comments
Labels

Comments

@kvaster
Copy link

kvaster commented Oct 10, 2022

We have an error: Exception on /oauth/google_callback

Error is caused by: psycopg2.errors.StringDataRightTruncation: value too long for type character varying(320)

And the problem is in profile_image_url - in log I can see 702 characters truncated.

  • Redash Version: 10.1.0.b50633
@choilive
Copy link

choilive commented Jan 5, 2023

Also getting this error, should be a relatively easy patch.

@kvaster
Copy link
Author

kvaster commented Jan 7, 2023

I've fixed this locally by altering profile_image_url type to varchar(8192)

@lucasfcnunes
Copy link
Member

lucasfcnunes commented Mar 27, 2023

@susodapop

I want to close this but the user fix was on 10.1.0.b50633 and it doesn't have a users.profile_image_url column (as of 49fe295).
@kvaster could you possibly be using another version that wasn't 10.1.0.b50633?

This seems to be solved because jsonb won't limit ->>profile_image_url size anymore (the downgrade says it was varchar(320)/db.String(320) which will be a problem for "google authed" people apparently)

@kvaster
Copy link
Author

kvaster commented Mar 31, 2023

Just reinstalled using latest helm repo version:

helm search repo redash     
NAME            CHART VERSION   APP VERSION     DESCRIPTION                                       
redash/redash   3.0.0           10.0.0.b50633   Redash is an open source tool built for teams t...

and

redash=> \d users
                                          Table "public.users"
      Column       |           Type           | Collation | Nullable |              Default              
-------------------+--------------------------+-----------+----------+-----------------------------------
 updated_at        | timestamp with time zone |           | not null | 
 created_at        | timestamp with time zone |           | not null | 
 id                | integer                  |           | not null | nextval('users_id_seq'::regclass)
 org_id            | integer                  |           | not null | 
 name              | character varying(320)   |           | not null | 
 email             | character varying(255)   |           | not null | 
 profile_image_url | character varying(320)   |           |          | 
 password_hash     | character varying(128)   |           |          | 
 groups            | integer[]                |           |          | 
 api_key           | character varying(40)    |           | not null | 
 disabled_at       | timestamp with time zone |           |          | 
 details           | json                     |           |          | '{}'::json

As you can see - there is profile_image_url still...

@kvaster
Copy link
Author

kvaster commented Mar 31, 2023

Probably helm repo is outdated...

@kvaster
Copy link
Author

kvaster commented Mar 31, 2023

I've checked image version which is used by this helm chart and it is: docker.io/redash/redash:10.1.0.b50633

And profile_image_url is still there...

@lucasfcnunes
Copy link
Member

@kvaster Try putting this in your values.yaml

image:
  tag: 10.1.0.b50633

@kvaster
Copy link
Author

kvaster commented Apr 4, 2023

I have this already in my values. But I still can see:

redash=> select * from alembic_version;
 version_num  
--------------
 89bc7873a3e0

Also fix is dated Feb 2, 2022.
Image used: redash/redash:10.1.0.b50633

cat CHANGELOG.md
# Change Log

## V10.1.0 - 2021-11-23

It seems that 10.1.0.b50633 does not contain fix yet - it was built 16 months ago.

@lucasfcnunes
Copy link
Member

@kvaster you're right

╭─ ~/projects/learn ········································································································································································································ INT ✘  at 17:44:33 ─╮
╰─  docker run --rm -e FLASK_APP=redash -e REDASH_COOKIE_SECRET=0 redash/redash:10.1.0.b50633 flask db history                                                                                                                                       ─╯
0ec979123ba4, d7d747033183 -> 89bc7873a3e0 (head) (mergepoint), fix_multiple_heads
e5c7a4e2df4d -> 0ec979123ba4, empty message
e5c7a4e2df4d -> d7d747033183, encrypt alert destinations
98af61feea92 -> e5c7a4e2df4d (branchpoint), remove_query_tracker_keys
73beceabb948 -> 98af61feea92, add_encrypted_options_to_data_sources
e7f8a917aa8e -> 73beceabb948, bring_back_null_schedule
640888ce445d -> e7f8a917aa8e, Add user details JSON column.
71477dadd6ef -> 640888ce445d, Add new scheduling data.
0f740a081d20 -> 71477dadd6ef, favorites_unique_constraint
a92d92aa678e -> 0f740a081d20, inline_tags
e7004224f284 -> a92d92aa678e, inline_tags
d4c798575877 -> e7004224f284, add_org_id_to_favorites
1daa601d3ae5 -> d4c798575877, empty message
969126bd800f -> 1daa601d3ae5, add columns for disabled users
6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
d1eae8b9893e -> 7671dca4e604, empty message
65fc9ede4746 -> d1eae8b9893e, add Query.schedule_failures
<base> -> 65fc9ede4746, Add is_draft status to queries and dashboards
╭─ ~/projects/learn ·································································································································································································· ✔  took 8s  at 17:44:55 ─╮
╰─  docker run --rm -e FLASK_APP=redash -e REDASH_COOKIE_SECRET=0 redash/redash:preview flask db history                                                                                                                                             ─╯
89bc7873a3e0 -> fd4fc850d7ea (head), Convert user details to jsonb and move user profile image url into details column
0ec979123ba4, d7d747033183 -> 89bc7873a3e0 (mergepoint), fix_multiple_heads
e5c7a4e2df4d -> 0ec979123ba4, empty message
e5c7a4e2df4d -> d7d747033183, encrypt alert destinations
98af61feea92 -> e5c7a4e2df4d (branchpoint), remove_query_tracker_keys
73beceabb948 -> 98af61feea92, add_encrypted_options_to_data_sources
e7f8a917aa8e -> 73beceabb948, bring_back_null_schedule
640888ce445d -> e7f8a917aa8e, Add user details JSON column.
71477dadd6ef -> 640888ce445d, Add new scheduling data.
0f740a081d20 -> 71477dadd6ef, favorites_unique_constraint
a92d92aa678e -> 0f740a081d20, inline_tags
e7004224f284 -> a92d92aa678e, inline_tags
d4c798575877 -> e7004224f284, add_org_id_to_favorites
1daa601d3ae5 -> d4c798575877, empty message
969126bd800f -> 1daa601d3ae5, add columns for disabled users
6b5be7e0a0ef -> 969126bd800f, Update widget's position data based on dashboard layout.
5ec5c84ba61e -> 6b5be7e0a0ef, Re-index Query.search_vector with existing queries.
7671dca4e604 -> 5ec5c84ba61e, Add Query.search_vector field for full text search.
d1eae8b9893e -> 7671dca4e604, empty message
65fc9ede4746 -> d1eae8b9893e, add Query.schedule_failures
<base> -> 65fc9ede4746, Add is_draft status to queries and dashboards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants