Hi, running cron shows the following errors:
Notice: Undefined variable: user in DeployAuthenticatorSession->deploy() (line 79 of C:\xampp\htdocs\meusite\deployment\sites\all\modules\deploy\plugins\DeployAuthenticatorSession.inc).
DeployAuthenticationException: Authentication error: 404 Failed to retrieve CSRF token. in DeployAuthenticatorSession->deploy() (line 83 of C:\xampp\htdocs\meusite\deployment\sites\all\modules\deploy\plugins\DeployAuthenticatorSession.inc).

Triyng to solve it with https://drupal.org/node/2020027
#1 shows: Parse error: syntax error, unexpected 'else' (T_ELSE), expecting function (T_FUNCTION) in C:\xampp\htdocs\meusite\deployment\sites\all\modules\deploy\plugins\DeployAuthenticatorSession.inc on line 98

#2 shows: Warning: trim() expects parameter 1 to be string, object given in drupal_http_request() (line 948 of C:\xampp\htdocs\meusite\deployment\includes\common.inc).
DeployAuthenticationException: Authentication error: 401 Unauthorized: Missing required argument username in DeployAuthenticatorSession->deploy() (line 63 of C:\xampp\htdocs\meusite\deployment\sites\all\modules\deploy\plugins\DeployAuthenticatorSession.inc).

Can anybody help me please?

Comments

rob_johnston’s picture

One thing... use the patch in #2017767: Error and response with 405 code when try to deploy node instead of trying to follow #2020027: Services 3.4 has changed REST parameters and Session Authentication breaking Deploy. The title isn't correct, but follow the discussion and you'll see that they're talking about the same issue.

rovi’s picture

Thanks for your answer. I've used the 2013781-added-x-csrf-token-3.patch in #8 showing me only this error: DeployAuthenticationException: Authentication error: 404 Failed to retrieve CSRF token. em DeployAuthenticatorSession->deploy() (linha 75 de C:\xampp\htdocs\meusite\cielo1\sites\all\modules\deploy\plugins\DeployAuthenticatorSession.inc), but if i use the deploy-add-basic-auth-2.patch in #20 too, it is showing me the same 2 errors like in my issue.
I've installed services 3.5 but nothing changes.

john bickar’s picture

Status: Active » Needs review
StatusFileSize
new875 bytes

Patch for "undefined variable: user" error.

gilgabar’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #3 resolves the undefined variable: user issue for me.

klonos’s picture

#3 fixed the error for me too! Thanx ;)

dixon_’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

I ran into this myself a while ago and committed this without knowing about this issue. But thanks a lot for posting the issue and making others aware!

sylus’s picture

Are you sure this was committed? I don't see this in latest dev and was still getting this error. Applied this patch and all is well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

develway’s picture

#3 doesn't fix anything, i still have this error
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /development/batch?render=overlay&id=34&op=do StatusText: Service unavailable (with message) ResponseText: DeployAuthenticationException: Authentication error: 404 Failed to retrieve CSRF token. in DeployAuthenticatorSession->deploy() (line 69)

But installing all dev versions required modules and try patch by patch, it's possible to do it working :)

jatinkumar1989’s picture

Hi, I am facing the same issue an dthis patch is not working for me... Any body can help ,, PLz

ERROR :
DeployAuthenticationException: Authentication error: 404 Failed to retrieve CSRF token. in DeployAuthenticatorSession->deploy() (line 94 of /var/www/deploy1/sites/all/modules/deploy/plugins/DeployAuthenticatorSession.inc).

aasarava’s picture

Here's an updated patch that works with Deploy 7.x-3.2.

Is 7 years too late to submit a patch? ;-)