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

Web does nothing when import "Extended Streaming History" #398

Closed
kevinlf3 opened this issue May 12, 2024 · 11 comments
Closed

Web does nothing when import "Extended Streaming History" #398

kevinlf3 opened this issue May 12, 2024 · 11 comments

Comments

@kevinlf3
Copy link

kevinlf3 commented May 12, 2024

Hi, I received my Extended Streaming History from Spotify, 8 JSON files.

Imagen de WhatsApp 2024-05-12 a las 19 56 55_12d44c19

But when I select the option to import the Extended History, 1 by 1 or the 8 files all together does nothing, there is a micro refresh but nothing happens, and a green letters told me "Everything looks fine for the import to work".

A few days ago I import the Account Data and everithing was great.

fa64ee6cf75d320eadc04fbda5c88948

Here is the error:

Sin título

What I'm doing wrong? Or what's the problem?

Thanks!

@MIJmker
Copy link

MIJmker commented May 19, 2024

Hi Kevin,

CORS (Cross-Origin Resource-Sharing) is blocking the requests. Are the request send from one subdomain to another subdomain? I had the same issue with the API and frontend, so I had to add an environment variable to the docker-compose:

  • CORS=spotify.example.com,spotify-api.example.com

This allows both spotify.example.com and spotify-api.example.com to "communicate" in a sense. ofcourse replace those with your actual subdomains.

Hope this helps

@RagingCactus
Copy link
Contributor

I'm pretty sure CORS is not the main issue here. Everything else in your installation works, right? You can log in and look at the data in the dashboard? In that case CORS is already configured correctly. It should work out of the box without additional configuration for most deployments.

I assume the root cause is the 413 "Payload Too Large" error. CORS might not work properly as the request is already blocked/dropped because the request exceeds the size limit. This in itself might be worth looking into, but I suspect this is not the root cause.

I think the current code in YourSpotify limits each individual file to 20 MB so it should work:

const upload = multer({
dest: "/tmp/imports/",
limits: {
files: 50,
fileSize: 1024 * 1024 * 20, // 20 mo
},
});

Are you using any kind of reverse proxy or web server in front of YourSpotify that might restrict the file size further?

@Yooooomi
Copy link
Owner

Hello, are you using linuxserver image?

@kevinlf3
Copy link
Author

Hello, are you using linuxserver image?

No, i'm using your image:

image

Thank you!

@Yooooomi
Copy link
Owner

Your mongo does not seem well am I right?

@kevinlf3
Copy link
Author

Your mongo does not seem well am I right?

It's not upadated to the latest version, but does not interfere.

@kevinlf3
Copy link
Author

I tested to upload the file with only one song, the JSON file only weighs 1kb and upload succesfully.

I think there is a limitation of the file weight or the ammount of songs you can import.

I hope I can help you!

@Yooooomi
Copy link
Owner

If you're using nginx, there is a default limit that you have to override for the api reverse proxy.

@kevinlf3
Copy link
Author

If you're using nginx, there is a default limit that you have to override for the api reverse proxy.

Do you know how to do that?

@Yooooomi
Copy link
Owner

There is a parameter you can add to the location definition of your api: https://stackoverflow.com/a/37916740/5641146

@kevinlf3
Copy link
Author

There is a parameter you can add to the location definition of your api: https://stackoverflow.com/a/37916740/5641146

Thank you, It works!

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

4 participants