alextselegidis / easyappointments

:date: Easy!Appointments - Self Hosted Appointment Scheduler
https://easyappointments.org
GNU General Public License v3.0
3.26k stars 1.25k forks source link

Error AJAX Error: SyntaxError: Unexpected token < in JSON at position 0 #416

Closed Andre32 closed 6 years ago

Andre32 commented 6 years ago

`ERROR - 2018-01-25 20:02:08 --> #0 /forum/application/libraries/external/google-api-php-client/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array)

1 /forum/application/libraries/external/google-api-php-client/Google_Client.php(315): Google_OAuth2->refreshToken('1/IG7YZaiiM-Cja...')

2 /forum/application/libraries/Google_sync.php(116): Google_Client->refreshToken('1/IG7YZaiiM-Cja...')

3 /forum/application/controllers/Appointments.php(406): Google_Sync->refresh_token('1/IG7YZaiiM-Cja...')

4 /forum/system/core/CodeIgniter.php(532): Appointments->ajax_register_appointment()

5 /forum/index.php(353): require_once('/home/...')

6 {main}

ERROR - 2018-01-25 20:03:18 --> Severity: Warning --> Invalid argument supplied for foreach() /forum/application/controllers/Appointments.php 645 ERROR - 2018-01-25 20:03:19 --> Error refreshing the OAuth2 token, message: '{ "error" : "invalid_request", "error_description" : "Could not determine client ID from request." }' ERROR - 2018-01-25 20:03:19 --> #0 /forum/application/libraries/external/google-api-php-client/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array)

1 /forum/application/libraries/external/google-api-php-client/Google_Client.php(315): Google_OAuth2->refreshToken('1/IG7YZaiiM-Cja...')

2 /forum/application/libraries/Google_sync.php(116): Google_Client->refreshToken('1/IG7YZaiiM-Cja...')

3 /forum/application/controllers/Appointments.php(406): Google_Sync->refresh_token('1/IG7YZaiiM-Cja...')

4 /forum/system/core/CodeIgniter.php(532): Appointments->ajax_register_appointment()

5 /forum/index.php(353): require_once('/home/...')

6 {main}

ERROR - 2018-01-25 20:03:26 --> Severity: Warning --> mysqli::query(): MySQL server has gone away /forum/system/database/drivers/mysqli/mysqli_driver.php 305 ERROR - 2018-01-25 20:03:26 --> Severity: Warning --> mysqli::query(): Error reading result set's header /forum/system/database/drivers/mysqli/mysqli_driver.php 305 ERROR - 2018-01-25 20:03:26 --> Query error: MySQL server has gone away - Invalid query: SELECT * FROM ea_user_settings WHERE id_users = '2' `

Andre32 commented 6 years ago

help pls

navinisaac commented 6 years ago

What release are you using? This bug appears to be fixed in the 1.3.0 beta release. http://easyappointments.org/blog/2018/01/02/Changelog-of-EasyAppointments-v1-3-0/

Andre32 commented 6 years ago

for this error? `ERROR - 2018-01-27 11:07:18 --> Error refreshing the OAuth2 token, message: '{ "error" : "invalid_request", "error_description" : "Missing required parameter: refresh_token" }' ERROR - 2018-01-27 11:07:18 --> #0 /ver/application/libraries/external/google-api-php-client/auth/Google_OAuth2.php(239): Google_OAuth2->refreshTokenRequest(Array)

1 /ver/application/libraries/external/google-api-php-client/Google_Client.php(315): Google_OAuth2->refreshToken(NULL)

2 /ver/application/libraries/Google_sync.php(118): Google_Client->refreshToken(NULL)

3 /ver/application/controllers/Appointments.php(491): Google_Sync->refresh_token(NULL)

4 /ver/system/core/CodeIgniter.php(532): Appointments->ajax_register_appointment()

5 /ver/index.php(353): require_once('/home/...')

6 {main}

`

Andre32 commented 6 years ago

@alextselegidis

alextselegidis commented 6 years ago

This error seems to be server issue:

mysqli::query(): MySQL server has gone away

For the following one I would try to disable and re-enable the Google Sync feature for my providers as it appears that their refresh tokens are not valid any more.

Error refreshing the OAuth2 token, message: '{ "error" : "invalid_request", "error_description" : "Missing required parameter: refresh_token" }' ERROR - 2018-01-27 11:07:18 --> #0 /ver/application/libraries/external/google-api-php-client/auth/Google_OAuth2.php(239)

Also updating to the latest beta release might also help.

  Alex Tselegidis, Easy!Appointments Creator
  Need a customization? Contact me in person!