Failed to get libraries information on 6.0.1/6.0.2

Upgraded my server to 6.0.1 beta and cant login via the newest client on linux. Does not work on Android and another Win7 machine. Web Frontend works fine.
Same for Windows 7 client, but a new user/server/account config did fix it.

Another bug: Since the new linux client the tray icon does not appear on Elementary OS.

The seafile.log and the ccnet.log does not show any errors on the client side. Only applet.log shows a lot of lines with some requests failed like these:

`[08/22/16 09:47:30]request failed for https://seafile.URL.com/api2/unseen_messages/:

Page unavailable

Page unavailable

Sorry, but the requested page is unavailable due to a server hiccup.

Our eng`

Please check the seahub_django_request.log at the server side.

2016-09-01 17:06:17,600 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py”, line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/generic/base.py”, line 71, in view
return self.dispatch(request, *args, **kwargs)
File “/home/seafile/seafile-server-6.0.1/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/home/seafile/seafile-server-6.0.1/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 376, in initial
self.perform_authentication(request)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 310, in perform_authentication
request.user
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 353, in getattribute
return super(Request, self).getattribute(attr)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 193, in user
self._authenticate()
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 316, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File “/home/seafile/seafile-server-6.0.1/seahub/seahub/api2/authentication.py”, line 63, in authenticate
ret = self.authenticate_v2(request, key)
File “/home/seafile/seafile-server-6.0.1/seahub/seahub/api2/authentication.py”, line 92, in authenticate_v2
token = TokenV2.objects.get(key=key)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/manager.py”, line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py”, line 328, in get
num = len(clone)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py”, line 144, in len
self._fetch_all()
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py”, line 965, in _fetch_all
self._result_cache = list(self.iterator())
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py”, line 238, in iterator
results = compiler.execute_sql()
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/sql/compiler.py”, line 840, in execute_sql
cursor.execute(sql, params)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/base.py”, line 318, in execute
return Database.Cursor.execute(self, query, params)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/base.py”, line 69, in
return lambda s: conv_func(s.decode(‘utf-8’))
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/utils.py”, line 7, in parse_datetime_with_timezone_support
dt = parse_datetime(value)
File “/home/seafile/seafile-server-6.0.1/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/dateparse.py”, line 109, in parse_datetime
return datetime.datetime(**kw)
ValueError: year is out of range

thank you for your fast response!

I get this too @daniel.pan

api/v2.1/admin/devices/?platform=desktop&page=1&per_page=50&_=1472728018393 Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)

And in Admin view: Uncaught SyntaxError: Unexpected token < in JSON at position 0.

Cannot sync any client (mobile nor desktop) and devices are not viewable in web ui.

This is 6.0.2 and no beta!

Django Request Log:

ValueError: year is out of range 2016-09-01 13:19:39,465 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/repos/ Traceback (most recent call last): File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, **kwargs) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/seahub/api2/base.py", line 23, in dispatch response = super(APIView, self).dispatch(*a, **kw) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 466, in dispatch response = self.handle_exception(exc) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/seahub/api2/base.py", line 20, in handle_exception return super(APIView, self).handle_exception(exc) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 454, in dispatch self.initial(request, *args, **kwargs) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 376, in initial self.perform_authentication(request) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 310, in perform_authentication request.user File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 353, in __getattribute__ return super(Request, self).__getattribute__(attr) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 193, in user self._authenticate() File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 316, in _authenticate user_auth_tuple = authenticator.authenticate(self) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/seahub/api2/authentication.py", line 63, in authenticate ret = self.authenticate_v2(request, key) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/seahub/api2/authentication.py", line 92, in authenticate_v2 token = TokenV2.objects.get(key=key) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/manager.py", line 127, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py", line 328, in get num = len(clone) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py", line 144, in __len__ self._fetch_all() File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py", line 965, in _fetch_all self._result_cache = list(self.iterator()) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/query.py", line 238, in iterator results = compiler.execute_sql() File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/models/sql/compiler.py", line 840, in execute_sql cursor.execute(sql, params) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/base.py", line 318, in execute return Database.Cursor.execute(self, query, params) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/base.py", line 69, in <lambda> return lambda s: conv_func(s.decode('utf-8')) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/db/backends/sqlite3/utils.py", line 7, in parse_datetime_with_timezone_support dt = parse_datetime(value) File "/srv/seafile/domain.tld/haiwen/seafile-server-6.0.2/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/utils/dateparse.py", line 109, in parse_datetime return datetime.datetime(**kw) ValueError: year is out of range

UPDATE: updated to 6.0.2. same issue.

UPDATE 2: the workaround mentioned here worked, but i thought the problem should get fixed in the next (6.0.2?) release?

Did you use the 6.0.0 release before?

The database upgrade script in 6.0.0 is wrong. If you ever run that version, you have to fix the database table manually. The minor upgrade script does not touch database.

If you upgrade from 5.1.x to 6.0.1 or 6.0.2 directly, there should be no such problem.

Daniel,

I just upgraded from 5.1.4 to 6.0.2 but I’m experiencing the same problem.

Edit:

This won’t change existing columns does it?

Hi Daniel

I just did the upgrade fra 5.1.4 to 6.0.2 and I have the exact same error:
ValueError: year is out of range in seahub_django_request.log

I upgraded from 5.1.x to 6.0.1 beta and then to 6.0.2 with all the given scripts.

I upgraded from 5.1.4 to 6.0.2, no update steps inbetween.

Same for me: Upgrade from 5.1.4 to 6.0.2. Everything stopped working.

We will look into the problem and fix it soon.

A fixed version is ready.

For users that already have the problem, use the following command to fix it.

sqlite3 /path/to/seahub.db
UPDATE api2_tokenv2 SET created_at='0001-01-01 00:00:00' WHERE created_at='0000-00-00 00:00:00';
.quit

@daniel.pan what about MySQL. Should I run this query there as well?

MySQL doesn’t have this kind of bug.

1 Like