filestash
filestash copied to clipboard
[bug] Share link button doesn't work on browsers with adblockers
Description of the problem
This was initially a bug report for something I though was a bug, but it happens that the Filestash share button fails to load when Filestash is used on a browser with uBlock Origin installed and activated for the website. It's easy to solve on user side, but I believe it could be considered an improvement if it doesn't happen at first. I don't know how long it would take to fix it, so please dismiss this if over complicated. I took me some time to find out why, and worst case scenario, my experience is useful to others who have the same issue.
Step by step instructions to reproduce the bug
This was my environment.
- Install the arm docker version that I know is not official. But it is maintained.
- Compose configuration:
filestash:
image: ugeek/filestash:arm
container_name: filestash
environment:
- PUID=1000
- PGID=1000
- APPLICATION_URL=
- GDRIVE_CLIENT_ID=<gdrive_client>
- GDRIVE_CLIENT_SECRET=<gdrive_secret>
- DROPBOX_CLIENT_ID=<dropbox_key>
- ONLYOFFICE_URL=http://onlyoffice
volumes:
- $CONFIG_FOLDER/filestash:/app/data/state
ports:
- "8334:8334"
restart: unless-stopped
- Configure reverse proxy to filestash.
Reverse proxy configuration:
## Version 2022/06/10
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name filestash.*;
include /config/nginx/ssl.conf;
client_max_body_size 102400M;
#enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
#enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
#enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app filestash;
set $upstream_port 8334;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
- Try to find the share function.
Filestash about:
Commit hash | 7d6b8dba68b5e6dff639982307515fd1df7beb09 |
---|---|
Binary hash | 0078074dd4fa27206f3b9022f2ea146b4342e1f9c38a65c6b7968e378c523a04 |
Config hash | 87216563d19deaca8cdf2f35fc7fbc370d5282e4bd57866cc6cdc85fac5fb6e7 |
Can you replicate that error from the demo?
Yes as the error is user side. Error doesn't happen on Chromium with no adblocker.
Observed behavior
Error log:
2022/06/10 20:01:48 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.2ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.3ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.3ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:48 INFO HTTP 200 GET 723.2ms /api/files/ls?path=%2FCours%20de%20Fran%C3%A7ais%2F
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.2ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.0ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:49 INFO HTTP 200 POST 0.1ms /report?message=cannot%20load%20icon%20share
2022/06/10 20:01:50 INFO HTTP 200 GET 482.2ms /api/files/ls?path=%2FCours%20de%20Fran%C3%A7ais%2FA-italki%2F
2022/06/10 20:01:50 INFO HTTP 200 GET 0.1ms /admin/api/session
2022/06/10 20:01:52 INFO HTTP 200 GET 0.4ms /admin/api/logs?maxSize=102400
2022/06/10 20:01:55 INFO HTTP 200 GET 0.1ms /admin/api/session
Expected behavior
Share button should be present.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.