-
Notifications
You must be signed in to change notification settings - Fork 695
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
Cannot download files using send_data
#1910
Comments
Hi @hirowatari thank you for opening this issue. Have you tried adding |
Hi @matteodepalo, Thanks for looking at this.
Yes, I've tried that. I've tried quite a few other things as well and would be happy to list those if that's helpful
Perhaps I should back up and ask a question in return. What I'm trying to accomplish is to have a route protected by the Thanks again for your attention to this. I've always appreciated Shopify support going back many years. |
I haven't seen this issue with |
Yes. Sorry I wasn't clearer. In the first post I tried to explain that |
Thank you for your reply @hirowatari , I've flagged this internally so that the team can look at it. |
Hey @hirowatari, I noticed in your log that the id_token is not available
The |
I'm not mistaken, the session is there and shown in the first line of the logs.
I believed, the session would need to be there and valid otherwise the request would fail (403). I'm not having an issue with the request failing. The issue is with the request is shown in the browser when it should be downloaded. I'm concerned that we're not making any progress here. Is there a way I could show you the issue that you would believe? Perhaps with a sample Rails application? Do you have a template or any guidance here? |
The JWT id token that the Gem uses is either in:
Here are some references for authentication |
Hmm yea that is quite strange.. If you could provide a sample Rails application that'd be really helpful. Thanks |
Hopefully, this repo will show the issue: https://github.com/hirowatari/bug-report-shopify-send-file |
Thank you @hirowatari, I can see the issue, I'll bring this to the team and see what's the best solution. |
Thanks @zzooeeyy. Was there are progress on this? Or any advice on how to workaround the issue? |
Issue summary
Before opening this issue, I have:
shopify_app
version: 22.4.0Linux inni 6.6.50-1-lts #1 SMP PREEMPT_DYNAMIC Sun, 08 Sep 2024 12:27:02 +0000 x86_64 GNU/Linux
log_level: :debug
in my configuration, if applicableGiven a rails app with
and a link to that route:
<a href="/location_import_files/5/failed_rows_csv?session=whatever&shop=prolo-dev.myshopify.com">download</a>
Expected behavior
What do you think should happen?
The file should be downloaded
Actual behavior
What actually happens?
The file is shown in the browser
Steps to reproduce the problem
I think I've detailed it above, but please let me know if you would like more details.
Debug logs
logs where the issue is shown
However if I uncomment
skip_around_action :activate_shopify_session
then file successfully downloads with the following logsThe text was updated successfully, but these errors were encountered: