Announcement

Collapse
No announcement yet.

Cannot Connect to Google

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

  • Cannot Connect to Google

    We've setup the "Integration" for Google and the "Scheduled Job" is up and running (no errors in either Espo or the log file).

    However, adding and connecting the "External Account" from Google wouldn't work, we receive an error 400 "invalid_scope" in the oauth screen.

    Note that your setup guide https://www.espocrm.com/features/google-calendar-sync/ no longer reflects what the Google Developer Console really looks like - check out the attached screenshots.

    Please help.

  • #2
    Hello
    Through that “Learn More” link, it explains that Google is verifying and authorizing API developers in order to protect users. But Google also explains that there are certain cases where this verification and authorization is not necessary. And for that they have the risky apps group.

    https://groups.google.com/forum/#!fo...nreviewed-apps

    Comment


    • #3
      I was working on this last week as well. I didn't have time to go through the developer authentication so I thought I'd revisit it later. With this tip, I figured I'd try it again and I'm on the setup sync for users step now. In the user profile>external accounts > Google, I click on connect and it brings up a pop-up window that allows me to select my google account. Then it wants me to give permission so I allow it. The popup says "EspoCRM Rocks" and is blank and the CRM has a "Please Wait" bar. It seems to get stuck at that spot. Is there something else I should try?

      Comment


      • tanya
        tanya commented
        Editing a comment
        Could you open a browser console and check for errors?

    • #4
      This is the error that is coming up in the developer console. It's generating the same error over and over.

      VM876:275 Uncaught DOMException: Blocked a frame with origin "https://crm.domain.com" from accessing a cross-origin frame. at eval (eval at _execute (https://crm.domain.com/client/espo.m...57203:16:26553), <anonymous>:275:54)

      Comment


      • tanya
        tanya commented
        Editing a comment
        this error shows while popup is open.
        it is interesting, what happens, when you click Allow button

    • #5
      After I click the Allow button the popup goes blank except for the text: EspoCRM Rocks !!!

      Comment


      • tanya
        tanya commented
        Editing a comment
        After the text: EspoCRM Rocks !!!, popup has to be closed and the status on the main window goes to connected. Is not it?

    • #6
      It doesn't connect and the "Please wait..." bar is still on the main screen. I've waited to see if anything happens, but eventually, after quite some time I just left the screen or refreshed the page.

      Comment


      • tanya
        tanya commented
        Editing a comment
        Any records related to the integartion in espocrm log (data/logs)? did you check browser console in the main tab?

    • #7
      Espo log has no errors. The "VM876:275 Uncaught DOMException" error that shows up is in the main console and acts like it is in a loop while I have the popup open. It will keep producing the same error and makes the error counter go up until the popup is closed.

      The popup window console view does not show any errors.

      When I click on the error in the main console it points to this line 275 in the popup: function (options, callback).

      popup = window.open(path, options.windowName, options.windowOptions);
      interval = window.setInterval(function () {
      if (popup.closed) {
      window.clearInterval(interval);
      } else {
      ***** var res = parseUrl(popup.location.href.toString()); *******
      if (res) {
      callback.call(self, res);
      popup.close();
      window.clearInterval(interval);
      }
      }
      }, 500);



      (I'm on most current version of Espo and Advance Pack)
      Last edited by joy11; 07-13-2017, 08:25 PM.

      Comment


      • tanya
        tanya commented
        Editing a comment
        No errors in espocrm, no errors in javascript.... hard to imagine the reason. Check in browser console Network tab. Which request is loading? Has any response or just hanging? Check also apache error log (if you use apache server)

    • #8
      After looking into it a bit more we noticed that in the integrations section the Redirect URI was set to Http and we're using Https. In the $ESPO_PATH/data/config.php we updated 'siteUrl' to https instead of http. That seemed to fix the issue and we're connected now! Thanks for your help troubleshooting, Tanya.

      Comment

      Working...
      X