Outlook 2RC will not connect to SuiteCRM

I have SuiteCRM 7.6.4 installed, and the Outlook 2RC plugin installed. Connecting to our SuiteCRM instance on port 8080 (http://server:8080/SuiteCRM). When I try to Test or Save, I get an error dialog:

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

I do not get this if I try to connect to my localhost instance.

Clues and/or solutions would really be appreciated.

Thanks,
Mark Edwards

Additional information from this morning’s log, if it helps:

------------------6/17/2016 08:23:46-----------------
GetMailFolders method General Exception:
Message:Your server administrator has limited the number of items you can open simultaneously. Try closing messages you have opened or removing attachments and images from unsent messages you are composing.
Source:Microsoft Outlook
StackTrace: at Microsoft.Office.Interop.Outlook._Folders.get_Count()
at SuiteCRMAddIn.frmSettings.GetMailFolders(Folder objInpFolder, TreeNode objInpNode)
Data:System.Collections.ListDictionaryInternal
HResult:-2147220731

------------------6/17/2016 08:24:05-----------------
GetResponse method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088
Inputs:
Method:login
Data:{ user_auth = { user_name = bjoel, password = 938C2CC0DCC05F2B68C4287040CFCF71 } }

------------------6/17/2016 08:24:05-----------------
clsUsersession.Login method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
at SuiteCRMClient.clsUsersession.Login()
HResult:-2146233088

------------------6/17/2016 08:24:07-----------------
TestLoginClick method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsUsersession.Login()
at SuiteCRMAddIn.frmSettings.btnTestLogin_Click(Object sender, EventArgs e)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088

------------------6/17/2016 08:24:09-----------------
GetResponse method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088
Inputs:
Method:login
Data:{ user_auth = { user_name = bjoel, password = 938C2CC0DCC05F2B68C4287040CFCF71 } }

------------------6/17/2016 08:24:09-----------------
clsUsersession.Login method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
at SuiteCRMClient.clsUsersession.Login()
HResult:-2146233088

------------------6/17/2016 08:24:11-----------------
TestLoginClick method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsUsersession.Login()
at SuiteCRMAddIn.frmSettings.btnTestLogin_Click(Object sender, EventArgs e)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088

------------------6/17/2016 08:24:13-----------------
GetResponse method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088
Inputs:
Method:login
Data:{ user_auth = { user_name = bjoel, password = 938C2CC0DCC05F2B68C4287040CFCF71 } }

------------------6/17/2016 08:24:13-----------------
clsUsersession.Login method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsGlobals.GetResponse[T](String strMethod, Object objInput, Byte[] strFileContent)
at SuiteCRMClient.clsUsersession.Login()
HResult:-2146233088

------------------6/17/2016 08:24:15-----------------
SaveClick method General Exception:
Message:Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.
Source:Newtonsoft.Json
StackTrace: at SuiteCRMClient.clsUsersession.Login()
at SuiteCRMAddIn.frmSettings.btnSave_Click(Object sender, EventArgs e)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088

I know this is an old post, but I was experiencing this same issue and was able to resolve it with some Wireshark magic. B)

The page that the plugin is trying to connect to is here: public_html/suitecrm/service/v4_1/rest.php

If you visit that in a browser, my guess is that you will see some php errors at the top. These are what is causing the error. You need to turn off php error reporting. That may vary based on your hosting, but what I did was add an .htaccess file to the folder: public_html/suitecrm/service/v4_1/ with the following contents:

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0

Check the rest.php file from your browser again to confirm the errors are gone. If so, you should have no problem connecting!

1 Like

Thanks xtego…

Your solution didn’t work for me because the server didn’t know how to deal with ‘php_flag’ (Got a Server 500 Error). I was able to copy in my php.ini file from public_html, and then it worked.

The confusing thing is, you would’ve expected the php.ini, where we’ve already turned off display_errors to have propagated down to this folder. I’m very confused why it didn’t.

sieberta

Better solution, make your php.ini file recursive within the directory. On my host it looks like this:

Put these two lines in your .htaccess file within public_html (or SuiteCRM deployed directory)

# Make php.ini recursive
suPHP_ConfigPath /home/username/public_html

Replace /home/username/public_html to the location of your php.ini file.

Then you don’t need xtego’s solution or my duplicate php.ini file solution.

sieberta