Comments (9)
I'm also having the same error.
supabase: 1.11.11
supabase_flutter: 1.10.24
from supabase-flutter.
Is that all stacktrace you get? Shouldn't there be some info about in which file and line it occurs?
from supabase-flutter.
unfortunately and surprisingly, this is the whole stack, I don't get anything else.
UPD
sorry, my bad, forgot to rethrow, here is the whole stack.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error on line 1, column 32: Invalid media type: expected no more input.
╷
1 │ application/json; charset=utf-8,application/vnd.pgrst.object+json; charset=utf-8
│ ^
╵
#0 wrapFormatException (package:http_parser/src/utils.dart:15:5)
#1 new MediaType.parse (package:http_parser/src/media_type.dart:46:7)
#2 _contentTypeForHeaders (package:http/src/response.dart:79:45)
#3 _encodingForHeaders (package:http/src/response.dart:72:24)
#4 Response.body (package:http/src/response.dart:28:22)
#5 PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:269:31)
#6 PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:164:14)
#7 PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:372:24)
Is that all stacktrace you get? Shouldn't there be some info about in which file and line it occurs?
from supabase-flutter.
I think you have to use :
await supabase.from('profile').select().eq('id', 'gibberish').maybeSingle();
from supabase-flutter.
I think you have to use :
await supabase.from('profile').select().eq('id', 'gibberish').maybeSingle();
It's possible temporary solution
but with 30 .single() queries in prod, it was almost impossible to debug the first time where the issue happened at/neither to catch it
from supabase-flutter.
@Mykyta-Chernenko @allipiopereira
Hmm, I am unable to reproduce this issue. When I use .single()
and query in a way that it returns 0 rows, I get the following error.
PostgrestException(message: JSON object requested, multiple (or no) rows returned, code: PGRST116, details: The result contains 0 rows, hint: null)
.
Are you using the hosted version of Supabase? Does the same issue happen on a fresh Supabase instance?
from supabase-flutter.
@Mykyta-Chernenko @allipiopereira Hmm, I am unable to reproduce this issue. When I use
.single()
and query in a way that it returns 0 rows, I get the following error.
PostgrestException(message: JSON object requested, multiple (or no) rows returned, code: PGRST116, details: The result contains 0 rows, hint: null)
.Are you using the hosted version of Supabase? Does the same issue happen on a fresh Supabase instance?
I get the error like this.
final response = await supabase
.from('app_settings')
.select('review_version_ios, review_version_android')
.single();
id is non-existent
I get
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error on line 1, column 32: Invalid media type: expected no more input.
╷
1 │ application/json; charset=utf-8,application/vnd.pgrst.object+json; charset=utf-8
│ ^
╵
#0 wrapFormatException (package:http_parser/src/utils.dart:15:5)
#1 new MediaType.parse (package:http_parser/src/media_type.dart:46:7)
#2 _contentTypeForHeaders (package:http/src/response.dart:79:45)
#3 _encodingForHeaders (package:http/src/response.dart:72:24)
#4 Response.body (package:http/src/response.dart:28:22)
#5 PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:269:31)
#6 PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:164:14)
<asynchronous suspension>
#7 PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:372:24)
<asynchronous suspension>
I use supabase hosted version.
I tried to restart the db, the issue is still there
I created a new db with the minimum migration, the issue is still there
here is the migration I applied to the fresh db
-- Migration for the app_settings table
create table if not exists app_settings
(
id serial primary key,
review_version text not null,
review_version_android text not null,
review_version_ios text not null,
version text not null
);
I use Frankfurt region.
Thanks for you help!
from supabase-flutter.
I get the same error message, so I can confirm that. Also I get the same message if .single() is used and multiple results are returned. I tested supabase_flutter: ^2.3.4 and ^2.5.3.
from supabase-flutter.
Related Issues (20)
- auth.resetPasswordForEmail throws AuthRetryableFetchException when SMTP settings are wrong
- AuthWeakPasswordException causes an unhandled exception HOT 1
- Supabase.initialize don't refresh token after 1h on app open again HOT 4
- AuthRetryableFetchError with Supabase and Flutter HOT 3
- AuthException(message: Internal Server Error, statusCode: 400) HOT 7
- AuthRetryableFetchError (Flutter and Supabase) HOT 1
- Simple database call returns "Invalid media type: expected no more input" error
- How are you supposed to sign up with OAuth providers ? HOT 3
- Saving sessions for logging in via facebook HOT 6
- Matching on null fails to return anything HOT 7
- API for session restore using magic links HOT 5
- Allow to pass query params when invoking function HOT 3
- Realtime: Unable to build WebSocket connection through Tor proxy HOT 1
- Sentry reports AuthException(message: AuthRetryableFetchError, statusCode: null) HOT 1
- Sentry reports AuthRetryableFetchError HOT 1
- Sentry reports AuthException(message: Invalid Refresh Token: Refresh Token Not Found, statusCode: 400) HOT 5
- Does Supabase Flutter `functions.invoke` support FormData input?
- Self Hosted Supabase is not registering Users from Flutter SDK, Opposed to the hosted version which can. HOT 1
- AuthChangeEvent does not trigger after loggining in using signInWithOAuth (`Google` or `Apple`). HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supabase-flutter.