Facing error graphql after installing SuiteCRM8

Hello Team,

I am installing suitecrm 8. I have installed successfully. But while opening webpage it show error in console. Below is the error.

https://a486e6606699.ngrok.io/SuiteCRM800/public/api/graphql 404 (Not Found)
506-es2015.87684172a7ad05f6600b.js:266 ERROR Error: undefined
at new t (477-es2015.78a85e6ecad91f13fce6.js:350)
at 477-es2015.78a85e6ecad91f13fce6.js:350
at 477-es2015.78a85e6ecad91f13fce6.js:350
at new P (polyfills-es2015.8c96a3d504d415ad14cc.js:48)
at Object.error (477-es2015.78a85e6ecad91f13fce6.js:350)
at g (477-es2015.78a85e6ecad91f13fce6.js:350)
at b (477-es2015.78a85e6ecad91f13fce6.js:350)
at e.value (477-es2015.78a85e6ecad91f13fce6.js:350)
at 477-es2015.78a85e6ecad91f13fce6.js:350
at Array.forEach ()

Please help me to find the solution.

Hey there,

Are you still having issues with this?

I haven’t gone through the installation of SuiteCRM 8 myself, but I have found this logged issue around graphql:

Does this link shed any light, or solutions, on the issue?

Hello John,

It was resolved. Thanks

But i still get same problem

Hi @Ayush_legalpay,

Welcome to the community :wave:

Sorry for the delay in replying.

this thread may also help.

Hi @Ayush_legalpay,

Thank you for the feedback. How does your vhost configuration look like?

Hi @Ayush_legalpay

Thank you. Not sure if I fully understood, and apologies if what I’m about to say you already did.

The path /var/www/project/public is just an example. you should change it to the path to public folder inside your SuiteCRM directory.

Also the following should also be changed to your domain

ServerName domain.tld
ServerAlias www.domain.tld

It is suggested that getting a 404 for GraphQL is a mod_rewrite error. What if you “double check” by testing https://<your_host>/index.php/api/graphql and it still shows a 404?

How did you resolve it? I see this with 8.3.1 and 8.4.0, both fresh installs.

403 seems to be a quite common issue too, it’s what I’m getting.

I know it’s old, but seems the question may be out there… Plus I had same problem while back, got stumped, and now finally figured it out. In my case, I found that the vhost (I am using Apache2) config was not configured for ssl. I added this code to my .conf file for ssl and it all worked after that:

<Directory /<path-to-suite>/public>
        AllowOverride All
        Order Allow,Deny
        Allow from All
    </Directory>

From what I know, there is usually a .conf file for non-ssl (port 80 typically) and for ssl (usually port 443).

Hi,
If I navigate to http://myawsip/api/graphql. I get the error below.
{
“@id”: “/api/errors/403”,
“@type”: “hydra:Error”,
“title”: “An error occurred”,
“detail”: “Invalid CSRF token”,
“status”: 403,
“type”: “/errors/403”,
“hydra:title”: “An error occurred”,
“hydra:description”: “Invalid CSRF token”
}

Yes, I configured my web server correctly.
ServerName crm.mynewdomainname.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/crm/public

<Directory /var/www/html/crm/public>
    AllowOverride All
    Order Allow,Deny
    Allow from All
</Directory>

yes, the api directory is inside the public directory and there is a graphql folder inside that.
Yes, mod_rewrite is enabled.
Yes, all of my folders are owned by www-data.
I am on Apache/2.4.58 (Ubuntu)
PHP 8.3.6 (cli) (built: Mar 19 2025 10:08:38) (NTS)

So, what am I missing that I am getting this error.

  1. Make sure you downloaded all required packages of the PHP and restart web server and PHP service.

  2. Then check the file permissions:

Set the required permissions

If you are using the terminal you can do this by running:

find . -type d -not -perm 2755 -exec chmod 2755 {} \;

find . -type f -not -perm 0644 -exec chmod 0644 {} \;

find . ! -user www-data -exec chown www-data:www-data {} \;

chmod +x bin/console

Please have in mind that:

  • The user and group name (in the above example www-data ) needs to be replaced by the actual system user and group that your webserver runs under. This varies depending on your operating system. Common web server users are as follows:

    • www-data (Ubuntu Linux/Apache)
    • apache (Linux/Apache)


Check compatibility matrix

Just for grins and giggles, I went through everything suggested. I still have the same issue. Can someone tell me how to actually fix this?

After thinking about it, There was no response to the json response.
I ran all of these commands

find . -type d -not -perm 2755 -exec chmod 2755 {} \;

find . -type f -not -perm 0644 -exec chmod 0644 {} \;

find . ! -user www-data -exec chown www-data:www-data {} \;

chmod +x bin/console

Nothing changed for me. I looked at the compatibility matrix and I am with in standards on my server. I was assuming that when I put www-data. That it would be understood that I enter www-data:www-data as the owner of the directory and all the files.

What is the logic behind the api/graphql ? Why is the folder empty? What is supposed to be in the folder?

For anyone else that finds this thread. here is what fixed the issue I was having.

  1. I caused my own issue by moving the api/graphql folder into the public folder. That made the .htaccess check true. That stopped the .htaccess from working.
  2. I removed the directory.
  3. When the program initially came up, it went to http://localhost/install.php which is wrong. When I backed out and just put in http://localhost. The .htaccess worked properly and redirected to http://localhost/#/install.php

There was nothing per se wrong with the program. My conversation with ChatGPT help me to figure it out.

You can check the topics here:

https://community.suitecrm.com/search?q=graphql%20error%20status%3Asolved