-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[🐛 Bug]: ValueError: ZIP does not support timestamps before 1980 #14143
Comments
@milahu, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
I'm not sure the value of maintaining time stamps vs supporting profiles generated with timestamp zero. Would you like to make a PR with the value configurable in the constructor or a property of the profile class? |
This issue is looking for contributors. Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested. |
@titusfortner I added a private field to the class with a default value of True. The property can be set to False, as in the case for fixing the current bug. I believe such changes should not break client code that does not use setting a value to the field self._strict_timestamp. |
thanks for the patch can we change the default to @property
def encoded(self) -> str:
"""Updates preferences and creates a zipped, base64 encoded string of
profile directory."""
if self._desired_preferences:
self.update_preferences()
fp = BytesIO()
with zipfile.ZipFile(fp, "w", zipfile.ZIP_DEFLATED) as zipped:
path_root = len(self.path) + 1 # account for trailing slash
for base, _, files in os.walk(self.path):
for fyle in files:
filename = os.path.join(base, fyle)
zipped.write(filename, filename[path_root:])
return base64.b64encode(fp.getvalue()).decode("UTF-8") |
@milahu @titusfortner I changed the default value to False |
added my comments to the PR |
What happened?
selenium firefox fails to start
if the firefox profile files have timestamp zero = 1970-01-01
selenium/py/selenium/webdriver/firefox/firefox_profile.py
Line 155 in 9ce4e66
fix: add
strict_timestamps=False
(source)How can we reproduce the issue?
find firefox-profile -print0 | xargs -0 touch -m --date=1970-01-01T00:00:00+0000
Relevant log output
Operating System
nixos linux
Selenium version
4.17.0
What are the browser(s) and version(s) where you see this issue?
firefox
What are the browser driver(s) and version(s) where you see this issue?
firefox any
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: