Announcement

Collapse
No announcement yet.

Unable to convert Leads, keep getting 'Bad Server Response' error when i Convert

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to convert Leads, keep getting 'Bad Server Response' error when i Convert

    Hey guys,

    I've recently moved my old Espo install to a new domain. I installed the latest version of Espo and then important my database from my old Espo install.
    At first i had a few database glitches which i had fixed by my database wiz. Everything seemed to work, but i kept on getting '500 Error' when trying to update Admin parameters.
    I read on the forum that using the 'Rebuild' function would help eliminating the 500 Error. I ran the function and it fixed the issue.
    So, i was pretty excited to have everything working.

    Yesterday, i tried converting a Lead into an Opportunity and i am unable to. It seems that if i try to convert the lead into anything at all it just throws a 'Bad Server Response' error on screen and does not allow me to proceed with the conversion.

    I've checked the log and had my database wiz take a peak to see if this is a database issue, but he waived his hands this morning at me suggesting that this appears to be a coding issue.
    Here's a copy of the log from the Espo/Data folder:

    [2020-07-14 14:13:49] Espo.ERROR: Uncaught Exception TypeError: "Argument 2 passed to Espo\Modules\Crm\Services\Lead::convert() must be an instance of Espo\Modules\Crm\Services\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50" at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php line 186 {"exception":"[object] (TypeError(code: 0): Argument 2 passed to Espo\\Modules\\Crm\\Services\\Lead::convert() must be an instance of Espo\\Modules\\Crm\\Services\\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50 at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php:186)"}

    I'm guessing this may have been broken during the 'Rebuild' function because the Convert option work fine prior to that.
    I've attached a screenshot of what it looks like when the error pops up.
    I am in need of help resolving this guys.

  • #2
    Hi,
    probably it is not linked to a Rebuild issue. Activate please the DEBUG mode as it described here https://docs.espocrm.com/administrat...e-for-a-logger. Then, try to make this:
    Test 1. Administration -> Clear Cache -> try to convert
    Test 2. Open an incognito browser window and try to make conversion there.
    Investigate a log file for possible an additional error description.

    Comment


    • #3
      Thanks Maximus, i did as instructed.

      Here's what the latest log file reads:

      [2020-07-18 16:32:44] Espo.ERROR: Uncaught Exception TypeError: "Argument 2 passed to Espo\Modules\Crm\Services\Lead::convert() must be an instance of Espo\Modules\Crm\Services\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50" at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php line 186 {"exception":"[object] (TypeError(code: 0): Argument 2 passed to Espo\\Modules\\Crm\\Services\\Lead::convert() must be an instance of Espo\\Modules\\Crm\\Services\\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50 at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php:186)"} []

      [2020-07-18 16:33:59] Espo.ERROR: Uncaught Exception TypeError: "Argument 2 passed to Espo\Modules\Crm\Services\Lead::convert() must be an instance of Espo\Modules\Crm\Services\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50" at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php line 186 {"exception":"[object] (TypeError(code: 0): Argument 2 passed to Espo\\Modules\\Crm\\Services\\Lead::convert() must be an instance of Espo\\Modules\\Crm\\Services\\object, instance of stdClass given, called in /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Controllers/Lead.php on line 50 at /home1/pocketbrokerage/public_html/application/Espo/Modules/Crm/Services/Lead.php:186)"} []

      Any help is much appreciated!

      Comment


      • #4
        hat about trying to reproduce it in the Incognito browser mode?

        What EspoCRM version do you use?
        What a web server PHP version do you use (you can check it ii Administration -> System Requirements)?

        Comment


        • #5
          1. When reproducing the issue in Incognito browser mode, the result is identical.
          2. I have recently upgraded from 5.0.1 to 5.9.3 (was not an issue before the upgrade)
          3. Current PHP version as per System Requirements Page is 7.1.24

          Comment


          • #6
            Hello,
            your php version is out of date !
            i use php 7.4 with no issue... so upgrade your php version to 7.4

            https://docs.espocrm.com/administrat...configuration/

            Comment


            • #7
              item I just did that (upgraded to PHP 7.4) and now i am getting 'Bad Server Response' error no matter which page i load. I didn't expect it to break everything. I wish i knew this would crash the system before i did it. I'm afraid this is going to set me quite far back work-wise if I can't get it up and running again shortly.

              Any ideas how to fix it?

              Comment


              • #8
                I had an Espo Calendar tab open and if i try to refresh it, it gives me the following error:

                Error 500: PHP's json extension is required to use Monolog's NormalizerFormatter

                Comment


                • #9
                  Inside cPanel, I am able to change the PHP version to an earlier version of 7.0, 7.1, 7.2 or 7.3. Would rolling the PHP version back to an earlier one break anything further? Or should i give it a try in an effort to get things to work in the interim?

                  Comment


                  • #10
                    I tried changing the PHP version to:

                    7.0 - throws a syntax coding error that reads -
                    Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home1/pocketbrokerage/public_html/application/Espo/Core/Container.php on line 113

                    7.1 - bad server error

                    7.2 - bad server error

                    7.3 - bad server error

                    7.4 - bad server error

                    The only way i can get the site to load up is if i use the 'inherited' version of PHP 5.4 (as selected in the attached screencap).
                    What am i doing wrong over here?

                    Comment


                    • #11
                      Personally I use PHP 7.3 because 7.4 killed my Wordpress website previous (plugin incompatibility).

                      Have you enable this "json extension" in your PHP yet?

                      Also, can you try to install a latest version of EspoCRM and check if all requirement is "green", there might be some "red" criteria that you haven't fulfill yet.

                      And I see you made one wrong approached here: "I installed the latest version of Espo and then important my database from my old Espo install."

                      Is your old server EspoCRM the same version as new Espo? if it different version you shouldn't be importing database like that.
                      You either want to Update old server then backup.
                      OR you want to Backup old server, install same version on newer server then import database then update.

                      Comment


                      • #12
                        When I reach a point, like it seems to me that you are, when trying to "fix" something just creates more problems, and I am spending way too much time on it, I prefer to "go nuclear" aka make a new installation and destroy the old one.

                        Here's information on how I have done it, in case you want to consider the solution. https://forum.espocrm.com/forum/inst...1187#post61187

                        By the way esforim suggestion to check that a fresh installation in your remote (online) server checks everything "green" is excellent, so after you have removed the current instance you can do that and make sure that there are no server side issues.

                        However do not make a fresh installation (as opposed to "upgrade") before you read the posting because it will generate a new config.php file that will specify a new password key and thus you will not be able to uncrypt anything in the old database.

                        Comment


                        • #13
                          Hello telecastg

                          it's really easy to find "error" in espoCrm... i know sugarcrm and suitecrm .. this is hard find error.
                          in espocrm, you need all requirement (php/mysql/maria/nginx/apache) up-to-date.. and good configured (just see doc)
                          the only one issue i encoured is : vendor/library .. because i use some library and i have not skill with composer.. so i just copy/past the library.
                          EspoCRM is very well documented, and error is very well reported .. so you can with a little knowledge resolve the issue..
                          In my experiment, all issue is "error from us".. bad version, bad config ... never a this moment i have find a "espocrm issue".

                          espocrm say : i have a issue with php 7.4 for wordpress... for me it's wordpress issue... espocrm is up-to-date .. i have no issue with last 7.4.x
                          Of course, this give a new way of discussion : CRM with crutial data and WordPress in same VPS ... i say no directly ! EspoCRM on one VPS .. and another VPS for the rest

                          This guy must read document on github, configure all apache/nginx/maria/mysql as Yuri say... and give us log.. so we can help

                          Best regards
                          Last edited by item; 08-05-2020, 09:33 PM.

                          Comment


                          • esforim
                            esforim commented
                            Editing a comment
                            You pinged the wrong person Item, but don't worry, I still can check most forum post since the community is relatively small and post is infrequent.

                            That issue was with an older version of Wordpress (before that big patch July/August update of Wordpress), and I don't feel like risky it with PHP 7.4 until there is a reason to or necessity for me to change. Since our website is quite static and we don't tend to check it often enough (and Jetpack can be unreliable at time since I'm quite ignorant with the plugin)

                            And you giving me too much credit, we don't even use VPS, our server is on a shared hosting plan. Maybe in a year or two (or more!) when I update my Server skill and Knowledge then we might considered self-managing server by acquiring a VPS.

                            I suppose the weakness with CRM and Website on same server would be a security issue and a risk of server crash wiping out data issue but that is a topic for another thread. Our email on same server too.

                            It good that people is willing "put up" with it a give EspoCRM a try, but a bad experience from the get-go will just turn away new user. One thing I like about Yetiforce (my previous system) is some of the installation or module is optional. This would lessen installation problem for those that don't use "advanced" or "additional" feature. It also lower the server requirement too.

                            My approach is: get something working basic first, once that happen, consider advance function (just let hope that it is possible to do).
                            Last edited by esforim; 08-06-2020, 05:12 AM.

                          • item
                            item commented
                            Editing a comment
                            telecastg,
                            Yes i agree .. new fresh install .. copy custom folder.. rebuild import data.
                            Basicly with my experiment of espocrm (3 years now) .. 2 big espocrm on different VPS and 3 other espocrm for other not important.

                            My first goal was always build a VPS for espoCRM.. when VPS is ready -> then i install espoCRM. so i am ready for all update/upgrade.

                            Best Regards

                            espocrm : yes of course you have understand what i will try to explain with my english.. of course money is a "problem". I work on healtcare, so all data is very "confidential".. i can't take risk with a website or another running on that vps.

                            Best Regards

                            What i can say with my experiment, espoCRM is the best CRM i have never see and working with (on all side : code, user, role, front-end, back-end, advanced pack, outlook-integration, voip, .. )..
                            And telecastg have make more hapy ours users with just some line of code for move stream to side panel .. this crm is crazy

                            Thanks to espoCRM teams.

                          • esforim
                            esforim commented
                            Editing a comment
                            Glad to hear it. Totally understandable, sensitive is quite importantly depending on the industry.

                            To be honest I'm still having trouble convincing the usage of EspoCRM to old school staff, most of the time I'm just using it by myself to improve a personal workflow level rather than organization level.

                            Also
                            this not me --> espocrm =/= esforim <-- this me.

                        • #14
                          Hi thepocketbroker,
                          If you are using the latest EspoCRM version please make sure that your system requirements are OK https://docs.espocrm.com/administrat...configuration/.
                          Note that the latest EspoCRM version needs PHP v.7.2 or later.

                          > Error 500: PHP's json extension is required to use Monolog's NormalizerFormatter

                          Here is clearly says that your PHP doesn't have the json extension (read these requirements https://docs.espocrm.com/administrat...s-requirements). In CPanel you can select PHP v.7.3., then open EspoCRM -> Administration -> System Requirements -> Check Settings for failed parameters. To fix failed PHP extensions you need to contact your server customer support and ask them to install the extension.

                          Comment


                          • #15
                            Thanks for the attention gentlemen.
                            I just checked the System Requirements page in the Admin panel and it gives me the following as ''Failed":
                            PHP Version 7.1.24 Fail
                            MySQL Version 5.6.41-84.1 Fail
                            Will contact my server customer support and ask to install Monolog's NormalizerFormatter and will come back to you with my findings.

                            Comment


                            • esforim
                              esforim commented
                              Editing a comment
                              If you on shared hosting they won't upgrade the PHP version for you, not unless it is already available and they might instruct you on how to update it.

                              Same with MySQL, except it is shared throughout the server so you won't be able to "Select" a version.

                              If you on VPS or some other more fancy server, no issue here in term of updating.
                          Working...
                          X