nextcloud / passman-webextension

Webextension for the Passman Nextcloud app. Also offers browser extension & Android app.
https://passman.cc
GNU Affero General Public License v3.0
114 stars 43 forks source link

[0] TypeError: Failed to fetch #269

Closed DrCarsonBeckett closed 6 years ago

DrCarsonBeckett commented 6 years ago
### Steps to reproduce 1. Update to Chrome 68 2. Restart the browser 3. Issue appears ### Expected behaviour As soon as the update is completed and the browser is restarted, I should be able to get the logins from passman. ### Actual behaviour As soon as the update is completed and the browser is restarted, I get the message: Ungültige Antwort des Servers: [0] TypeError: Failed to fetch or connection timeout. ### Configuration **Operating system**: Windows 10 Pro 64 Bit **Browser**: Google Chrome 68. **Extensions that might cause interference**: None. **Passman version**: 1.2.4 **Extension version**: 2.1.1 **Nextcloud version**: 13.0.5 #### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
DrCarsonBeckett commented 6 years ago

Is this going to be looked at or do I need to change to another password solution?

DrCarsonBeckett commented 6 years ago

It works on Firefox. But I prefer not to change the Firefox.

jzielke84 commented 6 years ago

Confirmed, since upgrade to Chrome 68. Probably Google changed something silently again...

@DrCarsonBeckett No need to push that hard. Passman is free and this issue is just 13 hours old and you demand a repsonse within an hour...

Also Chrome 68 has been released 2 days ago. So give them some time to investigate.

Interim solution:

DrCarsonBeckett commented 6 years ago

Okay.

I will try that.

florealcab commented 6 years ago

Confirmed for me also. Something in chrome 68 make the extension fail (it's also the case for floccus extension I use, which communicate with nextcloud too).

I hope a fix will be published soon... For now I downgrade to 67 version of chrome...

edwardscaleb9 commented 6 years ago

I'm seeing the following in Chrome's Console: [Passman extension] Stopping, vault key not set inject.js:400

DrCarsonBeckett commented 6 years ago

I'm hoping for a fast update. Because I don't like to use an outdated browser.

marcelklehr commented 6 years ago

Hey there! Developer of floccus here. I was hoping we could join forces :)

My initial observation is that my requests using the fetch API no longer have an Origin header nor an Authorization header. The latter I was able to add by setting credentials: 'include', but mode: 'cors' doesn't seem to do anything for the Origin header.

marcelklehr commented 6 years ago

I can reproduce this with Version 68.0.3440.75 (Official Build) However, it seems to be fixed with Version 68.0.3440.84 (Official Build) (64-bit)

DrCarsonBeckett commented 6 years ago

I can't confirm that passman works with the version 68.0.3440.84 (Official Build) (64-bit). Just tested it. But thank you for your effort. Most likely its related to floccus only.

kauden commented 6 years ago

The problem persists for me: Mac OS: 10.13.6 Chrome: Version 68.0.3440.84 (Build officiel) (64 bits)

wjwieland commented 6 years ago

Also seen on the Linux versions of Chromium and Google Chrome -stable releases.

marcelklehr commented 6 years ago

mmh. weird.

I've found the following issue: https://bugs.chromium.org/p/chromium/issues/detail?id=784528 Let's see what the chromium people say.

DrCarsonBeckett commented 6 years ago

Thats basically what @marcelklehr said. He said its fixed in the latest 68 version update. Which is not the case for this extension.

marcelklehr commented 6 years ago

Yup, I confirm it's not fixed for passman in Chrome: Version 68.0.3440.84 :/ That's even weirder, as the problem I identified for floccus isn't actually fixed in that version, so it shouldn't work for floccus either.

DrCarsonBeckett commented 6 years ago

Thats odd.

gt2416 commented 6 years ago

Same issue on the macOS version of chrome. Such a hassle :/ On my windows pc it still works

florealcab commented 6 years ago

@gt2416 you probably have an older version of Chrome in your windows PC, isn't it?

DrCarsonBeckett commented 6 years ago

Seems like the devs don't care. :(

Stijn98s commented 6 years ago

https://www.chromestatus.com/features/4539473312350208

Does this have anything to do with it?

marcelklehr commented 6 years ago

@Stijn98s ah, I stumbled upon that as well. I don't think so, though, as the action they took was changing the behavior from omitting credentials to providing them along with the request when it's to the same-origin (see https://chromium.googlesource.com/chromium/src/+/5b7b98694d9a5bae9b7efeb0a4a34710c83b098b%5E%21/#F4 )

From what I could gather the problem seems to be that the fetchAPI doesn't provide an Origin for cors requests from extensions.

jzielke84 commented 6 years ago

@brantje This seems to be a major flaw, since - aside of Firefox - Chrome is the only browser using this extension. So I hope this problem will be addressed soon.

marcelklehr commented 6 years ago

Random question to all the affected people: Do any of you get the following behavior as well (in addition to the extension problems) in chrome in the nextcloud web UI of the files app?

screenshot from 2018-08-08 20-48-04 (It asks for credentials, then reloads after showing an error if I click cancel. It does work when I enter my nextcloud credentials, but in firefox I don't even have to do that, which makes me think it's another bug in chrome.)

marcelklehr commented 6 years ago

Turns out I was wrong. I'm happy to say that you hit the nail on its head @Stijn98s! :tada: Chrome used to omit 'credentials', which are essentially cookies. Now it sends them if the script triggering the fetch is from the same origin as the target. Extensions that have permissions to make requests to a domain, are treated as same-origin, though. Thus, cookies get sent, and for whatever reason nextcloud freaks out and redirects to the same page over and over again. The fix should be is a one-liner. :sweat_smile:

Jab2870 commented 6 years ago

I think this is a duplicate of #258

florealcab commented 6 years ago

Thank you for fixing this issue. But, it is still the old version on the chome store. When it will be updated on it? Or is it a simple way to have the new version without it? I want to update chromium to the latest version, but I can't if I haven't the fix...

gt2416 commented 5 years ago

When will this be on chrome ? It's been a month and this bug breaks ALL the functionality of the plugin, come on, thats unacceptable....

Stijn98s commented 5 years ago

yea i know. https://github.com/mcguffin/passman-webextension he has the bug fixed and in the readme there is a description to build it yourself.

florealcab commented 5 years ago

@Stijn98s thank you for this link, it works fine. Good solution until an official release is done with the fix

wjwieland commented 5 years ago

Hmmm... two days ago, the extension seemed to start working again on my Linux box with both Chromium-browser(my default browser) and Google Chrome (both running current stable releases). A huge relief to me, as I was having to switch back to Keepassx, or similar to get the functionality back. This extension along with the NextCloud app finally working across platforms/browsers is huge to me!

Thanks for whatever work went into this! It is so appreciated!

crobarcro commented 3 years ago

I'm currently experiencing the issue with chromium Version 85.0.4183.121 (Official Build) Built on Ubuntu , running on LinuxMint 19.3 (64-bit).

The extension is version 2.1.2 from September 10, 2018, is there any plans for an updated release, or is the extension dead for now? I noticed there is at least one other extension claiming to connect to the passwords app, is this related to the passman app?