In local environment apis are not working. environment: CelestEnvironment.local
I/System.out( 5147): Reading: celest/cork
E/flutter ( 5147): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ClientException with SocketException: Connection timed out (OS Error: Connection timed out, errno = 110), address = 10.0.2.2, port = 51024, uri=http://10.0.2.2:7777/feed/get-user-post
E/flutter ( 5147): #0 IOClient.send (package:http/src/io_client.dart:154:7)
E/flutter ( 5147):
@cloud Future<List<FeedUserModel>> getUserPost({ required int userId, }) async { try { final feedList = await supabase.rest.from('feed').select().order("id", ascending: false); List<FeedUserModel> feedUserModel = []; for (final feed in feedList) { final feedData = FeedModel.fromJson(feed); final userList = await supabase.rest.from('user').select().match({ "id": feedData.userId ?? 0, }); feedUserModel.add( FeedUserModel( feed: feedData, user: userList.isNotEmpty ? UserModel.fromJson(userList.first) : null), ); } return feedUserModel; } catch (e) { print("$e"); } return []; }
Hi @ps6067966, let us know if you're still facing this issue with v1! A lot of work has gone into stability and bug fixes so I believe this issue may be resolved for you.