-
Notifications
You must be signed in to change notification settings - Fork 212
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 for "Google signin no longer works since 2.7.0 on Mac" #311 #313
Conversation
Here are some places you could check. My guess is that there is some part of the current code that only handles
|
As I can see the One of them: session.webRequest.onBeforeRequest(
(details: OnBeforeRequestListenerDetails, callback: (response: CallbackResponse) => void) => {
console.log('AAAAAA', details.url, ' ||| ', session.getStoragePath());
callback({ cancel: false });
}
); is called as expected for each session (default and partitioned). But this one: session.webRequest.onBeforeSendHeaders(
(details: OnBeforeSendHeadersListenerDetails, callback: (beforeSendResponse: BeforeSendResponse) => void) => {
details.requestHeaders['User-Agent'] = getUserAgentForApp(details.url, session.getUserAgent()); is called for default session only. |
@magne4000 would you mind if I merge the PR? |
@viktor44 ok, but if there are some new things critical breaking, we should reverse to always use Have you managed to reproduce the issue with a fresh Electron boilerplate? Because it indeed could be an Electron issue in itself, but we need to be sure. |
Agree. But IMO not now.
Not yet. |
I've created a small test and everything is working fine. The bug does not exists in the clean Electron. 😢 |
A few things to check:
|
Workaround for new problem.
session.webRequest.onBeforeSendHeaders(
is never called for any session except default.session.webRequest.onBeforeRequest(
works as expected.Don't understand what I'm doing wrong. Any ideas would be very appreciated.
So for sessions with
partition
attribute we don't replace header and can't login with Google.