-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix freeze when opening repo on unsupported URL scheme. #1631
Comments
@real-yfprojects @ThomasWaldmann Would |
I think so. |
Not sure whether the file dialog will be able to let you "select" a ssh: url somehow, but we can try. What it for sure won't do, is the special ssh: path styles borg uses to indicate current directory and home directory on the server, usually ssh:// urls always give absolute paths only. |
I was thinking that there might be a file selector somewhere out there that allows just that, so why not tell it that vorta supports
Are normal ssh: paths supported by borg? |
|
So should we just allow the local path to be added using the dialog box and leave the ssh to be filled manually? |
@real-yfprojects so I just add |
@i1sm3ky i guess this needs trying interactively. try it before any change, check how the dialogue behaves and what it offers (esp. considering non-file: stuff), then change the schemes and try again how it behaves. this is platform dependent, so try on all platforms you have access to. |
Ok, I'll test that and work on it accordingly. |
I tested it for local repos on MacOS Ventura 13.2.1 and it worked without any errors for both the cases(with and without the schemes). Unfortunately I can't figure out a way to test it for ssh and smb. Is there a way to test it for smb and ssh(without a paid host like borgbase) on the same machine? Also while installing Borg, I faced some issues as I'm using a m1 chip and wasn't able to install the arm version. I had to install it using Rosetta 2 on x86_64 architecture. I think an update on |
There is nothing you need to "test" for smb except that:
|
For ssh, you could run a sshd on localhost or some other (e.g. linux) machine you have access to. borgbase has a for-free offer btw. |
This comment was marked as off-topic.
This comment was marked as off-topic.
You should be able to use a VM or a different machine to set up a test smb share and test ssh access. |
Ya I kinda was asking for how can I do that as I didn't have another machine with me at that point of time. But I'll use one of my friends to test.
Ok I'll look more into that. Thanks ;)
Ok... Maybe there was something wrong on my end.
I tried that with a VM but was unable to do so, I'll try it once again. |
I just tried on my MBA and I was not able to get a "smb:" URL result from the file dialogue (when adding a new repo):
I could not discover any way to select a ssh: URL via the file dialogue. So, as far as macOS and smb: / ssh: is concerned, I did not find the problem we are trying to "solve" here. vorta 0.8.10 borg 1.2.3 macOS Ventura |
The guy in #1628 used Gnome and Fedora 37. |
Yes same, I was able to use a mounted server but was not able to select a smb:// or a URL by itself on mac.
Yeah I'll try on those to see if I can reproduce the issue and does the fix work. |
Sorry, I had my exams so I was unable to work on the issue. I got one of my friend's pc to test. While testing, I found some more issues-
Unfortunately I was not able to check with the fix enabled as I'm having some issues with linux. I'll try to resolve the issue and test the fix tomorrow. I think it may also be a issue with And I also would love to know what would be the chances of getting GSOC under your mentorship. I am really looking forward to work more with you guys. What should be my next step and how should I apply to GSOC for your organisation? Edit: And when should I apply? |
Chances are good. You can find information about our application process on our GSoC wiki page. You have already completed steps one to three.
What file manager / dialog allows you to select
A valid ssh address to a borg repository should work. The behaviour regarding |
Yeah Thanks :) I have read that earlier, I'll again have look into that and apply shortly.
The default Fedora one.
It didn't in my case. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Yup, Thanks again ;) I think regarding the file dialog, We should only allow local files to be selected and ssh and other supported URLs could be added using the text box itself. So only allowing local files to be selected using the file dialog by adding |
Setting Edit- Another solution would be to check for substrings containing unsupported URL types in the selected URL and pushing a QMessageBox informing the user about the supported URL types. |
If the file dialogues are misbehaved and do not respect parameters given:
|
Yes, just link to the issue. |
Yup sure, Thanks! |
@i1sm3ky if you decide to write a own url/path validator, please do it as a boolean function and write unit tests for it. but as i said, it might be simpler to either copy that from borg code (or invoke a borg command to let it do the testing). if you write your own REs and conditions, it is rather likely that you miss(match) something. |
@ThomasWaldmann Thanks for the guide, I'll check the borg code for the url validator and the unit tests. Sorry for the inconvenience, I just looked past the fact that borg also does a url check, I don't know what was I thinking of :/ |
Found the REs and the location_validator on borg. |
Opening a PR would be even better! |
Ya that's why I'm trying to get it done before 4th so that I can include it as a PR in the proposal. |
You can also open a draft PR so we can better see and comment on your current progress. |
Yeah sure! I'll do that. |
Why does vorta freeze in the first place? |
Sorry for the delayed reply. |
Your reply isn't late at all.
Can you triage which lines of code cause the freeze? |
It seems like not all file explorers respect the supported scheme property, that's why Vorta shouldn't rely on that. However currently Vorta will freeze when opening an unsupported scheme like
smb
orsftp
. This should be fixed. A small error message should be displayed in the dialog instead.You can open
smb://
and other URLs when adding a repository although borg only supports normal paths (file scheme) and the ssh scheme. This is because vorta is missing to set the supported schemes attribute.See https://doc.qt.io/qt-5/qfiledialog.html#supportedSchemes-prop
Originally posted by @ThomasWaldmann in #1628 (comment)
The text was updated successfully, but these errors were encountered: