Jump to content
web2008

Error generating JSON encoded response

Recommended Posts

When I click on "Clients" I get the following:

Error generating JSON encoded response:Malformed UTF-8 characters, possible incorrectly encoded.

Share this post


Link to post
Share on other sites

Hi there,

This is likely due to the characters in the client's name/address containing a non-UTF-8 character. We will look into Greek characters,

@web2008 do you have any such similar clients?

Share this post


Link to post
Share on other sites

Thanks for the confirmation.

If your System Charset setting utf-8 also?

This is located under Setup > General Settings > Localisation tab.

Share this post


Link to post
Share on other sites

Hi @web2008 and @pRieStaKos,

We've been testing with Greek and Norwegian characters in the client profile data, but haven't been able to reproduce this error for ourselves yet.

Does this happen for certain clients only, or every one that you've tried?

If it's only certain clients, is there anything in common about their profile data which might provide a clue for us to try next?

 

If there isn't, please do submit a ticket via https://www.whmcs.com/preview/mobile and we can investigate directly on your installation.

Share this post


Link to post
Share on other sites

If I add the following to configuration.php it works when I click "Clients" and I can see all the clients.

$mysql_charset = 'utf8';

But the problem then is that many characters do not appear correctly!

My DB has the following:

Character set:  utf8
Collation:  utf8_unicode.ci

 

 

Share this post


Link to post
Share on other sites

I have now added "$mysql_charset = 'utf8'; " to configuration.php and replaced all characters that went wrong in the database.

Everything works fine now!

Share this post


Link to post
Share on other sites

I already got the utf8 charset in my configuration file. I got it from the first installation there.

In the app, after I click on the 3-4 client profile I get the JSON error. And pops up unstoppable...

Although the Profile form still annoys me every time I open the app.

AB7CAF45-973E-489C-9A4C-82286250E06B.jpeg

Edited by pRieStaKos

Share this post


Link to post
Share on other sites

Is the Character set and Collation correct in the DB ?

Otherwise you can take a SQL Dump of tblclients / tblusers and read the files into a text editor to see if everything looks correct.

At least it was these two tables that solved my problem!

 

 

Share this post


Link to post
Share on other sites

Hi @web2008,

I'm pleased to hear you were able to get to the bottom of the error. Thanks for sharing the solution,  I'm sorry it involved some manual conversion of data to resolve.

We'll look at ways the app can potentially handle this situation better in future.

Share this post


Link to post
Share on other sites

Hi

I am experiencing the exact same problem. It makes the app un-useable.

Non of my tables contain characters that are not English and they are all UTF -8

The issue starts when I click on a client who has a hyphen in his contact email address.

I can't ask the client to change his email address so what am I supposed to do?

As I said earlier I cannot use the program with this error.

 

regards

John

Share this post


Link to post
Share on other sites

Hi @johnleah,

Can you please confirm whether the configuration.php in your WHMCS directory file contains the following line:

$mysql_charset = 'utf8'; 

If not, please add it, and let us know whether that also resolves the issue for you.

Share this post


Link to post
Share on other sites

i got the same issues , but only for some clients

in configuration.php

$mysql_charset = 'utf8';

in general set like this

indo_cc.JPG.849a410a65d344f94039c54f495de277.JPG

on database

image.png.576ff02058aca2aada86970d71f1eda7.png

same error InnoDB too

Edited by lims

Share this post


Link to post
Share on other sites
1 hour ago, web2008 said:

When I test with a client who have a email address with a hyphen, all works fine!

I got clients with dot and error appears again. It's been triggered when I'm trying to view a client with Company Name. Odd....

Edited by pRieStaKos

Share this post


Link to post
Share on other sites

Hi all,

We have identified this error can also occur if there is an invalid (non utf-8) character on the client's profile or service records. Most typically that will be a corrupted password.

I have added troubleshooting steps to our documentation to identify and resolve both known causes: https://docs.whmcs.com/Mobile_App:_Troubleshooting#Viewing_and_Managing_Clients

 

Share this post


Link to post
Share on other sites
Posted (edited)

@WHMCS John its work using this tips

Corrupt_password.png

but It will take more time if change the passwords one by one for the client's products

more than 800 client and many more product, i'm using whmcs from v4 and now latest version

any some trick to sync password from cpanel, plesk and directadmin ?

Edited by lims

Share this post


Link to post
Share on other sites

Hi @lims,

Regrettably cPanel, Plesk (and as far as I know) DirectAdmin do not provide an API which would expose current service passwords, so unfortunately there is not a way to sync the passwords up.

Corrupted passwords like this indicate that the cc_encryption_hash value within your configuration.php file was changed, so the data encrypted using the original hash can not be decrypted with the present hash value.

If you have a backup of configuration.php with the original value, you can swap it back over temporarily and copy the passwords to a secure location.

Then swap back to your current hash value, and re-enter the passwords. This will re-save them under the new hash.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated