Back

Self hosted instance pub get socket error when deploying function

  • 0
  • Self Hosted
  • Flutter
  • Functions
Samiullah
13 Mar, 2024, 08:44

I hv self hosted instance of appwrite i am trying to build a function manually but i am getting error socket error when it is trying to get pub dependencies i am using internet proxy and i hv configured docker to that proxy too, is there anything else to follow?

TL;DR
Developers are encountering a socket error when deploying functions on a self-hosted instance of Appwrite, especially when trying to fetch pub dependencies. One user managed to fix the issue by deleting the pref.json file. They also discussed different CLI versions and manual deployment. Some users suggested upgrading to CLI 1.5.3 or trying manual deployment. The thread includes error messages and a discussion on the structure of tar files. The issue seems unresolved, although manual deployment is recommended.
D5
13 Mar, 2024, 09:37

What do you mean by building the function manually?

Samiullah
13 Mar, 2024, 09:48

From tar.gz file i am not setting any repository

Samiullah
13 Mar, 2024, 09:55
D5
13 Mar, 2024, 11:33

How does the tar file looks like? I mean the scheme

Shiba
13 Mar, 2024, 12:11

are you on 1.5.x have you tried doing it using the CLI ?

D5
13 Mar, 2024, 12:14

Manual deployment should work anyways. I recommend CLI, but πŸ€·β€β™‚οΈ

Shiba
13 Mar, 2024, 12:16

yes its not woking now after the upgrade to 1.5.x appwrite and 5.0.0 cli

D5
13 Mar, 2024, 12:19

Do you have 1.5.3?

Shiba
13 Mar, 2024, 12:19

yes

D5
13 Mar, 2024, 12:20

@Jake Do you have any ideas?

Shiba
13 Mar, 2024, 12:22

@D5 it create the function with the appwrite.json and aslo creates the code.tar.gz but does not push to the server

Shiba
13 Mar, 2024, 12:26

I took the .gz file and manually uploaded getiitng this error

Shiba
13 Mar, 2024, 12:27
TypeScript
Could not resolve host: appwrite-executor with status code 0
/usr/src/code/src/Executor/Executor.php:331
#0 /usr/src/code/src/Executor/Executor.php(91): Executor\Executor->call('POST', '/runtimes', Array, Array, true, 900)
#1 /usr/src/code/src/Appwrite/Platform/Workers/Builds.php(408): Executor\Executor->createRuntime('65f19ae2a51c1fe...', '655a57fe5fc72cc...', '/storage/functi...', 'openruntimes/da...', 'v3', true, 'lib/main.dart', '/storage/builds...', Array, 'tar -zxf /tmp/c...')
#2 [internal function]: Appwrite\Platform\Workers\Builds->Appwrite\Platform\Workers\{closure}()
#3 {main}
Jake
13 Mar, 2024, 12:51

Not sure here πŸ€” @Matej Bačo any ideas?

Samiullah
13 Mar, 2024, 16:01

In tar there is a folder caled create_function in which there is lib folder and inside it there is main.dart file and inside the create_function there is pubspec.yaml file in which dart_appwrite sdk is mentioned and it gets downloaded by using dart pub get command and that command is giving me this error πŸ₯²

Samiullah
13 Mar, 2024, 16:02

Nd i am using 1.4

D5
13 Mar, 2024, 16:37

And what's your CLI version?

Shiba
13 Mar, 2024, 17:50

some how I fxed this after deleting the pref.json file

Shiba
13 Mar, 2024, 17:50

in .appwrite folder

Samiullah
13 Mar, 2024, 18:14

4.2.2

Samiullah
14 Mar, 2024, 04:26

Used CLI but still getting same socket error "Got socket error trying to find package pubspec at https://pub.dev.

Samiullah
14 Mar, 2024, 05:12

I tried python starter function too but got an error

Samiullah
14 Mar, 2024, 05:13
Samiullah
28 Mar, 2024, 11:48

Still not solved

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more