-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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]: api can't download remote file #1394
Comments
Can you try downloading the beta API package from this build (the |
Thanks @j-f1 for getting back on this matter so quickly. I've unzipped the This is the error log I see now:
|
Thanks for checking that! I now see where the error happened. Can you try out this build? That adds a bit more logging. My guess is that somehow the file ID is incorrect, since that’s the main way this could fail (assuming your connection to the server is correct) |
Ahh. The error shows something odd
When I open the path
Same, when I use
First thing I tested: change the password that is sent to the server to some gibberish. I do get a different error response:
I double-checked the password in my original script: it is the one I use to authenticate to the remote-server. Second thing: I looked at the request headers that are passed with the I am also puzzled, because the web app makes requests to I'll be AFK until tomorrow morning CEST. Thanks for the quick support :) |
Yep… you’re actually not the first person with that particular issue. (See https://discord.com/channels/937901803608096828/1123193332697419776/1123193332697419776). Something weird must be happening on Fly’s end. The only thing I can think of trying is changing what headers we send to see what the difference is between the browser/curl and Node? Did some research, and it looks like it may be this bug which was just fixed & released: node-fetch/node-fetch#1735 Can you try again with this build? It has the updated version of |
Oh wow - great find! I attempted to test the build, but I get this error:
I'm not sure, but it seems like the I have first tried with node version 20.2.0, then 20.5.0 and now I switched to the LTS version of node. My
|
Yep, that’s my fault. Can you give the build from here a shot? I’ve updated the code so that it uses |
I'm always puzzled by web pack options. Thanks for looking into this!
|
Sorry about that! Gave the code in this build a more through test and you should not be seeing that issue now. |
awesome - this works like a charm! |
Hi! I'm still getting the same problem using the latest (6.3.0) version of API. Just wondering if the was released? |
Verified issue does not already exist?
What happened?
I try to write a script that interacts with a remote server via
@actual/api
like described here.Server version: v23.7.2
@actual/api
version: 6.1.1The script I use:
I execute the script via node v20.2.0.
I tried the following:
What error did you receive?
Error: Something went wrong trying to download that file, sorry! Visit https://actualbudget.org/contact/ for support. (fileId: a96b84c9-c873-41a2-9314-da454c5bc386)
at handlers.api/download-budget (/Users/tobi/projects/actual-to-google-sheets/node_modules/@actual-app/api/dist/app/bundle.api.js:32814:31)
Where are you hosting Actual?
Fly.io
What browsers are you seeing the problem on?
Other
Operating System
Mac OSX
The text was updated successfully, but these errors were encountered: