Raspberry - Seafile 6.0.3 and the Android Client

Hi,

I am using the seafile client on my android phone but now the client isn’t working anymore. On my server (apache) I can see the following error meassage:

[Sun Sep 11 22:00:04 2016] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/api2

The client can’t establish a connection to the Seafile server. I think this problem is there since version 6 of Seafile server. Is there a new API in seafile which is not supported by the abdroid client yet?

The logcat output from my phone shows the following error message:

HTTP request failed : https://domain.com/seafile/api2/auth-token/, 500, INTERNAL SERVER ERROR

where domian.com is my server. Seafile runs on a non root domain.

The log file (seahub_django_request.log) shows:

2016-09-13 16:11:58,951 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /seafile/api2/auth-token/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-6.0.3/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.3/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.3/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.3/seahub/seahub/api2/base.py", line 23, in dispatch
    response = super(APIView, self).dispatch(*a, **kw)
  File "/home/seafile/seafile-server-6.0.3/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.3/seahub/seahub/api2/base.py", line 20, in handle_exception
    return super(APIView, self).handle_exception(exc)
  File "/home/seafile/seafile-server-6.0.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 463, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/seafile/seafile-server-6.0.3/seahub/seahub/api2/views.py", line 190, in post
    if serializer.is_valid():
  File "/home/seafile/seafile-server-6.0.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/serializers.py", line 213, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/home/seafile/seafile-server-6.0.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/serializers.py", line 410, in run_validation
    value = self.validate(value)
  File "/home/seafile/seafile-server-6.0.3/seahub/seahub/api2/serializers.py", line 100, in validate
    client_version, platform_version)
  File "/home/seafile/seafile-server-6.0.3/seahub/seahub/api2/utils.py", line 501, in get_token_v2
    client_version, platform_version, get_client_ip(request))
  File "/home/seafile/seafile-server-6.0.3/seahub/seahub/api2/models.py", line 84, in get_or_create_token
    token = self._get_token_by_user_device(username, platform, device_id)
  File "/home/seafile/seafile-server-6.0.3/seahub/seahub/api2/models.py", line 77, in _get_token_by_user_device
    device_id=device_id)
  File "/home/seafile/seafile-server-6.0.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/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 "/home/seafile/seafile-server-6.0.3/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.3/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

I am experiencing the same problem on my Raspberry Pi running Seafile-Server 6 deployed by nginx in my local network.
The Seafile-Clients (all version 5.1.4) keep all subscribed libraries in sync, but do not display any information about the available libs.

In one client I removed the server and tried to set it up once again. When trying to connect I receive the message “Internal Server Error”.

The nginx Logfile (seahub.access.log) shows only the follwing message:
10.0.0.23 - - [04/Oct/2016:11:48:00 +0200] "POST /api2/auth-token/ HTTP/1.1" 500 380 "-" "Mozilla/5.0"

Accessing the server via Browser works (slow, but fine).

Any suggestions?