laracasts-downloader icon indicating copy to clipboard operation
laracasts-downloader copied to clipboard

ERROR: The current node list is empty after upgrading laracast to Intertia

Open kossa opened this issue 3 years ago • 13 comments

Currently laracasts-downloader is not working after the latest upgrade of Laracast to intertia : https://laracasts.com/blog/the-best-of-both-worlds

Any update for this ?

kossa avatar Jun 25 '21 08:06 kossa

I can confirm, I'm getting the same error:

Authenticating
====================================
ERROR: The current node list is empty.`

Lisendra avatar Jun 26 '21 20:06 Lisendra

I got the same issue ERROR: The current node list is empty

MicroSystems avatar Jun 28 '21 00:06 MicroSystems

So the problem, obviously, is that the code as it exists today depends on all the data existing in the dom. Which it doesn't now that Laracasts is using inertia.

The necessary data does, however, appear to be available either in the data-page attribute of the #app div, or via an xhr request made to the same route, that returns JSON.

tl;dr - Should be fixable.

willvincent avatar Jul 01 '21 02:07 willvincent

Same problem me too....

emilas44 avatar Jul 03 '21 16:07 emilas44

@willvincent any progress fixing this issue ?

MicroSystems avatar Jul 21 '21 03:07 MicroSystems

@MicroSystems I haven't had any time to try.

willvincent avatar Jul 21 '21 03:07 willvincent

up

paolog22 avatar Aug 21 '21 12:08 paolog22

is this fixed ?

hardikdangar avatar Aug 24 '21 12:08 hardikdangar

Unfortunately not. @willvincent is probably very busy.... Maybe he could try to explain what do we have to do? Maybe there is someone else who could fix this!?

emilas44 avatar Aug 24 '21 13:08 emilas44

Upon investigating. saw that csrfToken is not in the dom and is now located in js which is the app is still looking at the dom. :), this is for the authentication only. already fix on my end but i am still trying with getting the series

paolog22 avatar Aug 26 '21 12:08 paolog22

i'm already working to fix this, but having problem with authentication,any idea how should I log in? Non of these approaches works :(

$response = $this->client->post(LARACASTS_POST_LOGIN_PATH, [
    'cookies' => $this->cookie,
    'body'    => [
        'email'    => $email,
        'password' => $password,
        '_token' => $csrfToken,
        'remember' => 1,
    ],
    'verify' => false
]);
$response = $this->client->post(LARACASTS_POST_LOGIN_PATH, [
    'cookies' => $this->cookie,
    'headers' => [
        'X-CSRF-TOKEN'   => $csrfToken,
    ],
    'body'    => [
        'email'    => $email,
        'password' => $password,
        'remember' => 1,
    ],
    'verify' => false
]);

AmirRezaM75 avatar Nov 29 '21 20:11 AmirRezaM75

Not sure why things keep getting addressed to me. All I've done is minor tweaks to this code. 🤣

willvincent avatar Nov 29 '21 20:11 willvincent

@AmirRezaM75 , the login seems to have changed and the request now sends the payload in JSON format.

It's required to send the Request Header content-type: application/json and the body as {"email":"[email protected]","password":"efaewr34q5"}.

carlosflorencio avatar Nov 29 '21 21:11 carlosflorencio