Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to import Notion data in self-hosted instance - Minio presigned URL error #991

Open
domsilvestre opened this issue Nov 13, 2024 · 9 comments
Assignees

Comments

@domsilvestre
Copy link

Bug Description

When trying to import a Notion export file in a self-hosted AppFlowy instance, the import fails with a Minio presigned URL error. The import works fine on AppFlowy Cloud but fails on self-hosted setup.

How to Reproduce

  1. Set up AppFlowy-Cloud with Minio storage on AWS EC2
  2. Configure Minio in docker-compose.yml and .env
  3. Open AppFlowy desktop app
  4. Try to import Notion export file
  5. Get "3 tasks pending" message
  6. After a while, get error with presigned URL

Expected Behavior

The Notion export should be successfully imported into the self-hosted AppFlowy instance, just like it works on AppFlowy Cloud.

Operating System

  • Server: Amazon Linux 2023 (EC2) - Client: macOS

AppFlowy Version(s)

  • AppFlowy Desktop: 0.7.3 - AppFlowy-Cloud: Latest from main branch

Screenshots

CleanShot 2024-11-13 at 12 19 40

Additional Context

  • Successfully imported the same Notion export on AppFlowy Cloud
  • Minio is properly configured and running (ports 9000 and 9001)
  • AWS security group has all necessary ports open
  • Tried clearing pending tasks in database
  • Tried different Minio configurations and CORS settings
  • Unable to transfer data from cloud to self-hosted instance
@LucasXu0 LucasXu0 transferred this issue from AppFlowy-IO/AppFlowy Nov 14, 2024
@appflowy appflowy self-assigned this Nov 14, 2024
@appflowy
Copy link
Contributor

@domsilvestre If you are in development mode, you can check the frontend app debug console. It seems like a upload file issue

@benterova
Copy link

Also having this issue, guessing it has something to do with Docker networking as the hostname of minio would only be resolvable within the container network context. I see there's a variable in the docker-compose.yml for a redirect for browsers, perhaps it isn't being used here?

@aintlikeu
Copy link

I had the same problem. I had to remove minio from docker-compose.yml and run it as a separate service, then everything worked.

@fabiencharrasse
Copy link

I had the same problem. I had to remove minio from docker-compose.yml and run it as a separate service, then everything worked.

I've got the same problem, can you share how do you setup minio / docker-compose ? Thanks !

@rockerest
Copy link

rockerest commented Dec 22, 2024

Another +1 here!

I'm interested to hear how @aintlikeu modified the Docker setup to make this work, BUT I think I'd prefer to find a fix on the "blessed path" so my local setup is easily upgradable.

As an additional note: I do not have AWS set up, my install is fully local with basically all of the defaults. The same error appears but without step 5 ('Get "3 tasks pending" message').

@fabiencharrasse
Copy link

The same error appears but without step 5 ('Get "3 tasks pending" message').

@rockerest

If you try to import more than 3 times, you will get the error. There's a queue of 3 tasks max for import, you can delete a task from the database to remove the message.

@aintlikeu
Copy link

@fabiencharrasse @rockerest
My docker compose files. I forgot to mention that I also added a network to the AppFlowy docker-compose.yml file.

appflowy-docker-compose.txt
minio-docker-compose.txt

@philiprenich
Copy link

philiprenich commented Jan 9, 2025

  - MINIO_BROWSER_REDIRECT_URL=${MINIO_BROWSER_REDIRECT_URL}

I haven't seen this one before. What's it being set to and is it new to your setup?

I'm unsure how your setup solves the issue. If the problem is the upload URL is http://minio:9000 and that's for the internal Docker setup, you'd need to expose that to the host and add a reverse proxy to Nginx still, yes?


EDIT
I see the default docker compose file has that same env variable and uses ${API_EXTERNAL_URL}/minio

I can hit that in the browser (expectedly throws a bunch of errors as I doubt it's meant to be used like that), but the upload in-app fails with a DNS issue.

image

@philiprenich
Copy link

I've pulled down the latest code to give this another spin (release 0.9.10) and am getting the same error. Previously I wasn't able to access the Minio administration at all, but it is working in this version. However, I've had to change the Minio port in the .env file to 9001 as that is what Nginx is configured for (with Portainer on 9000).

I'm not sure if this is related, but from the Appflowy Cloud web UI, which I have setup on appflowy.my-domain.com, the URL to the extra services and Minio is https://appflowy.my-domain.com/minio for example. But that doens't work and somehow the system tries to redirect to http://local-network-ip/minio - this also fails until I change it to http://local-network-ip:8000/minio I'm using an Nginx reverse proxy to point appflowy.my-domain.com to the Appflowy dockerised Nginx since that's all running further down the network (hence the non-standard port).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants