GoogleDrive connection is not working on some recent mobile

Hi,

The connection to Google Drive does not work on certain mobile phones.

I get the 'Connection successful' page on the callback uri 127.0.0.1/8889. When I close the window, nothing happens

.With the provided example CloudStorageServiceDemo compiled in FMX for Android 64 bits, the application does not display the cloud files once connected on a Samsung S24+, while it works on an old Samsung S10.

Other issue with OneDrive. If the URI is http://localhost or localhost:8000, I get "age localhhost is not responding". If I set 8887 port or other, it's OK

DropBox connection is OK

I bought the FNC components hoping to have a better experience than with the legacy TMS FMX Cloud components (Recurring issues with serverlocal not responding for 30% of my clients already explained here a few years ago without any response provide from the support)., and I am very disappointed.

For now, it is unusable as it is.

Hi Support

Can I have an answer please ?

It's unclear exactly why some ports work an other ports don't, most likely port 8000 is already being used. Also you might want to switch to HTTPS instead. You can also turn on logging with

TMSFNCCloudStorageServices1.Storage.Logging := True;
TMSFNCCloudStorageServices1.Storage.LogFileName := 'Path To Log File';

Make sure the path to the log file (txt) is writable.

Hi,

I changed the Google URI and the port with no effect.

I activated the logging mode :

1/ On a Galaxy S10+, when I close the screen that indicates that the connection is successful, I get a black screen and it crashes the entire phone. I have to restart.
The log seems to be ok but the connection freeze the mobile and is not successful

The log is (id and secret are manually masked by XXX, YYY and ZZZ) :

0250605T224128: Executing request [TEST TOKENS] with url: [https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=]
20250605T224128: Result from request [TEST TOKENS] is {
  "error": "invalid_token",
  "error_description": "Either access_token, id_token, or token_handle required"
}

20250605T224128: Result from request [TEST TOKENS] is {
  "error": "invalid_token",
  "error_description": "Either access_token, id_token, or token_handle required"
}

20250605T224144: Executing request [RETRIEVE ACCESS TOKEN] with url: [https://accounts.google.com/o/oauth2/token?client_id=XXXXX&client_secret=YYYYY&redirect_uri=http://127.0.0.1:8888&code=ZZZZZ&grant_type=authorization_code]
20250605T224144: Result from request [RETRIEVE ACCESS TOKEN] is {
  "access_token": "ya29.a0AW4XtxiFF87ZdRk1jQPDqU59SzPlLB9Pf_UHMmN1lBsgWOu9S0Ro9bJGNrxjU5l4F8HpGN296L1NRCajrZweZCVb7ZIj6dfxZKw1aZqq0qDpiWYu1N3xPf6uz7GPhlUlVs0-RxuaAXiVWK95-RHFqUXrEV2y0djmb_Hr3PsUaCgYKAcQSARQSFQHGX2Mi6o7G44Y8BCwy36r8lldkbA0175",
  "expires_in": 3599,
  "refresh_token": "1//03juHmCPrrd1BCgYIARAAGAMSNwF-L9Irdehv2ZiIvC_Q-Q8iSG7FGT0Ml9GPPFoENaqo1pgideSCkAql184V4vJ_SSeD64Iw25Q",
  "scope": "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.profile",
  "token_type": "Bearer",
  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImJiNDM0Njk1OTQ0NTE4MjAxNDhiMzM5YzU4OGFlZGUzMDUxMDM5MTkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiMTA1MjU3NzE3ODg1Ny03Z2ZzbWlwZzI2NTQ1b3VlNTVuanI3bHZsZnRlNGd1MS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF1ZCI6IjEwNTI1NzcxNzg4NTctN2dmc21pcGcyNjU0NW91ZTU1bmpyN2x2bGZ0ZTRndTEuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDc2ODgxMzkyNTMzMDczNTA0MjgiLCJhdF9oYXNoIjoiRXVvTFd0SWpjM2o1QjA1OC1WSndVQSIsImlhdCI6MTc0OTE1NjEwNCwiZXhwIjoxNzQ5MTU5NzA0fQ.iQc3DALLOLBH0YXWv2h0ujLqeEUkZLBndXUaQC8NyLw_j3duWSxvm3X7_AnGQtGDbwHZAQ0AQFJ03JrcjZo8DOgrprGDTLjPtaKh4Wqy4M-zBlfXgfWQLFkdJGHwA60i2BkvI35BExAS-eeFE9Lm6SORg9882PII21K1eaU1dzRPMQb_Iz3qxqtG4p_3xvMOU5RTwxWg9SzwknbQPrFSpY7xRPNjz6q39UZxrqS5VgOq7Jp0xCPRlMiTKtMetdqrvxlWyPVBzlWT5jRNzkyX_ardIxLE6MXXx7r0trY5TcqnZ7MrS1xsurQKxNlrxqhAMlZuhoIxqmZSHZvgt3DK1g"
}
20250605T224144: Result from request [RETRIEVE ACCESS TOKEN] is {
  "access_token": "ya29.a0AW4XtxiFF87ZdRk1jQPDqU59SzPlLB9Pf_UHMmN1lBsgWOu9S0Ro9bJGNrxjU5l4F8HpGN296L1NRCajrZweZCVb7ZIj6dfxZKw1aZqq0qDpiWYu1N3xPf6uz7GPhlUlVs0-RxuaAXiVWK95-RHFqUXrEV2y0djmb_Hr3PsUaCgYKAcQSARQSFQHGX2Mi6o7G44Y8BCwy36r8lldkbA0175",
  "expires_in": 3599,
  "refresh_token": "1//03juHmCPrrd1BCgYIARAAGAMSNwF-L9Irdehv2ZiIvC_Q-Q8iSG7FGT0Ml9GPPFoENaqo1pgideSCkAql184V4vJ_SSeD64Iw25Q",
  "scope": "https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.profile",
  "token_type": "Bearer",
  "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImJiNDM0Njk1OTQ0NTE4MjAxNDhiMzM5YzU4OGFlZGUzMDUxMDM5MTkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXpwIjoiMTA1MjU3NzE3ODg1Ny03Z2ZzbWlwZzI2NTQ1b3VlNTVuanI3bHZsZnRlNGd1MS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF1ZCI6IjEwNTI1NzcxNzg4NTctN2dmc21pcGcyNjU0NW91ZTU1bmpyN2x2bGZ0ZTRndTEuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDc2ODgxMzkyNTMzMDczNTA0MjgiLCJhdF9oYXNoIjoiRXVvTFd0SWpjM2o1QjA1OC1WSndVQSIsImlhdCI6MTc0OTE1NjEwNCwiZXhwIjoxNzQ5MTU5NzA0fQ.iQc3DALLOLBH0YXWv2h0ujLqeEUkZLBndXUaQC8NyLw_j3duWSxvm3X7_AnGQtGDbwHZAQ0AQFJ03JrcjZo8DOgrprGDTLjPtaKh4Wqy4M-zBlfXgfWQLFkdJGHwA60i2BkvI35BExAS-eeFE9Lm6SORg9882PII21K1eaU1dzRPMQb_Iz3qxqtG4p_3xvMOU5RTwxWg9SzwknbQPrFSpY7xRPNjz6q39UZxrqS5VgOq7Jp0xCPRlMiTKtMetdqrvxlWyPVBzlWT5jRNzkyX_ardIxLE6MXXx7r0trY5TcqnZ7MrS1xsurQKxNlrxqhAMlZuhoIxqmZSHZvgt3DK1g"
}

2/ On a Galaxy S24+, when I close the screen that indicates that the connection is successful, I get nothing, and the connexion is not established.

The log is (id and secret are manually masked by XXX, YYY and ZZZ) :
The 2 last lines are not ok with access token null :

20250605T222352: Executing request [TEST TOKENS] with url: [https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=]
20250605T222353: Result from request [TEST TOKENS] is {
  "error": "invalid_token",
  "error_description": "Either access_token, id_token, or token_handle required"
}

20250605T222353: Result from request [TEST TOKENS] is {
  "error": "invalid_token",
  "error_description": "Either access_token, id_token, or token_handle required"
}

20250605T222403: Executing request [RETRIEVE ACCESS TOKEN] with url: [https://accounts.google.com/o/oauth2/token?client_id=XXXX&client_secret=YYYY&redirect_uri=http://127.0.0.1:8888&code=ZZZ&grant_type=authorization_code]
20250605T222403: Result from request [RETRIEVE ACCESS TOKEN] is 
20250605T222403: Result from request [RETRIEVE ACCESS TOKEN] is

It's a disaster.