Bug Summary:
I have set up OAuth using Google Auth.
When I check the Open webUI admin console, the account is created, but the login user is being redirected and the process fails.
Environment
Open WebUI Version:0.3.7 0.3.6
Operating System: macOS Sonoma, 14.5(M2)
Browser (if applicable): Google Chrome126.0.6478.114
Reproduction Details
Confirmation:
I have read and followed all the instructions provided in the README.md.
I am on the latest version of both Open WebUI and Ollama.
I have included the browser console logs.
I have included the Docker container logs.
Logs and Screenshots
Browser Console Logs: Internal Server Error
Docker Container Logs:
2024-07-01 00:20:34 response.set_cookie(
2024-07-01 00:20:34 File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 128, in set_cookie
2024-07-01 00:20:34 self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1")))
2024-07-01 00:20:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-01 00:20:34 UnicodeEncodeError: 'latin-1' codec can't encode characters in position 2068-2071: ordinal not in range(256)
I have set the redirect URL for Google Cloud as follows. http://localhost:3000/oauth/google/callback
Note
It seems that there is a character encoding error because Japanese text is assigned to 'name', 'given_name', and 'family_name' in the following JSON.
I have confirmed that when using English characters for the keys in the aforementioned JSON, the redirection succeeds.
This is my first time creating an issue for an OSS. Please let me know if there are any points to improve.
Originally created by @m8i-51 on GitHub (Jun 30, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3552
# Bug Report
## Description
**Bug Summary:**
I have set up OAuth using Google Auth.
When I check the Open webUI admin console, the account is created, but the login user is being redirected and the process fails.
## Environment
- **Open WebUI Version:** ~~0.3.7~~ 0.3.6
- **Operating System:** macOS Sonoma, 14.5(M2)
- **Browser (if applicable):** Google Chrome126.0.6478.114
## Reproduction Details
**Confirmation:**
- [x] I have read and followed all the instructions provided in the README.md.
- [x] I am on the latest version of both Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
## Logs and Screenshots
**Browser Console Logs:**
`Internal Server Error`
**Docker Container Logs:**
```
2024-07-01 00:20:34 response.set_cookie(
2024-07-01 00:20:34 File "/usr/local/lib/python3.11/site-packages/starlette/responses.py", line 128, in set_cookie
2024-07-01 00:20:34 self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1")))
2024-07-01 00:20:34 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-01 00:20:34 UnicodeEncodeError: 'latin-1' codec can't encode characters in position 2068-2071: ordinal not in range(256)
````
## Additional Information
```
- ENABLE_OAUTH_SIGNUP=true
- GOOGLE_CLIENT_ID=****apps.googleusercontent.com
- GOOGLE_CLIENT_SECRET=***
```
I have set the redirect URL for Google Cloud as follows.
`http://localhost:3000/oauth/google/callback`
## Note
It seems that there is a character encoding error because Japanese text is assigned to 'name', 'given_name', and 'family_name' in the following JSON.
I have confirmed that when using English characters for the keys in the aforementioned JSON, the redirection succeeds.
This is my first time creating an issue for an OSS. Please let me know if there are any points to improve.
```
INFO:main:{
'access_token': '*****.*****-*****',
'expires_in': 3599,
'scope': 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile openid',
'token_type': 'Bearer',
'id_token': '*****.*****-*****-*****.*****-*****-*****-*****',
'expires_at': 1719606576,
'userinfo': {
'iss': 'https://accounts.google.com',
'azp': '*****-*****.apps.googleusercontent.com',
'aud': '*****-*****.apps.googleusercontent.com',
'sub': '*****',
'hd': 'examplecorp.co.jp',
'email': '*****@examplecorp.co.jp',
'email_verified': True,
'at_hash': '*****',
'nonce': '*****',
'name': 'もりこ(部門)',
'picture': 'https://lh3.googleusercontent.com/a/*****=s96-c',
'given_name': 'こ(部門)',
'family_name': 'もり',
'iat': 1719602977,
'exp': 1719606577
}
}
}
```
Hey, do you have a bit more of the exception stack trace from the error message? Trying to figure out which cookie is problematic here.
<!-- gh-comment-id:2199121819 -->
@cheahjs commented on GitHub (Jul 1, 2024):
Hey, do you have a bit more of the exception stack trace from the error message? Trying to figure out which cookie is problematic here.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @m8i-51 on GitHub (Jun 30, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3552
Bug Report
Description
Bug Summary:
I have set up OAuth using Google Auth.
When I check the Open webUI admin console, the account is created, but the login user is being redirected and the process fails.
Environment
0.3.70.3.6Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
Internal Server ErrorDocker Container Logs:
Additional Information
I have set the redirect URL for Google Cloud as follows.
http://localhost:3000/oauth/google/callbackNote
It seems that there is a character encoding error because Japanese text is assigned to 'name', 'given_name', and 'family_name' in the following JSON.
I have confirmed that when using English characters for the keys in the aforementioned JSON, the redirection succeeds.
This is my first time creating an issue for an OSS. Please let me know if there are any points to improve.
@cheahjs commented on GitHub (Jul 1, 2024):
Hey, do you have a bit more of the exception stack trace from the error message? Trying to figure out which cookie is problematic here.
@m8i-51 commented on GitHub (Jul 1, 2024):
@cheahjs
Thank you for confirming.
I have to apologize for one mistake.
The version is v0.3.6.
Here is the error message: