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

HTTP 503 – Service Unavailable #307

Open
Jones-S opened this issue Aug 22, 2019 · 1 comment
Open

HTTP 503 – Service Unavailable #307

Jones-S opened this issue Aug 22, 2019 · 1 comment

Comments

@Jones-S
Copy link

Jones-S commented Aug 22, 2019

Hi there
I experienced a very weird error. While developing suddenly my graphql endpoint would not work anymore.

I get an html returned saying things like:

HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException
craft\web\ServiceUnavailableHttpException in /Users/USERNAME/Documents/github/my-craft/vendor/craftcms/cms/src/web/Controller.php:163
Stack trace:
#0 /Users/USERNAME/Documents/github/my-craft/vendor/markhuot/craftql/src/Controllers/ApiController.php(37): craft\web\Controller->beforeAction(Object(yii\base\InlineAction))
#1 /Users/USERNAME/Documents/github/my-craft/vendor/yiisoft/yii2/base/Controller.php(155): markhuot\CraftQL\Controllers\ApiController->beforeAction(Object(yii\base\InlineAction))
#2 /Users/USERNAME/Documents/github/my-craft/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('index', Array)
#3 /Users/USERNAME/Documents/github/my-craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('index', Array)
#4 /Users/USERNAME/Documents/github/my-craft/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('craftql/api/ind...', Array)
#5 /Users/USERNAME/Documents/github/my-craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('craftql/api/ind...', Array)
#6 /Users/USERNAME/Documents/github/my-craft/vendor/craftcms/cms/src/web/Application.php(284): yii\web\Application->handleRequest(Object(craft\web\Request))
#7 /Users/USERNAME/Documents/github/my-craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#8 /Users/USERNAME/Documents/github/my-craft/web/index.php(21): yii\base\Application->run()
#9 {main}

I have a local installation running with MAMP Pro.

  • ✅ I can login to the admin, everything is normal
  • ✅ I can test graphql queries in the graphiql of craftql.
  • ✅ Local mysql is running, php as well

What I can't: Run the curl command
$ curl -H "Authorization: bearer TOKEN" -H "Content-type: application/json" -d '{"query":"{ helloWorld }"}' http://localdomain.test/api
It stopped working from one to another minute...
I even tried to add another token and run the curl command again.
Same error as described above.

Does somebody have an idea, where that could result from?
Stacktrace seems to show to a craftql thing as well.

I think it is related to these lines here:
image
From file: in /Users/USERNAME/Documents/github/my-craft/vendor/craftcms/cms/src/web/Controller.php
How could I suddenly not be authorized anymore?...

Thanks for any help, I really have no clue.

@Jones-S
Copy link
Author

Jones-S commented Aug 22, 2019

OK WOW:
Disabling this button in the backend:
image
Found at admin -> Settings > General

Will break graphql?...
A mere wonder I found out...

Why would this cause such an error?

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

1 participant