External Storage: Google Drive - Cannot add more than one

Steps to reproduce

  1. Enable external storage in admin settings.
  2. Add second (i have one configured and working) google drive external storage and supply client ID and Client secret.
  3. Click Grant Access.

Expected behaviour

Grant access button should redirect the page to google for app approval.

Actual behaviour

Grant access button turns gray (disabled) and shows red box status for the external storage.

Server configuration

Operating system: Centos 7.5

Web server: Apache/2.4.6 (CentOS)

Database: mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64)

PHP version: PHP 7.2.11

ownCloud version:

Updated from an older ownCloud or fresh install: Fresh Install

Where did you install ownCloud from: zip

Are you using external storage, if yes which one: SMB/Google Drive

Are you using encryption: No

Are you using an external user-backend, if yes which one: LDAP

Client configuration

Browser: Chrome Version 69.0.3497.100 (Official Build) (64-bit) / Firefox 62.0.3 (64-bit)

Operating system: Windows 10 Pro - Version 1803

Double check if your Google user has access to that Google drive. You might be trying to access to a drive, but Google might be rejecting the access to your user.
If this is not the problem, check and include some relevant logs

Already checked for user permissions. also tried removing the first google drive and adding the second with success. it just won’t let me add both google drive. while adding the second google drive with the first successfully configured i got this error from dev console.

could you check the what is being sent in that request? maybe ownCloud is sending some wrong data.