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

Api respond with html content instead of json response sometimes #2186

Closed
lk77 opened this issue Jul 21, 2018 · 2 comments
Closed

Api respond with html content instead of json response sometimes #2186

lk77 opened this issue Jul 21, 2018 · 2 comments

Comments

@lk77
Copy link

lk77 commented Jul 21, 2018

Version Info

  • Directus version and branch (Or commit hash):6.4.9
  • PHP version: 7.1.7
  • MySQL version: 5.5
  • Web server: (Ex. Apache, nginx or IIS?) : apache
  • OS name and version: ubuntu 16.04 running docker (with directus-docker image)

Hello,

i have a problem with the backend, it's not loading properly, because of incorrect response from the api
when the app is doing this request : PUT /api/1.1/tables/{table}/preferences HTTP/1.1

Expected Behavior

The backend interface is loading properly, without error

Actual Behavior

Red message with unknown server error is shown very often, it seems random.
The network tab shows only a "200 ok" response but content of the request is incorrect (see dump of request and response headers and response body in attachment),
there is an html page instead of json response, the script will do the request again, and it usually work, but there is a red message at each page, it's annoying.

Steps to Reproduce

  1. Login to the backend
  2. See the js fail to update data with the api sometimes
  3. Try another page
  4. Same thing, it fails frequently

Schema Dump, Logs, or Screenshots

compare_working_not_working.txt

i use nginx reverse proxy to access the docker containers, but i have the problem too when accessing the container directly on the mapped port on host.

if you have ideas why this is happening.

thanks.

@lk77
Copy link
Author

lk77 commented Jul 23, 2018

Hello,

i have done some testing,
on a fresh installation, it works until i start to manage my tables with the settings,
then the PUT preferences route stop working.

if you have an idea,

thanks.

@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants