-
-
Notifications
You must be signed in to change notification settings - Fork 272
Description
Describe the bug
Since updating supabase_flutter from 2.9.0 to 2.9.1, users whose device language is set to a non-ASCII language (like Korean) can no longer log in or perform any action that makes a request to the Supabase backend. For example, Platform.operatingSystemVersion shows Korean version text (e.g., 버전 15.5(빌드 24F74) on macOS.
The action fails with a FormatException: Invalid HTTP header field value. This is caused by the new X-Supabase-Client-Platform-Version header, which was added in version 2.9.1. This header includes the device's OS version string directly. When the device language is set to Korean, the OS version string contains non-ASCII characters (e.g., 버전 15.5(빌드 24F74)), which are not valid in an HTTP header value according to RFC 7230.
Perhaps this feature was likely introduced in commit as follows:
- Commit: Feat: Add standard client headers f33c9fe
- PR: feat: Add standard client headers #1130
To Reproduce
Steps to reproduce the behavior:
- Set the physical device's or emulator's system language to Korean (한국어).
- Create a Flutter project using supabase_flutter: 2.9.1.
- Attempt to call any Supabase authentication method, such as Supabase.instance.client.auth.signInWithPassword(...).
- See the FormatException error thrown by Dart's HTTP client.
or
// The following shows Korean version text (e.g., 버전 15.5(빌드 24F74)
print('Platform.operatingSystemVersion = ${Platform.operatingSystemVersion}');
final koreanOSVersion = '버전 15.5(빌드 24F74)';
final englishOSVersion = 'Version 15.5 (Build 24F74)';
await Supabase.initialize(
headers: {
// 'X-Supabase-Client-Platform-Version': koreanOSVersion, // Error: FormatException: Invalid HTTP header field value
'X-Supabase-Client-Platform-Version': englishOSVersion, // Succeed to login without any errors.
},Expected behavior
The authentication process should complete successfully, regardless of the device's system language. The X-Supabase-Client-Platform-Version header should be properly encoded or sanitized to ensure it only contains valid ASCII characters before being sent.
Screenshots
- Here is the error message from the console: FormatException: Invalid HTTP header field value: "버전 15.5(빌드 24F74)" (at character 1)
- Here is the error message from the gui:

Version (please complete the following information):
On macOS
Please run dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client" in your project directory and paste the output here.
|
├── supabase_auth_ui 0.5.5
│ └── supabase_flutter...
├── supabase_flutter 2.9.0
│ ├── supabase 2.7.0
│ │ ├── functions_client 2.4.2
│ │ ├── gotrue 2.12.0
│ │ ├── postgrest 2.4.2
│ │ ├── realtime_client 2.5.0
│ │ ├── storage_client 2.4.0 |
├── supabase_auth_ui 0.5.5
│ └── supabase_flutter...
├── supabase_flutter 2.9.1
│ ├── supabase 2.8.0
│ │ ├── functions_client 2.4.3
│ │ ├── gotrue 2.13.0
│ │ ├── postgrest 2.4.2
│ │ ├── realtime_client 2.5.1
│ │ ├── storage_client 2.4.0 |
On Linux
Please run dart pub deps | grep -E "supabase|gotrue|postgrest|storage_client|realtime_client|functions_client" in your project directory and paste the output here.
On Windows
Please run dart pub deps | findstr "supabase gotrue postgrest storage_client realtime_client functions_client" in your project directory and paste the output here.
Additional context
Add any other context about the problem here.
- This is a regression bug introduced in 2.9.1.
- The last known working version is 2.9.0, as it did not have the feature to send the X-Supabase-Client-Platform-Version header.
- The current workaround is to
downgrade and pin the versionin pubspec.yaml:supabase_flutter: 2.9.0.