Google Calendar Sync Not Working - Advanced Pack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • showard
    Member
    • Feb 2018
    • 46

    Google Calendar Sync Not Working - Advanced Pack

    I am running EspoCRM 5.0.5, with the advanced pack 1.30.7, and cannot get the google calendar sync to work. All appears to be installed correctly with OAuth2.0 id, secret, etc. set up. But when I try to connect an individual user to their google account, EspoCRM goes through the setup steps with google in a popup window, google confirms that I want to allow access, EspoCRM goes to the "EspoCRM rocks" page, but then it gets hung up on a "Please Wait" message, and the red "connect" button never switches to the green "connected" button.

    I am running on Firefox, and opened the console which shows the following errors:

    -- SecurityError: Permission denied to access property "href" on cross-origin object espo.min.js:277

    -- unreachable code after return statement [Learn More] espo.min.js:206:12

    When running in Chrome, the console shows the following errors:

    VM5783:277 Uncaught DOMException: Blocked a frame with origin "https://www.MY_DOMAIN.com" from accessing a cross-origin frame.
    at eval (eval at _execute (https://www.MY_DOMAIN.com/espocrm/cl...30574:17:10740), <anonymous>:277:55)
    (anonymous) @ VM5783:277
    setInterval (async)
    popup @ VM5783:273
    connect @ VM5783:289
    click [data-action="connect"] @ VM5783:38
    dispatch @ espo.min.js?r=1519930574:3
    r.handle @ espo.min.js?r=1519930574:3
    espo.min.js?r=1519930574:4 GET https://www.MY_DOMAIN.com/espocrm/ap...n/notReadCount net::ERR_TIMED_OUT


    Any help or insights would be appreciated.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello,
    please check, if Redirect Url in EspoCRM > Integrations > Google is the same as Authorized redirect URI in Google Console Credentials.
    Tips from Google - " Must have a protocol. Cannot contain URL fragments or relative paths. Cannot be a public IP address."
    In a browser you have to use the same domain as well

    Comment

    • showard
      Member
      • Feb 2018
      • 46

      #3
      I double checked the redirect URL in both the EspoCRM integrations and in the Google Console. The following is what is entered (with "mydomain" substituted). I cut-and-pasted to be sure I wasn't making any typos.

      https://mydomain.com/espocrm?entryPoint=oauthCallback (redirect URL in EspoCRM)
      https://mydomain.com/espocrm?entryPoint=oauthCallback (redirect URL in Google Console)

      Entering that URL directly into a browser pulls up the "EspoCRM Rocks" page.

      When trying to connect to Google in the user "external accounts" page, EspoCRM opens a new window with the Google accounts page, lets me select an account, and goes through all the steps leading up to the "EspoCRM Rocks" page, with the redirect URL having the addition of "&code=" followed by a long string of numbers and letters.

      By the way, I am really liking EspoCRM, and the advanced pack too. Overall a 5-star product . . . assuming I can get the calendar sync working.

      Comment

      • showard
        Member
        • Feb 2018
        • 46

        #4
        Feeling a bit slow here . . . but there was an easy fix. The online instructions I found on espocrm.com are great as far as setting up the Google API, and pretty good on setting things up in EspoCRM. There was one step that I don't see included in the instructions. In addition to clicking "enabled" when you go to the google external account setup for the individual user, you also have to take note of the access settings for that user's "role" and adjust those accordingly.

        Specifically, if you set a user role up before you add on the advanced pack, the role settings will included enable/disable the calendar. But it will not include any settings for google sync. Once you add the advanced pack, it adds in two different enable/disable choices relating to google, and also other choices relating to the advanced pack (MailChimp, etc.) If you had set up the user role access permissions before installing the advanced pack, don't forget to go in and enable the google features. Even if the google is enabled in the external account section for the user, it also has to be enabled for that user's assigned role.

        I really like EspoCRM. I love the flexibility and the different ways fields, entities, etc. can be modified, added, rearranged, etc. so that the system can be customized to suit an organization's specific needs. I'd give 5 stars for the system, and maybe 4.8 stars for the setup instructions.

        Comment

        Working...