#Problem when loading a function in manual mode

18 messages · Page 1 of 1 (latest)

austere hull
#

Docker Error: mv: cannot stat '/usr/code/lib/main.dart': No such file or directory
I get this error when I try to load a function. use of CLI is not yet possible.
I create an archive via gtar -zcvf code.tar.gz project_name.
lib/main.dart - project structure

molten sand
#

Hi, do you have the code saved somewhere? if so, can you share so I can take a look?

austere hull
molten sand
#

Thanks for sharing @austere hull , I will have a review and let you know

austere hull
#

@molten sand hi, I deployed the appwrite cli locally, and loaded the function through it. but I get this: Operation timed out after 900000 milliseconds with 0 bytes received with status code 0

safe wedge
#

Hey there 👋 Tarring needs to happen relative to the content of your folder, not outside of it.
Solution is really simple. Before running the command, make sure to be inside your function folder. Then run:

tar --exclude code.tar.gz -czf code.tar.gz .

This will create code.tar.gz file inside your function folder, which should work with manual deployment.

#

From theory it should also be possible to do from outside when proper -C parameter is provided, buuut the command I sent is battle-tested and I can guarantee it works 😅

austere hull
safe wedge
#

Can you please share with me the new code.tar.gz? 🙏

austere hull
safe wedge
#

Looks good. What did you set as value of entrypoint when making deployment?

#

Also, do build logs tell anything more than timeout error? After how long does the timeout error happen?

austere hull
molten sand
#

Hi @austere hull

austere hull
#

Hi!
On the server where appwrite is installed, there is no Internet access. There is a suspicion that when the function does pub get - it falls into a timeout

molten sand
#

could be possible

austere hull
#

@safe wedge @molten sand I figured out the problem. The function during the build did pub get and fell into a timeout. Is it possible in the function build to call pub get --offile rather than pub get?