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: Swift and Deno Function error while deploying using Digital Ocean droplet #5865

Closed
2 tasks done
joeldrotleff opened this issue Jul 23, 2023 · 10 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.

Comments

@joeldrotleff
Copy link

👟 Reproduction steps

  1. Create an AppWrite instance on Digital Ocean by creating a Droplet from the AppWrite template.
  2. Set .env to _APP_FUNCTIONS_RUNTIMES=deno-1.24,swift-5.5,node-16.0
  3. Initialize a Deno, Swift, and Node function via CLI (appwrite init function)
  4. Deploy functions w/ app write deploy function

👍 Expected behavior

Functions should deploy correctly without errors

👎 Actual Behavior

The Node function deploys correctly and runs

The Deno function errors out with:

0m�[33mWarning�[0m Implicitly using latest version (0.195.0) for https://deno.land/std/streams/conversion.ts
�[0m�[32mDownload�[0m https://deno.land/[email protected]/streams/conversion.ts
�[0m�[1m�[31merror�[0m: Module not found "https://deno.land/std/streams/conversion.ts".
    at https://deno.land/x/[email protected]/src/inputFile.ts:1:42

The Swift function errors out with:

Operation timed out after 900001 milliseconds with 0 bytes received with status code 0

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

I created a Droplet on Digital Ocean w/ 2gb ram, Ubuntu 22.04 created from this template: https://marketplace.digitalocean.com/apps/appwrite

👀 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?

@joeldrotleff joeldrotleff added the bug Something isn't working label Jul 23, 2023
@joeldrotleff
Copy link
Author

To investigate the issue further I went looking in the open runtimes thing on docker, i.e. here: https://hub.docker.com/r/openruntimes/deno

In the sidebar it says to run docker pull openruntimes/deno but when I run that from my docker instance I get:
manifest for openruntimes/node:latest not found: manifest unknown: manifest unknown

Same for Node and Swift runtimes

@Haimantika Haimantika changed the title 🐛 Bug Report: 🐛 Bug Report: Swift and Deno Function error while deploying using Digital Ocean droplet Jul 24, 2023
@Haimantika
Copy link
Contributor

Hi @joeldrotleff thanks for bringing this issue up. I will be checking with the team to understand why this is happening. Also, did you migrate to 1.3.8?

@Haimantika Haimantika self-assigned this Jul 24, 2023
@joeldrotleff
Copy link
Author

Re: migrate, on my droplet in my docker-compose.yml file, I see 'image: appwrite/appwrite:1.3.8'. So it looks like I'm on 1.3.8.

@Haimantika
Copy link
Contributor

Re: migrate, on my droplet in my docker-compose.yml file, I see 'image: appwrite/appwrite:1.3.8'. So it looks like I'm on 1.3.8.

Thanks for the response. I have notified my team, someone will look into it ASAP.

@Haimantika Haimantika added the product / functions Fixes and upgrades for the Appwrite Functions. label Jul 25, 2023
@Haimantika
Copy link
Contributor

Also, @joeldrotleff it will be great if you can repost this question in our support channel in discord - https://appwrite.io/discord , our team will be assisting you there :)

@stnguyen90
Copy link
Contributor

@joeldrotleff

The Deno function errors out

Would you please try updating the appwrite package in your deps.ts to 7.0.0?

@joeldrotleff
Copy link
Author

@stnguyen90 Ok so that worked! My Deno deploy was successful now.

I tried the same thing for a Swift function (Updating Package.swift file) but that doesn't seem to have worked, still errors out on deploy:

Here is what my Package.swift looks like:

let package = Package(
name: "swift-5.5",
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/appwrite/sdk-for-swift", .upToNextMajor(from: "2.0.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.executableTarget(
name: "swift-5.5",
dependencies: [
.product(name: "Appwrite", package: "sdk-for-swift")
]),
]
)

@joeldrotleff
Copy link
Author

I also verified that Package.resolved is showing 2.0.0:

  {
    "package": "Appwrite",
    "repositoryURL": "https://github.com/appwrite/sdk-for-swift",
    "state": {
      "branch": null,
      "revision": "51f325b11ea10949cf12af363fc5fb4f652abbf2",
      "version": "2.0.0"
    }
  },

@joeldrotleff
Copy link
Author

@stnguyen90 Any ideas on the Swift runtime issues?

@stnguyen90
Copy link
Contributor

Swift takes a long time to compile. You probably need more CPU and memory to build the function so it doesn't time out.

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.
Projects
None yet
Development

No branches or pull requests

3 participants