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

UriFormatException #97

Closed
Musickiller opened this issue Sep 7, 2021 · 11 comments
Closed

UriFormatException #97

Musickiller opened this issue Sep 7, 2021 · 11 comments
Labels

Comments

@Musickiller
Copy link

Hello!

While attempting to push my passwords today, I've got an error:
image

I've tried to make git push from the shell opened by the app, it worked.

Where can I find relevant logs that may tell what has caused the issue?

Kind Regards,
Dmitrii

@geluk
Copy link
Owner

geluk commented Sep 7, 2021

Hi @Musickiller, you can try the directory in which pass-winmenu.exe is located, and look for a pass-winmenu.log file there.
Additionally, if pass-winmenu is still running, you can also view the logs by right clicking the notification area icon, and going to More Actions > View Logs.

Please let me know what was wrong when you find out the reason. I'm always interested in making the error messages in pass-winmenu as unambiguous as possible, and I think some progress on that can be made here.

@Musickiller
Copy link
Author

Relevant log:

[15:35:31.824] [DBG] Creating clipboard backup.
[15:35:31.824] [DBG]  - Formats: System.String, UnicodeText, Text
[15:35:31.870] [DBG] Generating unsigned commit for C:\Users\music\.password-store\work\nlmk\tech.gpg
[15:35:50.713] UriFormatException (Invalid URI: The format of the URI could not be determined.) in :0:0
[15:35:50.713]   -> in System.Uri.CreateThis -- :0:0
[15:35:50.713]   -> in PassWinmenu.WinApi.PathUtilities.MakeRelativePathForDisplay -- :0:0
[15:35:50.713]   -> in PassWinmenu.ExternalPrograms.Git.CommitFile -- :0:0
[15:35:50.713]   -> in PassWinmenu.ExternalPrograms.Git.Commit -- :0:0
[15:35:50.713]   -> in PassWinmenu.Actions.CommitChangesAction.Execute -- :0:0
[15:42:52.466] UriFormatException (Invalid URI: The format of the URI could not be determined.) in :0:0
[15:42:52.466]   -> in System.Uri.CreateThis -- :0:0
[15:42:52.466]   -> in PassWinmenu.WinApi.PathUtilities.MakeRelativePathForDisplay -- :0:0
[15:42:52.466]   -> in PassWinmenu.ExternalPrograms.Git.CommitFile -- :0:0
[15:42:52.466]   -> in PassWinmenu.ExternalPrograms.Git.Commit -- :0:0
[15:42:52.466]   -> in PassWinmenu.Actions.CommitChangesAction.Execute -- :0:0
[15:44:46.796] [DBG] gpg-agent alive.
[15:44:46.796] [DBG] Calling GPG with "--decrypt "C:\Users\music\.password-store\work\nlmk\main.gpg""

But I've tried it now, after some time (and updating that password, maybe), and it works o_O

@geluk geluk added the bug label Sep 7, 2021
@geluk
Copy link
Owner

geluk commented Sep 7, 2021

This looks like a bug in the code that generates a relative path for the commit message.
In the last update I've created a more robust algorithm for this, but the old method is still used in a few places, with git being one of them.

I'm going to see if I can update the Git integration to use the new method, which won't trigger this error anymore.

@Musickiller
Copy link
Author

I'm glad I could help you find it =)

While you fix that, I can still push from the shell, thanks for making a menu option for opening it =D

geluk added a commit that referenced this issue Sep 10, 2021
Use the new implementation of MakeRelativePathForDisplay.
@geluk
Copy link
Owner

geluk commented Sep 10, 2021

You're welcome! I've prepared a test build with the changes I mentioned earlier. Can you check whether this resolves your issue?
You can download it here: https://ci.appveyor.com/api/buildjobs/8flgx0qwujpfkoqd/artifacts/pass-winmenu%2Fbin%2FRelease%2Fpass-winmenu.exe

To use it, just drop the executable in the same directory as your existing pass-winmenu.exe (optionally with a different name) and start it.

@Musickiller
Copy link
Author

@geluk No, I suppose I can't, since I didn't have this issue since my last comment =\

@geluk
Copy link
Owner

geluk commented Oct 8, 2021

No worries, I'm quite confident the new algorithm handles this more gracefully, so if you don't encounter the issue anymore, it is likely fixed. If you do happen to run into it again, please let me know, but otherwise you can consider it resolved.

@plant7403
Copy link

plant7403 commented Oct 10, 2021

No worries, I'm quite confident the new algorithm handles this more gracefully, so if you don't encounter the issue anymore, it is likely fixed. If you do happen to run into it again, please let me know, but otherwise you can consider it resolved.

It might be my fault, but with the new exe i get this:
ArgumentNullException (Value cannot be null. Parameter name: author)

Everything worked fine with the latest version
I just reinstalled my windows yesterday
Setup everything from clean

@geluk
Copy link
Owner

geluk commented Oct 10, 2021

@xxxcrow: I suspect the problem you're encountering is unrelated to this, so I've opened a new issue: #100.

@plant7403
Copy link

@geluk i had the problem from this issue
Then i installed the version you said to try
And now yeah, i need to set the credentials 😁

@geluk
Copy link
Owner

geluk commented Oct 11, 2021

Fixed in 1.12.1

@geluk geluk closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants