-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Unable to download file from the parse-server #2743
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
Comments
can you provide the logs from parse-server when running with VERBOSE=1? |
Here are the logs for the request of the class objects which contains my file:
The problem here I see is that files have url with domain as
|
You should set the publicServerURL option when initializing Parse Sever |
Thanks. That worked! |
Exception was created because of PFFile having "http://" protocol instead of https. But thanks to this reply [1] got clear that the problem was the lack of "publicServerURL" property on parse-server. [1] parse-community/parse-server#2743
@flovilmart can you please specify what is the environment variable name corresponding to publicServerURL? I have some projects which I config myself and this solution seems to work. But I also have some which I deployed by clicking the purple "deploy to heroku" button. I would like to test this solution there before I create the files to config those servers myself. Thanks |
@flovilmart thanks for quick response. I'm afraid I just added that env var for 2 of my apps deployed using the "deploy to heroku" button and restarted those dynos but both still encountering the ATS problem |
@flovilmart I just manually re-configured both of those deployments previously done with the "deploy to heroku" button. Verified both set ups working via cloud code. One of them now works with ATS allow arbitrary loads set to false. The other one however is still unable to download data. The errmsg now does not mention ATS any more but instead:
Any further suggestions? Thanks |
@plaudev please provide the logs from parse-server. ATS issues have nothing to do here. |
@flovilmart thx for response. Here are the logs on heroku:
And these from xcode console:
|
@flovilmart, just an update as I continue to try figuring this out... seeing very odd results... For the parse instance that previously I said the However when I run exactly the same app on the simulator (iOS 9.3) signing in as exactly the same users with ATS kept on, I could not load a single image and got these same error msgs again for every image I try to download:
How could that be? Why would the same code in simulator try to load via http instead of https? |
Can you ensure the SSL certificates are valid? See: https://forums.developer.apple.com/thread/22324. Your file URL look OK |
Can confirm this solved it for me when my images were not loading on a simulator from Parse on Heroku. Add this to Parse Server's index.js file where you create the server:
|
I have not marked the above one as complete because I host my parse-server instance on a machine which is accessible using a global domain and not on any infrastructure provider like Heroku or AWS.
Issue Description
I have a parse-server hosted on one of the machines with a locally installed mongodb instance. I have a
class
which containsFile
in one of the columns. The problem is that I am unable to download the file using the Parse SDK for Android (I haven't tried with other SDKs yet!). The machine has an apache server installed which listens to the requests using a global domain name and then redirects the requests to the local domain usinglocalhost:<port>
. I am able to fetch the data of theParseObject
(s) successfully but when I try to download the file usingParseFile.getDataInBackground(...)
, after a while I get the following error:I was able to download the files a few releases back for the parse-server, though I don't actually remember the release number.
Environment Setup
Logs/Trace
NA
The text was updated successfully, but these errors were encountered: