Deployment Issues with TagSpaces Web - Seeking Assistance

Hi,

I’m currently encountering challenges while attempting to deploy TagSpaces Web and could use some guidance.

Here’s an overview of my setup:

  • I’m running a VM with the IP 192.168.64.8.
  • I’ve exposed a folder via s3proxy on this VM.
  • Two Docker containers are running on the same VM: s3proxy (172.17.0.2) and tagspaces-web:5.5.2 (172.17.0.3). Both containers can successfully ping each other within the 172.17.0.0 network.
  • When accessing TagSpaces on my host machine’s browser (which can ping 192.168.64.8 but not 172.17.0.2, as expected), I can create a new location using http ://192.168.64.8:9000 as the endpoint URL for my s3 bucket. Despite some CORS error messages in the browser console (even with S3PROXY_CORS_ALLOW_ALL=“true”), everything works.

However, issues arise when attempting to use http ://172.17.0.1:9000 or http ://172.17.0.2:9000. The problem persists even when configuring the location in the extconfig.js file.

To extend the service to my team and deploy it on an AWS VM, I replicated the exact configuration. Despite the TagSpaces pages appearing when accessed via the public IP of the host, I’m unable to access the files exposed via s3proxy, regardless of the IP used. Even when using the open port 9000 on the public IP (not a viable long-term solution), the browser console displays the errors below, and the Docker logs remain clear.

I’m wondering if there’s something I’m overlooking or if my goal is unattainable with this version of TagSpaces. Any insights or guidance would be greatly appreciated.

Thanks a lot.

[Error] XMLHttpRequest cannot load http ://X.X.X.X:9000/4_Planches?list-type=2&delimiter=%2F&prefix= due to access control checks.
[Error] Failed to load resource: Preflight response is not successful. Status code: 403 (4_Planches, line 0)
[Error] Preflight response is not successful. Status code: 403
[Error] XMLHttpRequest cannot load http ://X.X.X.X:9000/4_Planches?list-type=2&delimiter=%2F&prefix= due to access control checks.
[Error] Failed to load resource: Preflight response is not successful. Status code: 403 (4_Planches, line 0)
[Error] Preflight response is not successful. Status code: 403
[Error] XMLHttpRequest cannot load http ://X.X.X.X:9000/4_Planches?list-type=2&delimiter=%2F&prefix= due to access control checks.
[Error] Error listing directory  bucketName:4_Planches – NetworkingError: Network Failure
NetworkingError: Network Failure
	(fonction anonyme) (bundle.js:75:238357)
[Error] Error loading directory:  – NetworkingError: Network Failure
NetworkingError: Network Failure
	(fonction anonyme) (bundle.js:75:1694867)
	(fonction anonyme) (bundle.js:75:1693935)
[Error] Failed to load resource: Preflight response is not successful. Status code: 403 (4_Planches, line 0)

PS: Had to alter the urls because I’m not allowed to make a post with more than 2 links :slight_smile:

Can you please attach a screenshot of the location settings in TagSpaces?

The 2 link restriction is funny, I will check if I can disable this restriction.

Sure.
Here it is.

Ok, now I see what the problem could be… You should create the location with the 192.168.64.8 IP since this is the IP which is accessible from your browser. The browser is making a direct connection to the S3proxy bucket. TagSapces Web is not a back-end application, it hast only front end which is downloaded to browser and the communication runs from there.

Yes, that was my conclusion. So if I want to provide it as a web service, I need to make the volume exposed through the Internet too, right?

Also, adding the location in extconfig.js won’t change anything except not asking the users to add the location at start, right?

Thanks a lot for your help.

Hi,
Me again.
So I run my instance on AWS and I have, for now, open ports 5000 and 9000 to my personal IP.
From home, I can access http://aws_ip:5000 where my Tagspaces is hosted and I’m able to add a location with this endpointURL http://aws_ip:9000.

Now, I want this location to be configured in my extconfig.js file. So I add this to my file:

window.ExtLocations = [
  {
    uuid: "860b95c1-c2e7-4629-8bd2-594943fd3569",
    type: "1",
    name: "Planches",
    path: "Planches",
    accessKeyId: "username",
    secretAccessKey: "password",
    bucketName: "4_Planches",
    endpointURL: "http://aws_ip:9000",
    region: "",
    isDefault: false,
    isReadOnly: true,
    disableIndexing: false,
    fullTextIndex: false,
    watchForChanges: false,
  }
  ],

When I access my TagSpaces, I can see the location but it’s not loading. I have the following CORS error in my browser console.

[Error] XMLHttpRequest cannot load http://35.181.166.43:9000/4_Planches/Planches/.ts/tsm.json due to access control checks.

Am I doing something wrong in my configuration or am I again trying to achieve something not doable?
Thanks.

Yes, for the extconfig.js, but keep in mind that this way anybody knowing that extconfig.js exist can access it and read the access keys for your bucket.

1 Like

This is not a problem:
[Error] XMLHttpRequest cannot load http://35.181.166.43:9000/4_Planches/Planches/.ts/tsm.json due to access control checks.
TagSpaces checks for any folder if it has a tsm.json, which contains the tags for the folder. And if the file does not exist you will see this error in the dev console.
Are able to access other files in this bucket ?

When I add this bucket from the webpages, it works perfectly. When it’s configured in the extconfig.js file, it does not load.

you can export the location configuration as json and use the location part for the extconfig.js

Thanks a lot. I’ll test later.

Unfortunately, that’s a pro feature only and for now, I’m use the free version for evaluating the solution.

Hi,
Me again trying to make my Tagspaces web working with domain name and not IPs.
So my server is running on an aws VM with tagspaces on port 5000 and s3-proxy on port 9000. When using the IPs, everything works.
I created a subdomain for both services: ts dot mydomain dot com and s3.mydomain.com
ts.mydomain.com is working, when I curl https://s3.mydomain.com/my_s3_bucket, I’m able to see the files in there. But when I add a location in Tagspaces using this url, I have a Network failure message. Using the IP:Port url does not work neither.

Any idea why it’s not working?
Thanks.

Dear @ilian, sorry to ping you but I’m stuck with that. I hope you have some time to help me with it.
Thanks.

Have you checked if this is a CORS issue?

I can send you a PRO version in order to export the your configuration from the desktop version and use in the extconfig.js if you wish.

It looks like a CORS issue but my S3 Proxy is configured with S3PROXY_CORS_ALLOW_ALL=“true” so it should not be.

That would be great. Thanks a lot.

So it was an issue with the headers. I had to set S3PROXY_IGNORE_UNKNOWN_HEADERS to true and now it’s okay.
Thanks.