Skip to content
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

Google Drive Auto Sync is grayed out #385

Closed
DevlinTech opened this issue Jul 5, 2022 · 7 comments
Closed

Google Drive Auto Sync is grayed out #385

DevlinTech opened this issue Jul 5, 2022 · 7 comments

Comments

@DevlinTech
Copy link

Good day,
Please could you assist me with the steps on how I can setup the Google Drive Auto Sync feature?

image

@penge
Copy link
Owner

penge commented Jul 5, 2022

Hi,
is this problem happening on the version installed from Web Store, or is it a manually installed version (downloaded zip)?
Which browser are you using? Any useful messages in the browser's console?

@DevlinTech
Copy link
Author

DevlinTech commented Jul 5, 2022 via email

@penge
Copy link
Owner

penge commented Jul 7, 2022

Hi Dev,
could you try to check out Chrome's console if any message pops out when you try to enable Google Drive Sync?
Here's how to open Chrome's console:
https://balsamiq.com/support/faqs/browserconsole/#google-chrome

@DevlinTech
Copy link
Author

DevlinTech commented Jul 7, 2022 via email

@DevlinTech
Copy link
Author

DevlinTech commented Jul 7, 2022 via email

@penge
Copy link
Owner

penge commented Jul 7, 2022

Hi,
can you try to upload the screenshot again?
You should see similar messages to these in the Console:

Permissions - Requesting permission "identity"
Permissions - Acting on added permission "identity"
SYNC - START
SYNC - IN - CREATING NOTE - some_note_name_here

Or at least see some error. Try to also check this page (open in new tab), if things are enabled:
chrome://settings/syncSetup

@penge
Copy link
Owner

penge commented Sep 8, 2022

This problem occurs when service worker (basically something in the background that reacts to user actions or other events when they occur) is innactive and so it cannot handle the action. See chrome://extensions in a New Tab and My Notes details for this info. Clicking on the Refresh icon to reload the extension resolves this issue.


Details

This issue shouldn't be happening in the first place, because service worker is event-based, and it should be started anytime its needed (in case it was shut down and disposed due to not being needed for some time, to free-up resources). In this case, we make following uses:

chrome.storage.local.set               # to enable Auto Sync on click
chrome.storage.onChanged.addListener   # to react to enabled Auto Sync, to check the checkbox when enabled

Closing this issue as I don't see how I could solve it. One solution in the past used to be, to use background worker and making it persistent which didn't unload it when it wasn't needed. This solution is no longer acceptable in Manifest V3 extensions, where background worker was replaced by the mentioned service worker. This also applies to My Notes.

@penge penge closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants