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

Login to Google Drive is broken #1458

Closed
1 task done
shivindera opened this issue Dec 10, 2023 · 9 comments
Closed
1 task done

Login to Google Drive is broken #1458

shivindera opened this issue Dec 10, 2023 · 9 comments
Labels

Comments

@shivindera
Copy link

shivindera commented Dec 10, 2023

Which version of floccus are you using?

5.0.2

Sync method

Google Drive

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Firefox Developer Edition 121.0b9 (64-bit) (Windows)

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

Screenshot 2023-12-10 151737

On clicking the LOGIN WITH GOOGLE button nothing happens. Please find below the error in the console:

Error: Type error for parameter permissions (Error processing origins.0: Value "https://oauth2.googleapis.com/" must either: be one of ["<all_urls>"], must either [match the pattern /^(https?|wss?|file|ftp|\*):\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$/, or match the pattern /^file:\/\/\/.*$/], or match the pattern /^resource:\/\/(\*|\*\.[^*/]+|[^*/]+)\/.*$|^about:/) for permissions.contains.
    F moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    l moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    l moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    a moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    promise callback*p moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    s moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    s moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    authorize moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    loginGoogleDrive moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Te moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    n moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Te moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    $emit moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    click moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Te moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    n moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    _wrapper moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Vi moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Ht moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Yi moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    b moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    d moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Mo moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    _update moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    i moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    get moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    t moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    mount moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    $mount moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    init moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    d moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    d moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    E moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    E moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    E moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    E moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Mo moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    _update moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    i moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    get moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    run moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    un moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    je moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Re moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    promise callback*Se moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    je moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    update moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    update moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    notify moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    set moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    set moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    set moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    updateSingle moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    updateInternalValue moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    onClick moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    register moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Te moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    $emit moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    toggle moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    onChange moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    Te moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    n moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
    _wrapper moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:2
[options.js:2:2185795](moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js)

Screenshot 2023-12-10 152258

Expected Behavior

It should open the oauth flow for Google login

To Reproduce

Install the extension on Firefox -> Click on New Profile in the extension -> Select Google Drive -> Click on Login With Google

Debug log provided

  • I have provided a debug log file
@shivindera shivindera added the bug label Dec 10, 2023
Copy link

Hello 👋

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and I created floccus and have been maintaining it ever since.
I currently work for Nextcloud which leaves me with less time for side projects like this one
than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue
Cheers 💙

@shivindera
Copy link
Author

It might be fixed by changing this line:

const origins = ['https://oauth2.googleapis.com', 'https://www.googleapis.com']

to this:

const origins = ['https://oauth2.googleapis.com/', 'https://www.googleapis.com/']

in this file:

const origins = ['https://oauth2.googleapis.com', 'https://www.googleapis.com']

but not sure if that is the intention to what this code does. But, the check browser.permissions.contains({ origins: [...] }) was working as intended post the above change.

@shivindera
Copy link
Author

So, I tried making the above change in my local extension and the the check ran fine but I get a new error:

Error: E036: Missing permissions to access the sync server
    e options.js:64014
    e options.js:64463
    F options.js:70792
    l options.js:70645
    l options.js:70660
    a options.js:70531
    promise callback*p options.js:70547
    a options.js:70531
    promise callback*p options.js:70547
    s options.js:70549
    s options.js:70526
    authorize options.js:70716
    loginGoogleDrive options.js:87442
    Te options.js:92414
    n options.js:91954
    Te options.js:92414
    $emit options.js:93850
    click options.js:96927
    Te options.js:92414
    n options.js:91954
    _wrapper options.js:94591
    Vi options.js:94594
    Ht options.js:91975
    Yi options.js:94622
    b options.js:95219
    d options.js:95188
    Mo options.js:95411
    _update options.js:93862
    i options.js:95868
    get options.js:92602
    t options.js:92595
    mount options.js:95870
    $mount options.js:95890
    init options.js:92916
    d options.js:95165
    d options.js:95178
[options.js:formatted:92440:22](moz-extension://8c008b47-33c8-478b-a141-bbaaca853f96/dist/js/options.js:formatted)

Looks like the permissions are not available, not sure which permissions are not enabled for the extension.

@shivindera
Copy link
Author

@marcelklehr any idea?

@shivindera
Copy link
Author

Nevermind, figured it out. Firefox was not giving access to the extension as it was unsigned. Made it work by enabling the Access your data for all websites settings in addons:

Screenshot 2023-12-10 160213

@marcelklehr
Copy link
Member

Firefox was not giving access to the extension as it was unsigned.

Are you sure this is the reason?

@shivindera
Copy link
Author

By turning on the "Access your data for all websites", the login workflow opened up. Which I guess was disabled because I was using unsigned version, to test the change I suggested above. But, this is not my field so would rely on your experience.

@marcelklehr
Copy link
Member

I'm thinking maybe it's never turned on by default. I haven't tested this before the v5 release because I didn't touch it, but maybe manifest v3 imposes more stuff than I thought... Will try to reproduce soon.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants