W
Wasp3w ago
Zuck

Fly Docker Deployment Issue With V.16.0

This is a loom from one of my developers showing the issue: https://www.loom.com/share/c28d12803ef04178af585a244416702a?sid=e7852fb7-c76c-4c92-a111-c0534c991cc3 This only happened after updating to V16.0 Build Process Log ✅ Configuration is Valid • Verified app config • Building image • Building image with Depot • butld: () Build Steps [+] Building 2.7s (13/22) 1. Loading Build Definition • Transferring Dockerfile (8.28kB) ✅ 2. Loading Metadata • Metadata for docker.io/library/node:18.18.0-alpine3.17 ✅ 3. Loading .dockerignore • Transferring context (64B) ✅ 4. Pulling Base Image • docker.io/library/node:18.18.0-alpine3.17@sha256:8cdc5ff72de424adca7217dfc9a6c4ab3f2446737 ✅ 5. Loading Build Context • Transferring context (43.07KB) ✅ 6. Caching Steps • apk --no-cache -U upgrade & apk add --no-cache python3 build-base libtool autoconf ✅ • WORKDIR /app ✅ • COPY src ./src ✅ • COPY package.json ✅ • COPY package-lock.json ✅ 🚨 Errors Encountered ❌ Failed COPY Commands • [server-builder 5/8] COPY .wasp/build/server .wasp/build/server ❌ • [server-builder 6/8] COPY .wasp/out/sdk .wasp/out/sdk ❌ • [server-builder 7/8] COPY .wasp/build/db/schema.prisma .wasp/build/db/ ❌ 💥 Fatal Error Error: failed to fetch an image or build from source Reason: failed to solve: failed to compute cache key Details: failed to calculate checksum of 'ma': not found Reference: pz1v5a1icsx9nxg3buw4ujbn8::46rz7oa7hfz3874kpa7ib2aqo
10 Replies
kapa.ai
kapa.ai3w ago
Hi @Zuck. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the information provided in the knowledge sources and the user's question, it appears that this issue is related to a deployment problem with Wasp and Fly.io. However, the specific error described is not directly addressed in the given knowledge sources. Let me provide some general insights and suggestions based on the available information: 1. Version Update: The user mentioned that this issue occurred after updating to V16.0. It's important to note that Wasp has had version-related issues in the past. For example, this GitHub issue discusses problems with Prisma versions when using certain Node.js versions. 2. Dockerfile Changes: In Wasp 0.12.X, there were changes to the default server Dockerfile. As mentioned in the migration guide, if you customized your Dockerfile or had a custom build process, you might need to update it to incorporate the changes made in Wasp 0.12.X. 3. File Copying Issues: The error log shows that the COPY commands for certain directories (.wasp/build/server, .wasp/out/sdk, .wasp/build/db/schema.prisma) are failing. This could indicate that these directories or files are missing or inaccessible during the build process. 4. Potential Solutions: - Ensure you're using the latest version of Wasp compatible with your project. - Check if the required directories and files exist in your project structure. - If you've customized the Dockerfile, make sure it's up to date with the latest Wasp changes. - Verify that all necessary files are included in your git repository and not gitignored. 5. Debugging: As suggested in this Discord conversation, you might want to inspect the .wasp/build folder to see the exact code that Fly deploys. This could help identify any missing files or configuration issues. Unfortunately, the knowledge sources don't provide a direct solution to the specific error you're encountering. If the problem persists after trying these suggestions, you may need to reach out to Wasp's support channels or consult their latest documentation for more specific troubleshooting steps related to Fly.io deployments and Docker build issues in Wasp 16.0. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Zuck
ZuckOP3w ago
Semi urgent as i want to get deploying again Okay update! It was from deprecated packages not in use.
Zuck
ZuckOP3w ago
But now getting this
No description
Zuck
ZuckOP3w ago
@kapa.ai ==> Verifying app config Validating /Users/alwyn/develop/aeonsai/my-saas/app/ wasp/build/web-app/fly.toml • Configuration is valid -→> Verified app config ==> Building image => Building image Error: failed to fetch an image or build from source: app does not have a Dockerfile or buildpacks configured. See ht tps://fly.io/docs/reference/configuration/#the-build-section
kapa.ai
kapa.ai3w ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Based on the error message you've provided, it seems you're encountering an issue with building the Docker image for your Wasp application on Fly.io. Let me address this based on the relevant information from our knowledge sources. The error suggests that Fly.io cannot find a Dockerfile or buildpack configuration for your application. This is likely because the Dockerfile is not in the expected location. In Wasp, the Dockerfile is typically generated in a specific directory. Let's go through some potential solutions: 1. Dockerfile Location: The Dockerfile should be in the .wasp/build directory. As mentioned in the Fly.io deployment documentation, you should be in the .wasp/build/ directory when running the deployment command. 2. Custom Dockerfile: If you're using a custom Dockerfile, make sure it's in the correct location. According to the Wasp documentation on customizing Dockerfiles, you can place a custom Dockerfile in your project's root directory, and Wasp will append its contents to the default Dockerfile. 3. Building Locally: If you're trying to build locally, make sure to use the --build-locally option as mentioned in the Wasp CLI documentation:
wasp deploy fly launch --build-locally

wasp deploy fly launch --build-locally

or
wasp deploy fly deploy --build-locally

wasp deploy fly deploy --build-locally

4. Verify Dockerfile Generation: You can check the contents of your Dockerfile by running:
wasp dockerfile

wasp dockerfile

This will show you what your project's (potentially combined) Dockerfile looks like. 5. Check fly.toml: Ensure that your fly.toml file is correctly configured and in the right location. As mentioned in the Wasp documentation, you might need to manage this file manually after rebuilding your Wasp app. If you've verified all these points and are still encountering issues, you might need to regenerate the fly.toml file. You can do this by running:
flyctl config save -a <app-name>
flyctl config save -a <app-name>
This will regenerate the fly.toml file from the remote state stored in Fly.io. If the problem persists after trying these steps, you may need to reach out to Wasp's support channels for more specific assistance, as the error you're encountering might be related to recent changes in Wasp 16.0 that are not fully documented in our current knowledge sources. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Zuck, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
miho
miho3w ago
Could you share the details on which commands are you running when deploying?
Zuck
ZuckOP3w ago
All good!! All fixed @miho The issue wasp 16 is more strict for deprecated packages, unused packages, and type errors and it wouldnt let us deploy till those were fixed we fixed, and got rid of the custom dockerfile that we didnt need and it worked
miho
miho3w ago
Could you maybe give us a example of a package it didn't like? I'm glad it worked out 👍
Zuck
ZuckOP3w ago
@miho We had all of these not in use :boi: @react-three/drei * @react-three/fiber * @smithy/shared-ini-file-loader * @tinymce/tinymce-react * @tsparticles/engine * @tsparticles/react * @tsparticles/slim * @types/ioredis * anthropic * aws-sdk * bull * bullmq * canvas * convertapi-js * docx * elevenlabs-node * eventsource * heic2any * jimp * langchain * papaparse * pdf-extractor * pdf-lib * pdf-to-img * pdf2pic * pdfjs-dist * pgvector * pinecone * prettier-plugin-tailwindcss * react-modal * react-slick * roughjs * screenshotone-api-sdk * slick-carousel * socket.io-client * three * together-ai * wired-elements * wired-elements-react -- So one of them hahahaa
miho
miho3w ago
Okay, that's a long list 😄 if you have any more specific info to share, let me know so we can investigate!

Did you find this page helpful?