The operation failed with an error. Function 'displayError' finished with error! Cannot read properties of undefined (reading 'toString')

I’ve got a scenario which starts with a ‘Search Posts’ and has a connection with my Wordpress website. Finding posts does work, however if I switch it to ‘pages’, it suddenly is not working anymore and gives me the error:
The operation failed with an error. Function ‘displayError’ finished with error! Cannot read properties of undefined (reading ‘toString’)

Also, next to this, sometimes I get this error (on both the search pages as search posts):
The operation failed with an error. Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!DOCTYPE "… is not valid JSON

I’ve tried it all; reconnection the wp connection, restarting from scratch etc etc, nothing seems to work. Please do help me out here!

3 Likes

:us: I have the same error:
When I try to read my posts in WP, I get the error: 'Function ‘get’ finished with error! Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!doctype "… is not valid JSON.


Tengo el mismo error:
Cuando trato de leer mis posts en WP recibo el error "Function ‘get’ finished with error! Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!doctype “… is not valid JSON”

Same. I get the same error for a wordpress connection:

Function ‘get’ finished with error! Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!doctype "… is not valid JSON

Seems to be a problem a few people are having.

Usually the support is great from Make.com community, so I’ll wait for an update or solution. But good to know it’s not just me. If anyone has the solution, please do let us know!

3 Likes

Same error

"Function ‘get’ finished with error! Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!DOCTYPE “… is not valid JSON”

1 Like

It parsed once, and now it’s back to the same error. Has anyone made any progress on this one? It’s really slowing down the worflow.

Hello everyone @here, thank you for bringing this up in the community.

If you haven’t already, could you please open a support ticket with our Customer Care team? They have the right tools to investigate the issue in detail and escalate it to our developers if needed.

In the meantime, I’ll keep an eye out for any relevant updates and share anything that might help.

Thank you for your patience and cooperation :pray:

1 Like

Hello again @here

The issue appears to originate from the WordPress platform. Although the error message is not very specific (we are in the process of improving the message), the underlying issue is that an invalid connection to WordPress results in HTML code being returned instead of the JSON response. This is most likely caused by security plugins.

To address this, we recommend reviewing your WordPress security plugins and/or Firewall (e.g. Cloudflare) configurations to confirm that they are not blocking access to the API endpoint used by the connection.

Additionally, please make sure that the IP addresses associated with Make are whitelisted in your firewall, as outlined in this article: http://www.make.com/en/help/connections/allowing-connections-to-and-from-make-ip-addresses.

If you have security plugins installed, please try disabling them and then try to create the connection again to see if the issue persists.

2 Likes

The link doesn’t send me to the support tickets, but if I’m right I have already opened a ticket, but no response to this day?

I will now try the fixes you have send in here.

1 Like

I have the same problem along one week! Who can solve it?

1 Like

Hello @Klaas-Koopman, thank you very much for catching the incorrect link. :pray: I’ve updated it, and it now correctly leads to our support ticket form.


Hi @bazasklad3g, I’m sorry to hear that you’re also facing this issue. Can you please try the steps outlined here?

If that doesn’t resolve the issue, please open a support ticket with our Customer Care team who have the tools and permissions to further assist you.

Thanks a lot for your cooperation :pray:

1 Like

I had my host whitelist the IP’s, but still I can’t do the wordpress connection now. Strange thing is I can do it with (get wordpress posts) but not (get wordpress pages)? And get wordpress posts only works from time to time.

I’ve also created a ticket for support, hopefully they come with the correct answer to fix all this.

2 Likes

I have the same problem. Impossible to work. I hope it will be fixed very soon !
thank you @Michaela

2 Likes

Yes, I have disabled security plugins. I have also run it on a clean install of Wordpress and there’s still the same error:

Error

Function ‘fixBOM’ finished with error! Unexpected token ‘<’, " <!doctype "… is not valid JSON

The error field is saying this is a Make error.

It has been a week now, a week that I can’t work with Make for what I would like it to work with. Any insights anyone?

1 Like

Hey Everyone, I had this error too and it turned out I was using the wrong Wordpress connection.

Not that it’s the only cause, as I’ve seen it intermittently do this on a good connection, but if my error helps someone…

1 Like

Has anyone managed to overcome this?

1 Like

Nope. It’s been a couple of weeks.

The thing that helped me resolve it; change webhosting. Not sure why, but it works now!

1 Like

This is the reply when you open a support ticket.

Unfortunately, we cannot be able to fix the issue from our end since we cannot control what WP sends back to us, and if their API doesn’t respond with JSON, it’s because something is affecting its output.

Things to try:

  1. Double-check the credentials, especially the URL. It should end in /wp-json/: https://my-wordpress-site.com/wp-json/

  2. Ensure Pretty Permalinks are being used

  3. Ensure Make IP addresses are whitelisted in

  4. WP settings (if applicable)

  5. any security plugins’ settings (if applicable)

  6. Cloudflare / other proxy settings

1. (Super) Bot Fight Mode - or similar for proxies other than Cloudflare

2. WAF (Web Access Firewall) config

3. Region blocking

4. Potentially other settings
  1. Disable ALL other plugins

  2. Alternative: research each individual enabled plugin to see if any restrict the access to or modify the behavior of the WP APi in any way (additions, changes, blocks, new endpoints…)


I have tried all these. Still getting the same error.

So I have given up trying any automation workflow with make.

Will try with a competitor and more likely to have some luck.

If anyone has a genuine solution, would love to hear it.