Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on infinite loop #8

Open
nowy opened this issue Jul 26, 2015 · 4 comments
Open

Stuck on infinite loop #8

nowy opened this issue Jul 26, 2015 · 4 comments

Comments

@nowy
Copy link

nowy commented Jul 26, 2015

I'm stuck on an infinite loop.
Cloned the repo exactly, entered my config details, but when I hit login, there is never a server response.
I have a feeling it's due to an unresolved promise. Another option is because I'm on localhost without an SSL certificate?

@esbenp
Copy link
Owner

esbenp commented Aug 2, 2015

Hmmm.. I have no idea. I just cloned the repo and it worked fine. Was it the browser or server that was stuck?

@Twisterking
Copy link

Could you fix it? I have the same problem here.
I created a new lumen project, copied all the contents of your repo and then did composer update.

app.php:

<?php
return [
    'url' => 'http://localhost:8000',
    'key' => 'U<CdJu~T&.g/kR-NX55h]HfB+bb,b7Y*',
    'cipher' => 'AES-256-CBC'
];

.env:

APP_ENV=local
APP_DEBUG=true
APP_KEY=6uKr58Ejafz0SJ12jiBBKCZTPvzcX2iL

APP_LOCALE=en
APP_FALLBACK_LOCALE=en

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=apitest
DB_USERNAME=root
DB_PASSWORD=

AUTH_MODEL=App\Auth\User

CACHE_DRIVER=memcached
SESSION_DRIVER=memcached
QUEUE_DRIVER=database

Screenshot
After clicking the login Button all that happens is that the Call to /login is started and then just keep pending. Nothing ever happens! Weird is also after stopping php artisan serve the php process keeps running. So basically the whole webserver crashes when trying to login.

Can you help? :)

EDIT:
On further inspection: The problem is definitely Proxy/Guzzle related!
It seems like that this code is stuck in an infinite loop:

$guzzleResponse = $client->post(sprintf('%s/oauth/access-token', $config->get('app.url')), [
    'form_params' => $data
]);

Any ideas on this?

@Twisterking
Copy link

It seems like I got it to work (although I ran into some new problems): Somehow moving it into my xampp htdocs folder, creating a new vhost (choosing the /publicFolder as root for the vhost) and using some .com domain (incl. modified hostsfile obviously) fixed the problem.
For whatever reason guzzle seems to have problems with the standard laravel (??) localhost:8000 webserver.

@Cosmitar
Copy link

Avoid using PHP built-in server php -S localhost:3000 -t public/
The built-in server doesn't support a second invocation, so hangs when proxy tries to obtain access-token via Guzzle.
reference https://bugs.php.net/bug.php?id=66690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants