Unexpected character encountered while parsing value: ,. Path ", line 0, position 0.

Hi

I have installed the SuiteCRM plugin to Outlook 2010 and it works OK within outlook but I can’t get it to connect. I am getting he following error message:

"Unexpected character encountered while parsing value: ,. Path “, line 0, position 0.”

I see 2 other people have asked a similar question but without a satisfactory responce. Can anyone help with this error message?

I have tried using a range of URLs to access the CRM:

http://crm.MYDOMAIN.com/
http://crm.MYDOMAIN.com/index.php
http://crm.MYDOMAIN.com/index.php?module=Users&action=Login

and I get the same error each time.

I’ve tried enabling and not enabling LDAP and I still get the same error.

Any help would be gratel appreciated.

Thanks

Sorry. There is a slight typo in the error message above: Unexpected character encountered while parsing value: <. Path ", line 0, position 0.

We resolved this issue by fixing the strict standard warnings that we were getting from the REST API. Connection sucessful but its still not working properly. More tinkering required.

Can you elaborate on how you “fixed the strict standard warnings” and where you did so?

Thanks.

Hi

We didn’t actually ‘fix’ the code that was causing the errors, we simply suppressed the errors that were being generated by certain files.

You can do this by adding the following to the php file that is returning the warnings…

ini_set(‘display_errors’, '0’);

My understanding is that there is a new release of the outlook plug-in but when I tried it a few weeks ago, it was just as ineffective. I’ve since given up. Let me know if you have any more luck and I’ll perhaps try it again.

Thanks, but didn’t help. I am also eagerly awaiting the new release.

This may or may not help anybody, but here are my observations so far.

I added a console project to the plugin solution, in Visual Studio 2015, so I could attempt to understand what is happening.

The console app looks like this - basically just creating a session and doing a login.:

namespace addinConsole
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“Starting the console app. Not doing much of anything.”);

        SuiteCRMClient.clsSuiteCRMHelper.SuiteCRMUserSession = new SuiteCRMClient.clsUsersession(@"http://vapp:8080/suitecrm/", "bjoel", "frog", "");

        var pwd = SuiteCRMClient.clsSuiteCRMHelper.SuiteCRMUserSession.SuiteCRMPassword;
        var uid = SuiteCRMClient.clsSuiteCRMHelper.SuiteCRMUserSession.SuiteCRMUsername;

        SuiteCRMClient.clsSuiteCRMHelper.SuiteCRMUserSession.Login();
        //SuiteCRMClient.clsSuiteCRMHelper.SuiteCRMUserSession.LogOut();

        Console.ReadKey();
    }
}

}

When the client tried to read the stream, I found I was getting this text in the stream - you may notice that the actual JSON starts way down the text, and this would also account for the unidentified characters at the beginnng of the stream, when parsing for JSON:

“”
\nWarning: Declaration of SugarWebServiceUtilv4::get_data_list($seed, $order_by = ‘’, $where = ‘’, $row_offset = 0, $limit = -1, $max = -1, $show_deleted = 0, $favorites = false) should be compatible with SugarWebServiceUtilv3_1::get_data_list($seed, $order_by = ‘’, $where = ‘’, $row_offset = 0, $limit = -1, $max = -1, $show_deleted = 0, $favorites = false, $singleSelect = false) in C:\inetpub\wwwroot\SuiteCRM\service\v4\SugarWebServiceUtilv4.php on line 555
\n
\nWarning: Declaration of SugarWebServiceImplv4::get_entries($session, $module_name, $ids, $select_fields, $link_name_to_fields_array) should be compatible with SugarWebServiceImplv3_1::get_entries($session, $module_name, $ids, $select_fields, $link_name_to_fields_array, $track_view = false) in C:\inetpub\wwwroot\SuiteCRM\service\v4\SugarWebServiceImplv4.php on line 49
\n
\nWarning: Cannot modify header information - headers already sent by (output started at C:\inetpub\wwwroot\SuiteCRM\service\v4\SugarWebServiceUtilv4.php:555) in C:\inetpub\wwwroot\SuiteCRM\service\core\REST\SugarRestJSON.php on line 59
\n{“id”:“1d1488c75e1e6e3123d01ce0f08815e5”,“module_name”:“Users”,“name_value_list”:{“user_id”:{“name”:“user_id”,“value”:“5ed94a45-81b7-6039-8468-57475839cb07”},“user_name”:{“name”:“user_name”,“value”:“bjoel”},“user_language”:{“name”:“user_language”,“value”:“en_us”},“user_currency_id”:{“name”:“user_currency_id”,“value”:"-99"},“user_is_admin”:{“name”:“user_is_admin”,“value”:false},“user_default_team_id”:{“name”:“user_default_team_id”,“value”:null},“user_default_dateformat”:{“name”:“user_default_dateformat”,“value”:“m\/d\/Y”},“user_default_timeformat”:{“name”:“user_default_timeformat”,“value”:“h:ia”},“user_number_seperator”:{“name”:“user_number_seperator”,“value”:","},“user_decimal_seperator”:{“name”:“user_decimal_seperator”,“value”:"."},“mobile_max_list_entries”:{“name”:“mobile_max_list_entries”,“value”:null},“mobile_max_subpanel_entries”:{“name”:“mobile_max_subpanel_entries”,“value”:null},“user_currency_name”:{“name”:“user_currency_name”,“value”:“US Dollars”}}}""

So I wrote a method to convert the stream to a bytearray, and look for the “{” character, then passed that index into the stream reader, which effectively drops the warning messages from the front of the stream. I also had to switch to a memory stream, since the plain old stream doesn’t appear to support position…

Like I say, i don’t know of what use this will be to anyone.I don’t yet know what use it will be to me, but maybe brighter minds than mine will be able to identify a plan of attack.

Hi, any progress on this? Or is there an alternative plugin for outlook I could use?

hi all you can add this to these files

ini_set(‘display_errors’, ‘0’);
error_reporting(E_ALL ^ E_STRICT);

http://crm.globe2.net/service/v4_1/SugarWebServiceUtilv4_1.php
http://crm.globe2.net/service/v4/SugarWebServiceUtilv4.php
http://crm.globe2.net/service/v3_1/SugarWebServiceUtilv3_1.php
http://crm.globe2.net/service/v3/SugarWebServiceUtilv3.php

If that doesnt solve it, add it here
http://crm.globe2.net/service/v4_1/rest.php

For some reason adding this to just the index.php file doesnt work.

This stops the reporting of errors on screen and still reports them in the log.

Thanks

I followed these steps, specifically with the /service/v4_1/SugarWebServiceUtilv4_1.php file and the /service/v4_1/SugarWebServiceImplv4_1.php file, and got a “Login Succeed!!!” message. But when I try to archive, I get a “There was an error archiving” error.

Hello everybody!

Just installed SuiteCRM and I really like it.
I installed the Outlook plugin and I’m having the same error when I try to connect, any update on a fix?
I’m using Office 365.

Thank you !

This error should now be fixed in the most recent version of the plugin.