Skip to content
Init is coming / May 19 - 23
Back

[SOLVED] Functions sitting in "Pending"

  • 1
  • Functions
Zeke(Jafesu)
18 Oct, 2023, 06:21

Nevermind it's working now

TL;DR
Functions were sitting in "Pending" but were later deployed successfully after rebuilding the git config and restructuring repositories. The issue seemed to be resolved by authorizing the git organization in Appwrite instead of using a personal account. The CLI was suggested as an alternative. The problem persisted even with different functions, including prebuilt functions. The error message indicated an issue with the cache pool. The user wiped and reconfigured the git config, rebuilt the stack, and tried to deploy the function again, but the error persisted. The appwrite logs showed a TypeError related to accessing an offset on a string. The first function deployed successfully, but subsequent functions failed
Drake
18 Oct, 2023, 16:55

What was the fix?

Zeke(Jafesu)
18 Oct, 2023, 18:18

Apparently nothing, it's doing it again.

I just restarted the build container a couple times and it fixed it temporarily. But now it's doing it again and rebooting the containers isn't helping

Zeke(Jafesu)
18 Oct, 2023, 18:22

Sent you my build container logs in DM

Zeke(Jafesu)
19 Oct, 2023, 00:55

When I click redeploy I get this

Zeke(Jafesu)
19 Oct, 2023, 00:55
Zeke(Jafesu)
19 Oct, 2023, 18:06

@Steven

I just wiped & reconfigured my Git Config, rebuilt my stack, and tried to deploy my function. appwrite logs gave this:

TypeScript
[Error] Timestamp: 2023-10-19T18:01:45+00:00
[Error] Method: POST
[Error] URL: /v1/vcs/github/installations/:installationId/providerRepositories/:providerRepositoryId/detection
[Error] Type: TypeError
[Error] Message: Cannot access offset of type string on string
[Error] File: /usr/src/code/vendor/utopia-php/vcs/src/VCS/Adapter/Git/GitHub.php
[Error] Line: 190

My first function deployed, but then after the first one, all consecutive fail.

Zeke(Jafesu)
19 Oct, 2023, 18:09

Worker Builds

TypeScript
failed Exception: Pool 'cache_redis_main' is empty (size 10) in /usr/src/code/vendor/utopia-php/pools/src/Pools/Pool.php:174
      
Stack trace:
#0 /usr/src/code/src/Appwrite/Resque/Worker.php(262): Utopia\Pools\Pool->pop()
#1 /usr/src/code/app/workers/builds.php(58): Appwrite\Resque\Worker->getCache()
#2 /usr/src/code/src/Appwrite/Resque/Worker.php(125): BuildsV1->run()
#3 /usr/src/code/vendor/resque/php-resque/lib/Resque/Job.php(201): Appwrite\Resque\Worker->perform()
#4 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(303): Resque_Job->perform()
#5 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(242): Resque_Worker->perform(Object(Resque_Job))
#6 /usr/src/code/vendor/resque/php-resque/bin/resque(185): Resque_Worker->work('0.1', false)
      
}
Zeke(Jafesu)
19 Oct, 2023, 18:09

I gotta get this figured out, this is holding up a large scale project we are working

Zeke(Jafesu)
19 Oct, 2023, 18:34

If i delete my function, stop and start the full stack, i can create the function again and it will build, but that is the ONLY way i can deploy a function

Drake
20 Oct, 2023, 01:35

You're still seeing this error?

Zeke(Jafesu)
20 Oct, 2023, 02:25

Yep

Zeke(Jafesu)
23 Oct, 2023, 15:41

still having the same issue, I have not been able to figure it out yet. Any thoughts?

Drake
24 Oct, 2023, 17:59

do you have multiple builds happening at the same time?

Zeke(Jafesu)
24 Oct, 2023, 19:42

nope, just one

Drake
24 Oct, 2023, 21:07

Maybe there's something with the code you're deploying?

Zeke(Jafesu)
26 Oct, 2023, 02:59

It does it with any functions including y'all's prebuilt functions

Drake
26 Oct, 2023, 04:27

Only with deploying via GitHub?

Does the repo only have the template function?

Zeke(Jafesu)
26 Oct, 2023, 14:48

Yes only the template function in the repo. I haven't tried a cli deployment yet

Drake
27 Oct, 2023, 01:41

Would you please try with the CLI?

Zeke(Jafesu)
27 Oct, 2023, 02:50

Yeah, I am also rebuilding my git config. Is there a way to authorize a git organization in appwrite vs personal account? Looking to be able to access repositories from an org i own

Drake
27 Oct, 2023, 02:51

You should be able to select it just fine

Zeke(Jafesu)
27 Oct, 2023, 02:52

It is only letting me access my personal repos

Zeke(Jafesu)
27 Oct, 2023, 03:00

so, looks like my functions are deploying properly now. rebuilt my git config, and restructured my repos, and now it looks like its working

Zeke(Jafesu)
27 Oct, 2023, 03:02

[SOLVED] Functions sitting in "Pending"

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