buttercup / buttercup-browser-extension

:earth_asia: Buttercup browser extension
https://buttercup.pw
MIT License
227 stars 42 forks source link

Unexpected Application Error! Invalid URI format #466

Closed gravistech412 closed 3 months ago

gravistech412 commented 3 months ago

Unexpected Application Error! Invalid URI format

Firefox (updated) errors in the toolbar. Also errors in the U/P form fields.

Once logged in, I can update and add a record.

TinyTake26-03-2024-10-23-11

TinyTake26-03-2024-10-07-12

Buttercup Versions

perry-mitchell commented 3 months ago

Weird, I haven't seen such an error. Are you on stable firefox, latest version? I can't reproduce this.

gravistech412 commented 3 months ago

FF 124.0.1 (64-bit) TinyTake26-03-2024-03-09-54

Several others in my organization have the same error.

gravistech412 commented 3 months ago

I have uninstalled all FF extensions. Reinstalled BC. It asks to connect. Then it errors as mentioned above. With all my vaults locked (win desktop) the FF Extension does not error. My vaults are Google Drive. I downloaded the vault and loaded it locally and got the error. I have tried unlocking a vault on all 4 storage locations. Each errors.

gravistech412 commented 3 months ago

I have determined that it is one specific vault that when unlocked causes the error. This is our main vault.

gravistech412 commented 3 months ago

I have converted all vaults to "Format B". This vault still errors. I have created a local backup of this vault. I have unlocked this backup. The FF ext. errors.

Gkupce commented 3 months ago

It's also happening to me, the stack trace I get is:

parse@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:747:29350 Ti/c<@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:832:1538 Dl@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:240947 7463/t.unstable_runWithPriority@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:303569 Ga@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:181800 Pl@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:240415 2551/Ml/<@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:240326 D@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:302630 7463/w.port1.onmessage@moz-extension://e7fe273f-5db4-4d29-9bc0-82415709350f/scripts/popup.js:653:301353

The desktop application that links to the extension seems to be working fine, I yet have to get to the point where I relaunch the browser/buttercup after connecting them. I'm running Firefox 121.0 (64-bit) on Nobara Linux.

perry-mitchell commented 3 months ago

Any special characters in your vault names? Anything else you can share about your desktop configuration?

I've not been able to reproduce this yet, and I can't yet see a pattern as to when this occurs.

jyelland commented 3 months ago

@perry-mitchell I am seeing a similar issue. It does seem to be specific to a vault that has an underscore in its name. Specifically I see:

Unexpected Application Error!
Invalid URI format

parse@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:747:29350
Ti/c<@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:832:1538
Dl@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:240947
7463/t.unstable_runWithPriority@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:303569
Ga@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:181800
Pl@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:240415
2551/Ml/<@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:240326
D@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:302630
7463/w.port1.onmessage@moz-extension://014f0866-a9d4-414b-b461-89fe034336ed/scripts/popup.js:653:301353

Config is:

Firefox: 124.0.1 (64-bit)

Buttercup: Desktop @ v2.24.4 Core @ v7.4.0 Flags: installed

MacOS 14.4

jyelland commented 3 months ago

I do not see this when only a vault without underscore (and no other special characters) is unlocked.

perry-mitchell commented 3 months ago

Ok, thanks for the clarification. I'll see if I can reproduce it..

perry-mitchell commented 3 months ago

No, that doesn't seem to trigger it. Not with a local file at least.

Screenshot_20240327_083652

perry-mitchell commented 3 months ago

Ah! It's nothing to do with the vault name/path/type.. it's an OTP URI parsing issue. The vaults that are crashing the extension have an invalid OTP URI in them.

I'll get a patch out for this asap.

EDIT: In the mean time, try to track down the OTP URI that's invalid and consider either removing it, or changing it's type from an OTP item to a standard item. This should prevent it from being parsed.

EDIT 2: Easily reproducible with a bad URI for an OTP:

Screenshot_20240327_101432

goshander commented 3 months ago

Also if you have bad OTP URL in Trash, just drop this record

perry-mitchell commented 3 months ago

Trash should already be ignored.. if not I should check that later.

perry-mitchell commented 3 months ago

ETA on this is some time today. Apologies for the inconvenience.

adamturcsan commented 3 months ago

Trash should already be ignored.. if not I should check that later.

It is not. I only had one wrong OTP url, which was in the trash. After emptying it, the addon works properly.

Gkupce commented 3 months ago

It was the OTP, I had tested it once to see what it was and the trashed it. Still, sitting in the trash it was crashing the extension until now.

alonsohn commented 3 months ago

Answering the question about special characters, since I can't configure it on GDrive either, I have it synchronized to my server and in the name of a folder it has @ as a special character

alonsohn commented 3 months ago

Now, all my problem is in Ubuntu 22.04, in the Windows version everything works, Windows is not the OS. What I use the most, on the contrary it is the exception, my main job is in Linux

gravistech412 commented 3 months ago

@perry-mitchell thanks for the quick response. The new FF ext version work great now.