celest-dev / celest

The Flutter cloud platform
https://celest.dev
Other
239 stars 11 forks source link

In local environment apis are not working. environment: CelestEnvironment.local #158

Open ps6067966 opened 3 months ago

ps6067966 commented 3 months ago

image

ps6067966 commented 3 months ago

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): E/flutter ( 5147): #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32) E/flutter ( 5147):

ps6067966 commented 3 months ago

@cloud Future<List> getUserPost({ required int userId, }) async { try { final feedList = await supabase.rest.from('feed').select().order("id", ascending: false); List 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 []; }

dnys1 commented 1 week ago

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.