Closed Upperholme closed 1 year ago
@Upperholme Yes the logic for the status message isn't quite right I think - it seems to throw up too many false positives.
Currently running Civi 5.60.0 and CiviXero 2.1.2 - and the authorization appears to be regularly expiring where i would expect it to keep itself up to date. I'm manually re-authorizing multiple times per day, but this clearly is not ideal and not sustainable. If there's something I need to have done to resolve this then I'm all ears.
Still struggling with authorisation expiry.
I've now updated a second site (Wordpress) to the 2.1.2 CiviXero release and it looks to be having the same problems as my other site, which is D7. Both sites are on a server running PHP 7.3 (don't know if that is a possible cause).
On both sites I see the same behaviour: CiviXero very regularly reports that the authorisation has expired. I've not done any tests on this but it is my assumption that it is not renewing the authorisation once I have set it via https://mydomain.com/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fxero%2Fauthorize or in the case of the D7 site https://myotherdoamin.com/civicrm/xero/authorize
I'm also seeing a weird issue which I assume is linked whereby on many occasions when I click on the link to reauthorise I get a fatal error.
On the Wordpress sites this looks like:
PHP Fatal error: Uncaught TypeError: Return value of CRM_Civixero_OAuth2_TokenStoreDefault::getConnectorID() must be of the type int, null returned in /home/vcare/sites/default/wp-content/uploads/civicrm/ext/nz.co.fuzion.civixero/CRM/Civixero/OAuth2/TokenStoreDefault.php:34\nStack trace:\n
Looking in my database I can see in the civicrm_setting table that the value for xero_access_token is NULL. ~
I'm not too sure about the expiring but I found a reason for the 'PHP Fatal error: Uncaught TypeError:' you report & tagged 2.1.3 with a fix for that error
I was able to update to 2.1.3 - many thanks for making that available - at the weekend, and it appears to have resolved the problem I was facing where it was not automatically reneweing the access token. Which is fabulous!
woohoo - I think I can close this then!
Every morning when I log in to my site (D7) with the up to date versions of this extension and the account sync extension installed, I'm presented with the warning that the CiviXero authorisation has expired and that I need to renew it. I go to the page on my site - /civicrm/xero/authorize?connector_id=0 and it reports that everything is fine. Which is correct?