Open CybSecUK opened 5 months ago
Hi @CybSecUK. Thanks for reporting. Could you please send a screenshot of where you see the 401 error? Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
[image: Google sync 401-1.PNG] Hi, hope this is what you need its a new NC install, so I may have missed something Stubbsy
On Fri, 7 Jun 2024 at 18:33, Marcel Robitaille @.***> wrote:
Hi @CybSecUK https://github.com/CybSecUK. Thanks for reporting. Could you please send a screenshot of where you see the 401 error? Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
— Reply to this email directly, view it on GitHub https://github.com/MarcelRobitaille/nextcloud_google_synchronization/issues/18#issuecomment-2155251026, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2CJOPO7AEANVH7KJ553T3LZGHVF7AVCNFSM6AAAAABI7BHFW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGI2TCMBSGY . You are receiving this because you were mentioned.Message ID: <MarcelRobitaille/nextcloud_google_synchronization/issues/18/2155251026@ github.com>
Hi, any ideas ? Stubbsy
On Fri, 7 Jun 2024 at 18:50, Cyb Sec @.***> wrote:
[image: Google sync 401-1.PNG] Hi, hope this is what you need its a new NC install, so I may have missed something Stubbsy
On Fri, 7 Jun 2024 at 18:33, Marcel Robitaille @.***> wrote:
Hi @CybSecUK https://github.com/CybSecUK. Thanks for reporting. Could you please send a screenshot of where you see the 401 error? Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
— Reply to this email directly, view it on GitHub https://github.com/MarcelRobitaille/nextcloud_google_synchronization/issues/18#issuecomment-2155251026, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2CJOPO7AEANVH7KJ553T3LZGHVF7AVCNFSM6AAAAABI7BHFW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGI2TCMBSGY . You are receiving this because you were mentioned.Message ID: <MarcelRobitaille/nextcloud_google_synchronization/issues/18/2155251026@ github.com>
The image did not send correctly. This is all I see in GitHub.
Please aee attached, the other email didnt get through, removed and readded, still getting the 401 error
On Fri, 7 Jun 2024 at 18:33, Marcel Robitaille @.***> wrote:
Hi @CybSecUK https://github.com/CybSecUK. Thanks for reporting. Could you please send a screenshot of where you see the 401 error? Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
— Reply to this email directly, view it on GitHub https://github.com/MarcelRobitaille/nextcloud_google_synchronization/issues/18#issuecomment-2155251026, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2CJOPO7AEANVH7KJ553T3LZGHVF7AVCNFSM6AAAAABI7BHFW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGI2TCMBSGY . You are receiving this because you were mentioned.Message ID: <MarcelRobitaille/nextcloud_google_synchronization/issues/18/2155251026@ github.com>
There is still nothing attached. Please comment on GitHub instead of using email. It is not working.
Hi, hopefully, these are attached nextcloudLOG.zip
Hi, having the very same problem, any solution?
@CybSecUK Thank you for sending the image. I know that there are error messages. Could you please send some logs as described before?
Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
The logs were in the zip file ?
Paul Stubbs | CybSec
On Wed, 19 Jun 2024 at 20:48, Marcel Robitaille @.***> wrote:
@CybSecUK https://github.com/CybSecUK Thank you for sending the image. I know that there are error messages. Could you please send some logs as described before?
Could you please also share your server logs? You can go to settings > Logging > 3-dot menu > Download logs. This will be impossible to diagnose without logs.
— Reply to this email directly, view it on GitHub https://github.com/MarcelRobitaille/nextcloud_google_synchronization/issues/18#issuecomment-2179376319, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2CJOPL2UBFWURYPNG2AQKTZIHOCNAVCNFSM6AAAAABI7BHFW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGM3TMMZRHE . You are receiving this because you were mentioned.Message ID: <MarcelRobitaille/nextcloud_google_synchronization/issues/18/2179376319@ github.com>
@CybSecUK Sorry I missed that link. I will take a look.
Hi, just wondered if any update ?
Hi @CybSecUK
I looked through the log file you attached and I did not see any mention of this app. Must be a purely fronend issue. I should add some better error reporting for these errors.
I just tried to reproduce the error in a fresh development docker container and I was not able to. Everything worked perfectly.
Steps to NOT reproduce:
docker run --rm -p 8080:80 ghcr.io/juliushaertl/nextcloud-dev-php80:latest
(changed 80 to 81)Some steps for you to try:
Please try the newly released version 2.2.0. I have made some improvements to the frontend error reporting.
Tryed 2.2.1:
Detail: { "message": "Request failed with status code 401", "name": "AxiosError", "code": "ERR_BAD_REQUEST", "config": {} }
@urbaman Thank you for testing that. Unfortunately that doesn't give me any more information. I really hate Google's apis. They always fail without telling you why.
Did you try the steps described in my comment _above?
There may be more information in the browser developer tools. Can you please press ctrl+shift+i and then press console. You should see something red printed saying something about the 401 error. Then, please go to the network tab and look for a request that fails with error 401. Click the request and check the response.
I also encountered this error. Turned out I forgot to enable all the api's for my project (reused an existing one)
Found this in the console error:
People API has not been used in project REDACTED before or it is dis (truncated...)
I’ll check again but pretty sure they all were enabled New project etc
On Sun, 4 Aug 2024 at 15:23, Maarten @.***> wrote:
I also encountered this error. Turned out I forgot to enable all the api's for my project (reused an existing one)
Found this in the console error:
People API has not been used in project REDACTED before or it is dis (truncated...)
— Reply to this email directly, view it on GitHub https://github.com/MarcelRobitaille/nextcloud_google_synchronization/issues/18#issuecomment-2267561690, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2CJOPO4OKO24CGS7NUZJ3LZPY2PRAVCNFSM6AAAAABI7BHFW2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRXGU3DCNRZGA . You are receiving this because you were mentioned.Message ID: <MarcelRobitaille/nextcloud_google_synchronization/issues/18/2267561690@ github.com>
I run into the same problem, not sure but is it maybe related that the redirect uri is not public (from the internet) accessible? Is that a requirement that the app should work or is it not a problem ?
@CvH That should not be a problem. It should work with localhost.
There is another step that needs to happen with the google API:
From the dashboard, ensure that in "Enabled APIs and services" you have actually enabled the Google Drive API for your application.
There is another step that needs to happen with the google API:
From the dashboard, ensure that in "Enabled APIs and services" you have actually enabled the Google Drive API for your application.
Faced the same problem with 401 and thanks to your comment I managed to fix it. Indeed it is as you said: you need to activate the API for each of the services you wanna use (in my case only google calendar was needed).
If, like me, you only want to use the calendar function, only activate calendar api and when logging in via nextcloud into google only grant the calendar rights -> no errors!
If anyone needs the corresponding links (just make sure, you choose your own correct project before activating: Google Drive: https://console.cloud.google.com/apis/library/drive.googleapis.com Google Calendar: https://console.cloud.google.com/apis/library/calendar-json.googleapis.com Google Fotos: https://console.cloud.google.com/apis/library/photoslibrary.googleapis.com (not exactly sure) Google Contacts: https://console.cloud.google.com/apis/library/contacts.googleapis.com
Which version of synchronization_google are you using?
Latest ( sorry away from machine)
Which version of Nextcloud are you using?
Hub8
Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.
Chrome up to date and checked with Firefox
Describe the Bug
Failed to get number of Google contacts: Request failed with status code 401 connected to app, authorised all ok, get this error when telling app to sync from admin area of nc
Expected Behavior
Google acc sync
To Reproduce
Follow instructions in app doc