PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Digital Ocean deployment error...

Solved
alexpaiva

Aug 30th, 2022 10:40 PM

I am following the exact instructions and deploying this: https://github.com/thedevdojo/wave To digital ocean using the 'deploy now' button on the repository, but during deployment it gives an error: "Deploy Error: Non-Zero Exit Code" on migration. And the console reads: "[2022-08-30 19:15:22] [2022-08-30 19:15:22] APPLICATION IN PRODUCTION. [2022-08-30 19:15:22] [2022-08-30 19:15:22] [2022-08-30 19:15:22] Do you really wish to run this command? (yes/no) [no] [2022-08-30 19:15:22] ❯ [2022-08-30 19:15:22] WARN Command canceled. [2022-08-30 19:15:22] " How can I fix this? I can't find anything here on digital ocean about this

bobbyiliev

Aug 31st, 2022 01:10 AM

Hello,

Have you made any changes to the migrations command?

https://github.com/thedevdojo/wave/blob/main/.do/deploy.template.yaml#L8

Usually if you remove the --force flag, you will get to that prompt question.

alexpaiva

Aug 31st, 2022 07:31 AM

I did not do any changes, I simply clicked the direct deploy button on the repository. This link: https://cloud.digitalocean.com/apps/new?repo=https://github.com/thedevdojo/wave/tree/main

I did not change anything at all.

alexpaiva

Aug 31st, 2022 12:58 PM

Digital Ocean tried it themselves and still get the error so it's code related. Tried with managed databases aswell, same error: https://i.imgur.com/PrEEWYJ.png

bobbyiliev

Sep 2nd, 2022 02:22 AM

Hi there,

Try using the latest commit, I've merged a PR with a fix:

https://github.com/thedevdojo/wave/pull/63

Let me know if anything else pops up.

alexpaiva

Sep 2nd, 2022 07:39 AM

Not working, new errors on Migrate again:

[2022-09-02 14:34:57] "roles" violates foreign key constraint "users_role_id_foreign" on table "
[2022-09-02 14:34:57] users"
[2022-09-02 14:34:57] DETAIL: Key (id)=(1) is still referenced from table "users". (SQL: delete
[2022-09-02 14:34:57] from "roles")
[2022-09-02 14:34:57]
[2022-09-02 14:34:57] [2022-09-02 14:34:57] In Exception.php line 18: [2022-09-02 14:34:57]
[2022-09-02 14:34:57] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table
[2022-09-02 14:34:57] "roles" violates foreign key constraint "users_role_id_foreign" on table "
[2022-09-02 14:34:57] users"
[2022-09-02 14:34:57] DETAIL: Key (id)=(1) is still referenced from table "users".
[2022-09-02 14:34:57]
[2022-09-02 14:34:57] [2022-09-02 14:34:57] In PDOStatement.php line 117: [2022-09-02 14:34:57]
[2022-09-02 14:34:57] SQLSTATE[23503]: Foreign key violation: 7 ERROR: update or delete on table
[2022-09-02 14:34:57] "roles" violates foreign key constraint "users_role_id_foreign" on table "
[2022-09-02 14:34:57] users"
[2022-09-02 14:34:57] DETAIL: Key (id)=(1) is still referenced from table "users".
[2022-09-02 14:34:57]
[2022-09-02 14:34:57]

alexpaiva

Sep 2nd, 2022 07:40 AM

Screenshot: https://i.imgur.com/KW4A9dp.png

bobbyiliev

Sep 2nd, 2022 08:26 AM

This error will occur only if you run the php artisan migrate --seed command two times.

This command should only be executed once.

If you have an existing database, you should remove the seed step from the DigitalOcean App components.

When deploying Wave for the first time you need the seed command and it works as expected:

To remove the migrate stage go to Settings -> Click on the Migrate component -> scroll down and click the Destroy Componenet button. That way the seed will not be triggered.

Let me know how it goes.

alexpaiva

Sep 2nd, 2022 09:00 AM

I have nothing on my DO account. I'm simply clicking the button on the github repository and clicking next and deploy, nothing else. Same error showing up all the time. I delete everything in my DO account, press the Deploy button on the github respository, on DO just press next next, etc and don't change anything and it gives that error. How can I fix this?

alexpaiva

Sep 2nd, 2022 09:09 AM

Ok so I deleted the migrate and it seems to have built properly, managed to login properly aswell. But on the admin panel anytime I make any change or visit any page I get " 419 Page Expired " Could this be related to deleting the migration module or?

alexpaiva

Sep 2nd, 2022 09:12 AM

Also now on the homepage it says I'm logged in but when I visit the slashAdmin page it asks me to signin again and when I insert the credentials it just refreshes the page and nothing happens. Something is not right here I believe. I'm using W10 with latest Firefox with Private window mode.

alexpaiva

Sep 2nd, 2022 10:35 AM

Now once I insert login details it is giving "404 NOT FOUND" errors

bobbyiliev

Sep 2nd, 2022 11:38 PM

Hi there,

I've tested this with my fresh new deployment and it works as expected. Did you make any changes to the environment variables?

For example, did you change the APP_URL? It should stay as ${APP_URL} and not be changed.

The "419 Page Expired" error occurs if you've not set your SESSIONS driver correctly.

alexpaiva

Sep 3rd, 2022 06:04 AM

I did not change anything, not even the name 'wave'. Default project on a DO account, I press the deploy button on the repository of wave, I just press next until it deploys. Just did it now, now it fails in the web module: [2022-09-03 13:03:27] In Git.php line 484: [2022-09-03 13:03:27]
[2022-09-03 13:03:27] Failed to execute git clone --mirror -- '[email protected]:stella-maris/clock.
[2022-09-03 13:03:27] git' '/layers/heroku_php/shim/php/.composer/cache/vcs/git-gitlab.com-stella
[2022-09-03 13:03:27] -maris-clock.git/'
[2022-09-03 13:03:27]
[2022-09-03 13:03:27] Cloning into bare repository '/layers/heroku_php/shim/php/.composer/cache/v
[2022-09-03 13:03:27] cs/git-gitlab.com-stella-maris-clock.git'...
[2022-09-03 13:03:27] ssh_exchange_identification: read: Connection reset by peer
[2022-09-03 13:03:27] fatal: Could not read from remote repository.
[2022-09-03 13:03:27]
[2022-09-03 13:03:27] Please make sure you have the correct access rights
[2022-09-03 13:03:27] and the repository exists.
[2022-09-03 13:03:27]
[2022-09-03 13:03:27]
[2022-09-03 13:03:27] install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [...] [2022-09-03 13:03:27]
[2022-09-03 13:03:27] [2022-09-03 13:03:27] ! ERROR: Dependency installation failed! [2022-09-03 13:03:27] !
[2022-09-03 13:03:27] ! The 'composer install' process failed with an error. The cause [2022-09-03 13:03:27] ! may be the download or installation of packages, or a pre- or [2022-09-03 13:03:27] ! post-install hook (e.g. a 'post-install-cmd' item in 'scripts') [2022-09-03 13:03:27] ! in your 'composer.json'. [2022-09-03 13:03:27] !
[2022-09-03 13:03:27] ! Typical error cases are out-of-date or missing parts of code, [2022-09-03 13:03:27] ! timeouts when making external connections, or memory limits. [2022-09-03 13:03:27] !
[2022-09-03 13:03:27] ! Check the above error output closely to determine the cause of [2022-09-03 13:03:27] ! the problem, ensure the code you're pushing is functioning [2022-09-03 13:03:27] ! properly, and that all local changes are committed correctly. [2022-09-03 13:03:27] !
[2022-09-03 13:03:27] ! For more information on builds for PHP on Heroku, refer to [2022-09-03 13:03:27] ! https://devcenter.heroku.com/articles/php-support [2022-09-03 13:03:27] [2022-09-03 13:03:27] ERROR: failed to build: exit status 1 [2022-09-03 13:03:29] [2022-09-03 13:03:29] For documentation on the buildpacks used to build your app, please see: [2022-09-03 13:03:29] [2022-09-03 13:03:29] PHP v0.210.4 https://do.co/apps-buildpack-php [2022-09-03 13:03:29] [2022-09-03 13:03:29] ! Build failed

bobbyiliev

Sep 4th, 2022 09:37 AM

This seems like a temporary problem with GitLab and the stella-maris repository. It should work if you run it again.

Load More Answers