Bug Report: Sharing links broken with 5.0.7

Hey,

Tonight we upgraded our installation to 5.0.7 and have some issues with shared views of one base now.

We shared views of this base read only to a user group. If we access this view there is only a message “Die Base wurde nicht gefunden.” (base not found). Same applies to views shared by external link.

Best regards

Ansgar

Did you configure the API-gateway as described in Extra Upgrade Notices - SeaTable Admin Manual for version 4.4?

Yes, location /api-gateway/ is configured and also “Force usage of API-Gateway endpoints” as described for 5.0.

It is likely the API-gateway process does not start correctly in your server. You can check logs/dtable-api-gateway.log for error logs.

In addition to the problem description of ansgr:

The problem is that opening any of the shared urls, i.e.
https://seatable.…/dtable/view-external-links/92f…/
will yield an API call to
https://seatable.…/api/v1/dtables/266…/?lang=de&authorization=Token%20eyJh…

But this API call returns 404 with the following body:

Using the URLconf defined in `seahub.utils.rooturl`, Django tried these URL patterns, in this order:

1. ^ ^accounts/
2. ^ ^sso/$ [name='sso']
3. ^ ^sso-auto-login/$ [name='sso-auto-login']
4. ^ ^external-team-admin/$ [name='external-team-admin']
5. ^ ^shib-login/ [name='shib_login']
6. ^ ^mobile-login/ [name='mobile_login']
7. ^ ^$ [name='dtable']
8. ^ ^robots\.txt$
9. ^ ^serviceworker\.js$ [name='serviceworker']
10. ^ ^manifest\.json$ [name='manifest']
11. ^ ^offline/$ [name='offline']
12. ^ ^image-view/(?P<filename>.*)$ [name='image_view']
13. ^ ^custom-css/$ [name='custom_css']
14. ^ ^i18n/$ [name='i18n']
15. ^ ^choose_register/$ [name='choose_register']
16. ^ ^server-info/$ [name='server_info']
17. ^ ^dtable/$ [name='dtable_bases']
18. ^ ^dtable/(?P<workspace_id>\d+)/$ [name='dtable_workspace']
19. ^ ^dtable/starred/$ [name='dtable_starred']
20. ^ ^dtable/shared/$ [name='dtable_shared']
21. ^ ^dtable/trash/$ [name='dtable_trash']
22. ^ ^forms/$ [name='forms']
23. ^ ^universal-apps/$ [name='universal-apps']
24. ^ ^user-guide/$ [name='user-guide']
25. ^ ^activities/$ [name='dtable_activities']
26. ^ ^common-datasets/$ [name='dtable_common_datasets']
27. ^ ^dtable/apps/$ [name='dtable_apps']
28. ^ ^dtable/templetes/$ [name='dtable_templetes']
29. ^ ^invitation-link/$ [name='invitation-link']
30. ^ ^more/$ [name='more']
31. ^ ^more/data-sync/$ [name='more/data-sync']
32. ^ ^workflows/$ [name='workflows']
33. ^ ^workflows/shared/$ [name='workflows/shared']
34. ^ ^workflows/ongoing-tasks/$ [name='workflows/ongoing-tasks']
35. ^ ^workflows/submitted-tasks/$ [name='workflows/submitted-tasks']
36. ^ ^workflows/panel/$ [name='workflows/panel']
37. ^ ^departments-v2/$ [name='departments-v2']
38. ^ ^api2/
39. ^ ^api/v2.1/slide-captcha/$ [name='api-v2.1-slide-captcha']
40. ^ ^api/v2.1/user/$ [name='api-v2.1-user']
[...]
The current path, api/v1/dtables/266…/, didn’t match any of these.

Since version 5.0, external links will load base content from api-gateway, you should configure the Nginx correctly to use api-gateway.

In you case, the request is still sent to dtable-web component instead to api-gateway.

The nginx configuration is the same as in the 5.0.7 blueprint of the seatable-enterprise docker image. It is configured as stated in the upgrade notices for 5.0 and 4.4 here: Extra Upgrade Notices - SeaTable Admin Manual

/api-gateway/ is not called when opening any shared url, i.e. https://seatable.…/dtable/view-external-links/92f…/

The only call being made is to
https://seatable.…/dtable-server/dtables/266…
which gets redirected to the already mentioned
https://seatable.…/api/v1/dtables/266…/?lang=de&authorization=Token%20eyJh…

Can you paste the URLs in code blocks? Otherwise, I don’t see the full URLs.

I just noticed it seems to work for newly created shared links, but not for all the old ones created before the update.

The problem appears only with one of our bases (7 tables, 61,088 rows). Sharing of a view is not working with this base, also when creating a new share (to a group or as an external link). Even when we copy this base it doesn’t work.

With a new base (and some other old bases) everything works fine.

Sorry for my mistake.

Sharing view has not be changed from version 4.4 to version 5.0. Only the way of visiting a base sharing link has been changed to using api-gateway. So api-gateway is not related to the issue.

@ansgr What error can you see in the browser’s console. If 404 is returned, which URL is used for loading content of a view?

@daniel.pan I see a 404 on this URL:

https://.../api/v1/dtables/266c7b9aad2a46b0bb5cbd1ea18ffaf5/?lang=de&authorization=Token%20eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjE1NjE2NDEsImR0YWJsZV91dWlkIjoiMjY2YzdiOWEtYWQyYS00NmIwLWJiNWMtYmQxZWExOGZmYWY1IiwicGVybWlzc2lvbiI6InIiLCJvcmdfaWQiOi0xLCJvd25lcl9pZCI6IjVAc2VhZmlsZV9ncm91cCIsInVzZXJuYW1lIjoiMjdjMDkxYzg4MTNlNGYyMWFlM2QzODhjMTQ0M2YxMTZAYXV0aC5sb2NhbCIsImlkX2luX29yZyI6IiIsInRhYmxlX2lkIjoibEJ4UyIsInZpZXdfaWQiOiJIdXRPIiwidXNlcl9kZXBhcnRtZW50X2lkc19tYXAiOnsiY3VycmVudF91c2VyX2RlcGFydG1lbnRfaWRzIjpbXSwiY3VycmVudF91c2VyX2RlcGFydG1lbnRfYW5kX3N1Yl9pZHMiOltdfX0.j8Q7T66RsxbnKbyOMLU1gKUnTVJPXjKNhKQk5ntXJcw

This is a bug. We will release a new version fixing the issue in the next week.

2 Likes