I was able to get everything set up fine, and my endpoints are working correctly, however when I try to deploy to a remote I get the following error:

Uncaught AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/deployment/add?_wrapper_format=drupal_modal&ajax_form=1
StatusText: Internal Server Error
ResponseText: 

Which translates to, in my error logs:

PHP Fatal error: Cannot use object of type Doctrine\CouchDB\HTTP\ErrorResponse as array in /mnt/www/html/<dir>/docroot/vendor/relaxedws/replicator/src/Replication.php on line 497 request_id="v-cd9a5fde-332a-11e6-a79c-22000a977914"

Comments

Anonymous’s picture

toddmbloom created an issue. See original summary.

tjh’s picture

I'm getting a similar error in my build as well.

I believe I have everything set up correctly, as the status report page reports that:

Remote is reachable.
Remote is valid.

and if I try to visit /relaxed on either instance (local & target), I see a JSON object like so:
{"couchdb":"Welcome","uuid":"c80e60c2-c234-466d-a6fe-e6dc2a6f7806","vendor":{"name":"Drupal","version":"8.1.1"},"version":"8.1.1"}

However, when I create a piece of content and then try to deploy it (after changing the workspace to point at the correct endpoint), I get this:

Uncaught AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/deployment/add?_wrapper_format=drupal_modal&ajax_form=1
StatusText: OK
ResponseText: 

In the drupal logs:

Error: Cannot use object of type Doctrine\CouchDB\HTTP\ErrorResponse as array in Relaxed\Replicator\Replication->replicateChanges() (line 410 of /var/www/build/html/vendor/relaxedws/replicator/src/Replication.php).

I'm using the following module versions:

  entity_storage_migrate: 1.x-dev
  deploy: 1.0-alpha6
  key_value: 1.0
  relaxed: 1.0-alpha6
  replication: 1.0-alpha1
  workspace: 1.0-alpha1

  multiversion:
    download:
      url: "https://git.drupal.org/project/multiversion"
      type: "git"
      revision: "67e7d94"
    patch:
      # Adds predelete hook to multiversion: https://www.drupal.org/node/2729691
      - "https://www.drupal.org/files/issues/multiversion-predelete.patch"
      # Fix revert revisions functionality. See: https://www.drupal.org/node/2719803
      - "https://www.drupal.org/files/issues/multiversion-remove-is-default-revision-logic-2719803-3_1.patch"
      # Fix deleting revsions. See: https://www.drupal.org/node/2735057
      - "https://www.drupal.org/files/issues/multiversion-revsision-delete-2735057-1.patch"

As a last note, when I try to use the newest version of multiversion, errors are thrown all over the place.

Anonymous’s picture

More research, the page that is triggered by AJAX when you do a deployment is:
/admin/structure/deployment/add?_wrapper_format=drupal_modal&ajax_form=1

Going to that page, gives an error of:

[{"command":"add_css","data":"\u003Clink rel=\u0022stylesheet\u0022 href=\u0022\/sites\/default\/files\/css\/css_eWmbbi3frMJPauCYHygIVEjcDmNqivacE1SJjDW017s.css?o8ttrj\u0022 media=\u0022all\u0022 \/\u003E\n"},{"command":"insert","method":"replaceWith","selector":null,"data":"\n    \u003Cdiv role=\u0022contentinfo\u0022 aria-label=\u0022Error message\u0022 class=\u0022messages messages--error\u0022\u003E\n          \u003Cdiv role=\u0022alert\u0022\u003E\n                  \u003Ch2 class=\u0022visually-hidden\u0022\u003EError message\u003C\/h2\u003E\n                    <strong>An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (256 MB) that this server supports.</strong>\n                \u003C\/div\u003E\n      \u003C\/div\u003E\n    \n","settings":null}]

It seems weird that it would require such a large payload - the test deployment is only one node from a fresh install. I'm having my host double post_max_size to see if that makes things work better.

Of course it could be totally unrelated, too.

Edit, host just upped it to 512 and it's still giving that error. I can't understand why deploy would need such a large POST. It's a fresh install with only one node. Is it because instead of installing on stage, I just copied down the database from production?

Anonymous’s picture

Just doing some more research and update post_max_size and upload_max_filesize to 1024MB and still getting the error: " An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (1 GB) that this server supports."

There has to be some bug because no way a deployment can be more than 1GB. :(

Edit: Deploying and updating from local workspace to local workspace works fine, it's just when you go from local to remote. :(

alexej_d’s picture

Judging from the code in DocResource:get() there is something wrong because the first argument (which should be of type WorkspaceInterface) is always empty this then throws an NotFoundHttpException…

jeqq’s picture

Status: Active » Postponed (maintainer needs more info)

I've tried to reproduce these errors with latest dev versions for this module and its dependencies. I can't reproduce them. Created an article with three taxonomy terms, attached an image and created a menu link. All content entities have been replicated correctly. Both sites, source and target installed locally.

alexej_d’s picture

Well, I think one way to reproduce is if your source site has menu links linking to deleted nodes. This is probably the reason this issue exists.

Anonymous’s picture

Which module in the Deploy Suite handles the replication?

I'm still getting: "Error: Cannot use object of type Doctrine\CouchDB\HTTP\ErrorResponse as array in Relaxed\Replicator\Replication->replicateChanges() (line 410 of /var/www/build/html/vendor/relaxedws/replicator/src/Replication.php)."

Which is at the line:

"->transferChangedDocuments($docId, $revMisses['missing'], $this->target);"

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Uff, okay, I did a fresh install of EVERYTHING and things seem to be working. No idea what happened, that was weird. x.x

sinn’s picture

After some deploy that was failed I faced with the same issue. Restore saved database dump is helped me. So looks like this bug still lives.

nvaken’s picture

Also experiencing the same issue. Have not tried reinstalling module yet though..

blgarg’s picture

Hi Team,

Is there any update on above issue. This is pain for me.

Thanks,
Bhart Garg

mraichelson’s picture

(Nevermind, I think there's a different issue that's a more appropriate fit for my problem.)