-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ia): skip cache on google oauth flow #3743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm connected to the staging manager instance, but on this branch I get the following error message when attempting to connect:
![Screenshot 2025-02-12 at 10 44 46 AM](https://private-user-images.githubusercontent.com/2230142/412549660-d5513a86-d072-43d2-8250-adf021ca1d7a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDAyNzMsIm5iZiI6MTczOTUzOTk3MywicGF0aCI6Ii8yMjMwMTQyLzQxMjU0OTY2MC1kNTUxM2E4Ni1kMDcyLTQzZDItODI1MC1hZGYwMjFjYTFkN2EucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTMzMjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2UxNzA5Zjc5NDY4NGJmMTExMzk2ZjZhNTdmMTcyOTg0NjU5YTUwNThjZmIzMzk1ODI1OGY1OTUzOTVlNzg1MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.oVrFdX8neORu5n8rxJkpMdpPSMK3vOc-TrSG6-fdaNg)
Stack trace:
Uncaught (in promise) WizardApiError: cURL error 35: error:0A000126:SSL routines::unexpected eof while reading
WizardError class-wizard-error.ts:9
WizardApiError class-wizard-api-error.ts:13
parseApiError use-wizard-api-fetch.ts:61
catchCallback use-wizard-api-fetch.ts:225
promise callback*./src/wizards/hooks/use-wizard-api-fetch.ts/useWizardApiFetch/apiFetch< use-wizard-api-fetch.ts:268
openAuth google-oauth.tsx:91
key components.js:2104
React 23
tsx index.tsx:120
Webpack 5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works! I ran into one issue that's probably not related to these changes, but let's fix it while we're here.
- Disconnect Google OAuth if already connected
- Refresh Connections page so you see the "Invalid or missing Google credentials" error message
- Connect Google OAuth
- After completing the connection, the error message lingers until a page refresh:
![Screenshot 2025-02-12 at 11 01 16 AM](https://private-user-images.githubusercontent.com/2230142/412553616-71e1a478-5543-4ff1-bb0c-21f907b18557.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NDAyNzMsIm5iZiI6MTczOTUzOTk3MywicGF0aCI6Ii8yMjMwMTQyLzQxMjU1MzYxNi03MWUxYTQ3OC01NTQzLTRmZjEtYmIwYy0yMWY5MDdiMTg1NTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTMzMjUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmEwMDgwMTk0YWMzZTVhMDY3N2U0ZDUxNzZhZDhhOWRlNmQ2NTdmZTlmM2Y0MjFhY2RkNTBmZWUyZDMzZDFjZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aG8R7XV-nTWB2Qq_hofnIC999BbuVbsrsVIDWIgVilU)
Hmm... I thought the change in line 72 fixed this 🤔 Taking a look |
4341b4e should take care of it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that fixed it!
All Submissions:
Changes proposed in this Pull Request:
1205919985867982-as-1209366560752423
The caching strategy behind
useWizardFetch
is preventing the Google OAuth flow to start. This PR removes cache from that request.How to test the changes in this Pull Request:
epic/ia
branch confirm you are unable to start the OAuth in the "Newspack -> Settings -> Connections" tabOther information: