Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: 1.4.4 Function File Not Found after migration from 1.4.3 #6859

Closed
2 tasks done
xuelink opened this issue Oct 9, 2023 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@xuelink
Copy link
Contributor

xuelink commented Oct 9, 2023

👟 Reproduction steps

Upgraded 1.4.4 from 1.4.3.

3 times i tried to upgrade with functions currently deployed, and without functions and after upgrade and migration completed then i deployed function.

But all scenarios, i got the same error while deploying any Function that is File Not found

Screenshot_2023-10-09_at_11 16 38

I realized that .env 2 lines added

_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=enabled
_APP_OPTIONS_ROUTER_PROTECTION=enabled

All i did enabled because im using appwrite with custom domain with HTTPS. Nothing changed!

Tried to check logs..

appwrite-worker-functions logs

root@appwrite:~/appwrite# docker logs appwrite-worker-functions
[Worker] Worker 0 is ready!
[Worker] Worker 1 is ready!
[Worker] Worker 2 is ready!
[Worker] Worker 3 is ready!
[Worker] Worker 4 is ready!
[Worker] Worker 5 is ready!
[Job] Received Job (6523bec346f9d1.30397384).
Fetched 1 functions...
[Job] (6523bec346f9d1.30397384) successfully run.
[Job] Received Job (6523bec390ec19.41573422).
Fetched 1 functions...
[Job] (6523bec390ec19.41573422) successfully run.
[Job] Received Job (6523bec39ba1f6.88452553).
Fetched 1 functions...
[Job] (6523bec39ba1f6.88452553) successfully run.
[Job] Received Job (6523befe62c3e9.76191737).
Fetched 0 functions...
[Job] (6523befe62c3e9.76191737) successfully run.
[Job] Received Job (6523bf0365edf6.46617872).
Fetched 1 functions...
[Job] (6523bf0365edf6.46617872) successfully run.
[Job] Received Job (6523bf03b10436.62544491).
Fetched 1 functions...
[Job] (6523bf03b10436.62544491) successfully run.
[Job] Received Job (6523bf03cb9385.05988594).
Fetched 1 functions...
[Job] (6523bf03cb9385.05988594) successfully run.

openruntimes-executor logs

appwrite-worker-functions looks fine, what about openruntimes-executor

root@appwrite:~/appwrite# docker logs openruntimes-executor
Removing orphan runtimes...
Cleaning up containers...
No containers found to clean up.
Cleanup finished.
Orphan runtimes removal finished.
Pulling v3 images...
Warming up Node.js 16.0 environment...
Warming up PHP 8.0 environment...
Warming up Ruby 3.0 environment...
Warming up Python 3.9 environment...
Successfully Warmed up PHP 8.0!
Successfully Warmed up Node.js 16.0!
Successfully Warmed up Python 3.9!
Successfully Warmed up Ruby 3.0!
Image pulling finished.
Starting maintenance interval...
Maintenance interval started.
Starting stats interval...
Stats interval started.
Executor is ready.
[Error] Type: Exception
[Error] Message: File Not Found
[Error] File: /usr/local/app/http.php
[Error] Line: 603
[Error] Type: Exception
[Error] Message: Runtime not ready. Error Msg: []

Error: No such container: appwrite-executor-650750d21e4a6a589be3-6523bec379755375bb3b

[Error] File: /usr/local/app/http.php
[Error] Line: 319
[Error] Type: Exception
[Error] Message: File Not Found
[Error] File: /usr/local/app/http.php
[Error] Line: 603
[Error] Type: Exception
[Error] Message: Runtime not ready. Error Msg: []

Error: No such container: appwrite-executor-650750d21e4a6a589be3-6523bf03946f1eac927f

[Error] File: /usr/local/app/http.php
[Error] Line: 319

I dont understand exactly why its happening and how to fix it.

I tried to downgrade 1.4.3, everythings works fine about functions, deploying and executings. When it tried to upgrade 1.4.4, the same things happening in openruntimes-executor

appwrite logs

root@appwrite:~/appwrite# docker logs appwrite
Worker 2 started successfully
Worker 3 started successfully
Worker 4 started successfully
[Setup] - Server database init started...
Worker 5 started successfully
[Setup] - Creating database: appwrite...
Worker 6 started successfully
[Setup] - Server database init completed...
Server started successfully (max payload is 6,291,456 bytes)
Master pid 1, manager pid 1
Worker 1 started successfully
[Error] Timestamp: 2023-10-09T08:51:15+00:00
[Error] Method: GET
[Error] URL: /v1/functions/:functionId
[Error] Type: Appwrite\Extend\Exception
[Error] Message: Function with the requested ID could not be found.
[Error] File: /usr/src/code/app/controllers/api/functions.php
[Error] Line: 429
[Error] Timestamp: 2023-10-09T08:54:57+00:00
[Error] Method:
[Error] URL: /boaform/admin/formLogin
[Error] Type: Appwrite\Extend\Exception
[Error] Message: This domain is not connected to any Appwrite resource yet. Please configure custom domain or function domain to allow this request.
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 67
[Error] Timestamp: 2023-10-09T08:56:37+00:00
[Error] Method: GET
[Error] URL: /console/*
[Error] Type: Appwrite\Extend\Exception
[Error] Message: This domain is not connected to any Appwrite resource yet. Please configure custom domain or function domain to allow this request.
[Error] File: /usr/src/code/app/controllers/general.php
[Error] Line: 67

But i am using with a custom domain. all .env variables are setted

👍 Expected behavior

after migration function has to work properly

👎 Actual Behavior

after migration function does not work

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

migration from 1.4.3 to 1.4.4

root@appwrite:~/appwrite# docker compose exec appwrite doctor


/ \ ( _ ( _ / )( ( _ ( )( )( __) ( )/
/ \ ) / ) /\ /\ / ) / )( )( ) _) _ )(( O )
_/_/() (
) (
/_)(_)() () (___)()()__/

👩‍⚕️ Running Appwrite Doctor for version 1.4.4 ...

[Settings]
🟢 Hostname has a public suffix (db.languagexchange.net)
🟢 CNAME target has a public suffix (db.languagexchange.net)
🟢 Using a unique secret key for encryption
🟢 App environment is set for production
🔴 Abuse protection is disabled
🟢 Console access limits are enabled
🟢 HTTPS force option is enabled
🟢 HTTPS force option is enabled for function domains
🔴 Logging adapter is disabled

[Connectivity]
🟢 Console.DB(console)...............................connected
🟢 Projects.DB(database_db_main).....................connected
🟢 Cache(cache_redis_main)...........................connected
🟢 Queue(queue)......................................connected
🟢 PubSub(pubsub)....................................connected
🟢 SMTP..............................................connected

[Volumes]
🟢 Uploads Volume is readable
🟢 Uploads Volume is writeable
🟢 Cache Volume is readable
🟢 Cache Volume is writeable
🟢 Config Volume is readable
🟢 Config Volume is writeable
🟢 Certs Volume is readable
🟢 Certs Volume is writeable

[Disk Space]
🟢 Uploads Volume has 40.96GB free space (20.98% used)
🟢 Cache Volume has 40.96GB free space (20.98% used)
🟢 Config Volume has 40.96GB free space (20.98% used)
🟢 Certs Volume has 40.96GB free space (20.98% used)

Failed to check for a newer version

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@xuelink xuelink added the bug Something isn't working label Oct 9, 2023
@xuelink
Copy link
Contributor Author

xuelink commented Oct 9, 2023

Similar disscussion in discord

@xuelink
Copy link
Contributor Author

xuelink commented Oct 9, 2023

Screenshot 2023-10-09 at 18 00 41

it works! But it needed to be patched. @stnguyen90

@stnguyen90
Copy link
Contributor

Closing as a duplicate of #6439

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants