Open Bug 1680160 Opened 3 years ago Updated 7 months ago

Mozregression won't copy my profile

Categories

(Testing :: mozregression, defect, P3)

Default
x86_64
Linux
defect

Tracking

(Not tracked)

People

(Reporter: pbone, Unassigned, NeedInfo)

References

Details

mozregression won't copy my firefox profile. I have a crash that occurs with my profile but not with a new profile, so I want to use my profile:

It says:


===== Downloaded 100% =====
0:07.40 INFO: Running mozilla-central build for 2020-11-01
0:17.69 ERROR: Unable to start the application (error: [('/home/paul/.mozilla/firefox/l5laremi.default/lock', '/tmp/tmpbtrkeru3/lock', "[Errno 2] No such file or directory: '/home/paul/.mozilla/firefox/l5laremi.default/lock'")])
0:17.72 ERROR: Unable to start the application (error: [('/home/paul/.mozilla/firefox/l5laremi.default/lock', '/tmp/tmpbtrkeru3/lock', "[Errno 2] No such file or directory: '/home/paul/.mozilla/firefox/l5laremi.default/lock'")])

It makes no difference if my normal FIrefox is open or closed. I need it closed because it's going to crash while I try to reproduce the bug with mozregression.

Blocks: 1680138

Are you able to test a local build of mozregression for this? I put together a prototype a while ago (basically just cribbing from nsProfileLock.cpp) that might handle this situation better, though put it on the back burner since it was difficult to test with and the code should also maybe be in mozprofile rather than mozregression itself.

I'm also not entirely clear if this will successfully "unlock" or if it's just going to give a friendlier error/falsely claim "Profile is already in use".

If you can and are willing to try it out, you can pull branch profileLock from https://github.com/KwanEsq/mozregression/ and follow the instructions on https://github.com/mozilla/mozregression/ to get a build to try (basically

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements/all.txt
pip install -e .

)

I'm assuming from the log you're using the terminal version. If you're not and are using GUI I can also trigger a CI build of GUI to test with.

Flags: needinfo?(pbone)

I am experiencing the same issue: ERROR: Unable to start the application (error: [('/home/lyubo/.mozilla/firefox/bazznqrz.default-release/lock', '/tmp/tmpx_v_vwuv/lock', "[Errno 2] No such file or directory: '/home/lyubo/.mozilla/firefox/bazznqrz.default-release/lock'")])

I have checked out your branch and tried to build mozregression, but i fail on step pip install -r requirements/all.txt.

Error i get is:
ERROR: Cannot install -r requirements/all.txt (line 7) and multidict==5.0.2 because these package versions have conflicting dependencies.

The conflict is caused by:
The user requested multidict==5.0.2
aiohttp 3.6.3 depends on multidict<5.0 and >=4.5

To fix this you could try to:

  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict

How should i proceed?

Flags: needinfo?(moz-ian)

Ah, python pip dependencies, always fun. I think here are two options. If you are on pip 20.X you can try running it again with --use-deprecated=legacy-resolver to get the old behaviour and it shouldn't complain. If you are on pip >= 21.0 you could maybe try the individual non-versioned requirements files:

pip install -r requirements/base.in -r requirements/dev.in

If you're trying to build the gui you'll also need

pip install -r requirements/gui.in -r requirements/gui-dev.in
Flags: needinfo?(moz-ian)

Well, i think i managed to install the dependencies. I got this error:
ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
aiohttp 3.6.3 requires multidict<5.0,>=4.5, but you'll have multidict 5.0.2 which is incompatible.
requests 2.23.0 requires urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1, but you'll have urllib3 1.26.2 which is incompatible.

But multidict 5.0.2 installed and aiohttp also installed.

However with this command:
mozregression --profile /home/lyubo/.mozilla/firefox/bazznqrz.default-release --arg="https://studio.youtube.com/channel/UCDhrPnsRzVoiJp5O0-lSADQ/videos/upload?filter=%5B%5D&sort=%7B%22columnType%22%3A%22date%22%2C%22sortOrder%22%3A%22DESCENDING%22%7D"

I got this error:
Traceback (most recent call last):
File "/home/lyubo/Downloads/mozregression/venv/bin/mozregression", line 33, in <module>
sys.exit(load_entry_point('mozregression', 'console_scripts', 'mozregression')())
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 363, in main
app = Application(config.fetch_config, config.options)
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 65, in init
self.check_profile_lock()
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 85, in check_profile_lock
oldlock = os.path.join(self.option.profile, oldlockname)
AttributeError: 'Application' object has no attribute 'option'

Also have this warning:
0:00.50 WARNING: You are using mozregression version 4.0.6.dev107+g3f1eadb, however version 4.0.14 is available.
0:00.50 WARNING: You should consider upgrading via the 'pip install --upgrade mozregression' command.

Flags: needinfo?(moz-ian)

(In reply to Lyubomir from comment #4)

However with this command:
mozregression --profile /home/lyubo/.mozilla/firefox/bazznqrz.default-release --arg="https://studio.youtube.com/channel/UCDhrPnsRzVoiJp5O0-lSADQ/videos/upload?filter=%5B%5D&sort=%7B%22columnType%22%3A%22date%22%2C%22sortOrder%22%3A%22DESCENDING%22%7D"

I got this error:
Traceback (most recent call last):
File "/home/lyubo/Downloads/mozregression/venv/bin/mozregression", line 33, in <module>
sys.exit(load_entry_point('mozregression', 'console_scripts', 'mozregression')())
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 363, in main
app = Application(config.fetch_config, config.options)
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 65, in init
self.check_profile_lock()
File "/home/lyubo/Downloads/mozregression/mozregression/main.py", line 85, in check_profile_lock
oldlock = os.path.join(self.option.profile, oldlockname)
AttributeError: 'Application' object has no attribute 'option'

Urgh, sorry, dumb typo on my part, it's been a while since this code was written, and I struggled to test it myself so never hit that. That line of main.py should use options rather than option. I've pushed an update to the branch if you want to pull that rather than edit it yourself.

Also have this warning:
0:00.50 WARNING: You are using mozregression version 4.0.6.dev107+g3f1eadb, however version 4.0.14 is available.
0:00.50 WARNING: You should consider upgrading via the 'pip install --upgrade mozregression' command.

I also rebased the branch onto master so it won't be based on 4.0.6 anymore, but you'll probably still get that warning due to bug 1631163, you can ignore it.

Flags: needinfo?(moz-ian)

It works now without error and starts Firefox without issues. :)

Flags: needinfo?(moz-ian)

I've tested it only with this command:
mozregression --profile /home/lyubo/.mozilla/firefox/bazznqrz.default-release --arg="https://studio.youtube.com/channel/UCDhrPnsRzVoiJp5O0-lSADQ/videos/upload?filter=%5B%5D&sort=%7B%22columnType%22%3A%22date%22%2C%22sortOrder%22%3A%22DESCENDING%22%7D"

Also with --good option.

Has this thingie been merged and released? Today i tried with mozregression release 4.0.17 and it gives me the same error.

What was confusing to me here is that the "lock" file is there even if the profile isn't in use. So I just deleted it, which seemed to work.

I don't know what this "lock" file is, what i'm sure is that not everyone who is supposed to use mozregression is also supposed to know about this "lock" file. So in my view this issue is a defect waiting on some backlog to be fixed.

If it's a Firefox lock file maybe the issue isn't in mozregression but in Firefox?

I can confirm that when mozregression complains there is no such file, the file is actually there. Deleting that file causes mozregression to work successfully.

Redirect a needinfo that is pending on an inactive user to the triage owner.
:zeid, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit BugBot documentation.

Flags: needinfo?(moz-ian) → needinfo?(zeid)
Severity: -- → S3
Flags: needinfo?(zeid)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.