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

Invalid backend response. Data is not JSON. #2036

Closed
MozhdehDokhani opened this issue Jun 2, 2017 · 17 comments
Closed

Invalid backend response. Data is not JSON. #2036

MozhdehDokhani opened this issue Jun 2, 2017 · 17 comments
Labels

Comments

@MozhdehDokhani
Copy link

Hi,
elFinder works fine on my localhost and on all my hosts. but I have a host that when I want to open elFinder this error appears:
Invalid backend response. Data is not JSON.
I'm sure that it's my host problem. but I don't know what the problem is :(

any suggestion ?

@nao-pon
Copy link
Member

nao-pon commented Jun 3, 2017

@Mozhdeh-d Please check the response from the server with the browser's developer tool etc. Are there any error messages?

@MozhdehDokhani
Copy link
Author

There's no error in console tab. but also there's no response for connector.php in network tab :(

1
2
3
4

@nao-pon
Copy link
Member

nao-pon commented Jun 4, 2017

Please use error_reporting , display_errors of PHP to display the error.

@mcarpenterjr
Copy link

what's 'driver' set to?

@nao-pon
Copy link
Member

nao-pon commented Jun 15, 2017

To access the file system on the server by 'LocalFileSystem'.

@fbdlcm
Copy link

fbdlcm commented Jun 15, 2017

Same issue here. I get no response/errors from connector.php even using error_reporting / display_errors but still get the "Invalid backend response. Data is not JSON." Driver is set to LocalFileSystem and works fine locally.

At the console (network tab), the difference I see between the local (that's working fine) and the host is the "target". While locally it's something like cmd=open&target=l1_XA&, in the host the target is empty (cmd=open&target=&)

@nao-pon
Copy link
Member

nao-pon commented Jun 15, 2017

If you have PHP 7.1 or higher on your server, there is a bug in Fatal error.(but error when deleting files) Please try the nightly build.

c.f. #2040

cmd=open&target=&

That is correct on first request.

@nao-pon
Copy link
Member

nao-pon commented Jun 17, 2017

Error handling extended of the nightly build. If you set the connector option debug to true, you may be able to see something error message. Please try the nightly build.

@nao-pon nao-pon closed this as completed Jun 21, 2017
@isadev
Copy link

isadev commented Nov 28, 2017

Hi is this issue solved?, i have the same error, none error display on the console and all the http request return 200 response...is there any solution?

@wintstar
Copy link
Contributor

wintstar commented Nov 28, 2017

I have the same problem. With Version 2.1.29 and with with the above linked nightly build. With Version 2.1.19 have i not Problems

PHP: 7.1.11
Server Version: Apache/2.2.31 (Unix)

elfinder-not-join

@nao-pon nao-pon reopened this Nov 29, 2017
@nao-pon
Copy link
Member

nao-pon commented Nov 29, 2017

@isadev , @wintstar First of all, please set 'debug' of the connector setting to true.

Please find the problem request in the browser developer tool and access the request URL directly in the browser, and look at the response.

Then let me know the request and response and your connector settings.

@nao-pon
Copy link
Member

nao-pon commented Nov 29, 2017

With the default installation method, there is no problem with my test site (2.1.29 (2.1 - src Nightly: 9b8c92b) on PHP 7.2.0 RC 4 on nginx / 1.6.2).

@wintstar
Copy link
Contributor

Found the bug.

  • baseUrl => was wrong
  • defaultOpts : {url => was wrong

many thanks nao-pon

@nao-pon
Copy link
Member

nao-pon commented Nov 29, 2017

How about you @isadev ?

@nao-pon nao-pon closed this as completed Dec 1, 2017
@trantien1999kg
Copy link

I am also getting error "Invalid backend response. Data is not JSON " when browsing the server with elfinder , help me , please!!!!
image

@instantflorian
Copy link

instantflorian commented Aug 31, 2023

Had this issue too. In the PHP confuration of the server is no value set for max_execution_time. So the function set_time_limit throws an exception:

There was an unknown exception: set_time_limit(): Argument #1 ($seconds) must be of type int, string given in line (4848) of /elfinder/ef/php/elFinder.class.php

I added a stupid workaround before line 4848:
if (!is_int($time)) {$time=100;}
which obviously fixes the issue.

@khaidev
Copy link

khaidev commented Nov 14, 2023

This issue occur with me and i found a reason and solved it success.

Check all everything api is return ok, but do not work.

  • Reason: json return property name case intensive not match
    E.g: { "name" : "ABC"} / {"Name": "ABC"}
  • Solved: Check you config api return json format

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

No branches or pull requests

9 participants