Jump to content


Photo

Google Integration: Error 500 when adding OAuth 2.0 Credentials

google integration error500

  • Please log in to reply
6 replies to this topic

#1 solar345

solar345

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 05 May 2019 - 06:24 AM

Hi, 

 

I am getting the following error when adding the OAuth 2.0 Credentials.

Error Code: 500
Error Message: openssl_encrypt(): IV passed is 32 bytes long which is longer than the 16 expected by selected cipher, truncating
Stack Trace: [click to toggle display]

PHP warning in /var/www/x2/protected/components/util/EncryptUtil.php(159)
#0 /var/www/x2/protected/components/util/EncryptUtil.php(159): openssl_encrypt()
#1 /var/www/x2/protected/components/behaviors/JSONEmbeddedModelFieldsBehavior.php(242): EncryptUtil->encrypt()
#2 /var/www/x2/protected/components/behaviors/TransformedFieldStorageBehavior.php(96): JSONEmbeddedModelFieldsBehavior->packAttribute()
#3 /var/www/x2/protected/components/behaviors/TransformedFieldStorageBehavior.php(112): JSONEmbeddedModelFieldsBehavior->packAll()
#4 /var/www/x2/protected/components/behaviors/JSONEmbeddedModelFieldsBehavior.php(209): JSONEmbeddedModelFieldsBehavior->beforeSave()
#5 /var/www/x2/framework/base/CComponent.php(561): JSONEmbeddedModelFieldsBehavior->beforeSave()
#6 /var/www/x2/framework/db/ar/CActiveRecord.php(846): Credentials->raiseEvent()
#7 /var/www/x2/framework/db/ar/CActiveRecord.php(948): Credentials->onBeforeSave()
#8 /var/www/x2/framework/db/ar/CActiveRecord.php(1077): Credentials->beforeSave()
#9 /var/www/x2/framework/db/ar/CActiveRecord.php(811): Credentials->insert()
#10 /var/www/x2/protected/controllers/ProfileController.php(671): Credentials->save()
#11 unknown(0): ProfileController->actionCreateUpdateCredentials()
#12 /var/www/x2/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()
#13 /var/www/x2/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()
#14 /var/www/x2/framework/web/CController.php(308): CInlineAction->runWithParams()
#15 /var/www/x2/framework/web/filters/CFilterChain.php(134): ProfileController->runAction()
#16 /var/www/x2/protected/controllers/x2base.php(581): CFilterChain->run()
#17 /var/www/x2/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#18 /var/www/x2/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#19 /var/www/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#20 /var/www/x2/framework/web/CController.php(1148): CAccessControlFilter->filter()
#21 /var/www/x2/framework/web/filters/CInlineFilter.php(58): ProfileController->filterAccessControl()
#22 /var/www/x2/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#23 /var/www/x2/protected/controllers/x2base.php(581): CFilterChain->run()
#24 /var/www/x2/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()
#25 /var/www/x2/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()
#26 /var/www/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#27 /var/www/x2/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()
#28 /var/www/x2/framework/web/filters/CFilter.php(40): CFilterChain->run()
#29 /var/www/x2/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()
#30 /var/www/x2/framework/web/CController.php(291): CFilterChain->run()
#31 /var/www/x2/framework/web/CController.php(265): ProfileController->runActionWithFilters()
#32 /var/www/x2/framework/web/CWebApplication.php(282): ProfileController->run()
#33 /var/www/x2/protected/components/X2WebApplication.php(65): X2WebApplication->runController()
#34 /var/www/x2/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#35 /var/www/x2/index.php(67): X2WebApplication->run()

X2Engine Version: 7.1
PHP Version: 7.0.33-0ubuntu0.16.04.4

 

 

https://imgur.com/MzK5ss8

 

Any idea how I can get past this and get Google integration working?

 

Attached Files



#2 solar345

solar345

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 05 May 2019 - 06:29 AM

This is solved with the solution mentioned here:

http://community.x2c...ting-to-71-fix/



#3 solar345

solar345

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 05 May 2019 - 06:57 AM

But now I don't see the button below: 
Click the button below to log into X2Engine CRM with your Google ID.            
https://imgur.com/KdfubfO



#4 Justin

Justin

    x2force

  • Moderators
  • 28 posts

Posted 07 May 2019 - 02:36 PM

Hi solar345! (edited)

 

I have deleted your other post about this due to it being redundant (sorry)! I thought it would be best to reply here instead of replying the same comment to two different threads! 

 

Is this for the calendar integration or for the single sign on?

 

I have identified the issue! Thank you for bringing our attention to this! We will get a fix asap and hopefully we can get it to everyone on our 7.2 release!

 

Sincerely,

Justin



#5 solar345

solar345

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 08 May 2019 - 10:11 PM

Great :) Look forward to the fix.

PS: I have a team that can contribute, if you could direct to what is exactly causing the bug we can write a patch. 



#6 Justin

Justin

    x2force

  • Moderators
  • 28 posts

Posted 13 May 2019 - 08:35 AM

Hi Solar345! 

 

Yes! I will respond with an update as soon as we find the cause of the bug! 

 

Sincerely,

Justin



#7 Justin

Justin

    x2force

  • Moderators
  • 28 posts

Posted 14 May 2019 - 01:17 PM

Hi Solar345!

 

Update on the issue! 

 

Seems like there is no bug for this! If you look in the console you will see a 404 error(because of reasons below).

This will automatically send google a request to log into your account.

*Granted there should be still an error message or some sort of message that indicates this

so we will be looking to refactor the code to make it look better!!!

 

But here are some reasons the button is not showing up for you, or the page isn't loading to the correct page.

1. You haven't logged into the gmail in your browser. (do this and try again to see if it works)

2. Your clientId or clientSecret is wrong. (please check to see if it is working)

* One way to check is to link your google calendar and see if you can link it to a google calendar without an error.

 

Solar345! I will update you on a fix to make this feature better for users! 

But hopefully this clarifies things with the google integration! 







Also tagged with one or more of these keywords: google, integration, error500

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users