Server error when viewing shared links for some users

In the Seahub admin panel when I try to watch shared links for a given user there appear a message " No shared links". However, there is an error message in the seahub.log on the server:

2021-09-27 01:44:06,764 [ERROR] django.request:222 log_response Internal Server Error: /api/v2.1/admin/users/
Traceback (most recent call last):
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/core/handlers/", line 34, in inner
    response = get_response(request)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/core/handlers/", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/core/handlers/", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/views/decorators/", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/django/views/generic/", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/rest_framework/", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/rest_framework/", line 465, in handle_exception
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/rest_framework/", line 476, in raise_uncaught_exception
    raise exc
  File "/home/seafile/seafile-server-8.0.7/seahub/thirdpart/rest_framework/", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/seafile/seafile-server-8.0.7/seahub/seahub/api2/endpoints/admin/", line 1317, in get
    link_info = get_user_share_link_info(fs)
  File "/home/seafile/seafile-server-8.0.7/seahub/seahub/api2/endpoints/admin/", line 149, in get_user_share_link_info
    data['size'] = seafile_api.get_file_size(repo.store_id,
  File "/home/seafile/seafile-server-8.0.7/seafile/lib64/python3.6/site-packages/seaserv/", line 192, in get_file_size
    return seafserv_threaded_rpc.get_file_size(store_id, version, file_id)
  File "/home/seafile/seafile-server-8.0.7/seafile/lib64/python3.6/site-packages/pysearpc/", line 128, in newfunc
    return fret(ret_str)
  File "/home/seafile/seafile-server-8.0.7/seafile/lib64/python3.6/site-packages/pysearpc/", line 12, in _fret_int
    raise SearpcError(dicts['err_msg'])
pysearpc.common.SearpcError: Invalid file id

For some other users, there is no such problem.

Some more info: in the admin panel when listing all shared links, I can see links for this user. But they appear to link to non-existing files. I suspect that this is the problem root.

Anyway, are such errors in the logs normal behavior in this situation? Is there any option to delete “defective” shared links? And, finally, it is a bit confusing that for the given user the links are shown in the main list in the admin panel, but not for a per-user view.

I’ve been working with Seafile for many years and this problem has never occurred to me. So you must be the unfortunate exception that confirms the rule.

Absolutely. Enter System Admin and choose “Links” in the menu on the left. This is the complete list of links in your Seafile system. When you mouse over a link, you’ll see a trash bin on the far right. Click it to kill the link.