Skip to content

Parse - PFFile not accessible even after adding file key to azure settings #2781

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

Closed
SatishMotif opened this issue Sep 26, 2016 · 16 comments
Closed

Comments

@SatishMotif
Copy link

Hello,

I have migrated my iOS app DB from parse to azure successfully.

I found where do I need to add file key and I have added it to azure app settings but still, I am not able to access my old PFFile, when I am trying to get those file I am getting error like:

Response status code was unacceptable: 404 (Code: 1, Version: 1.13.0)

The new files which I have uploaded after migration those are accessible.

Please help my whole is depended on this PFFile data.
14458840_325738497777464_7126595485715922944_n

@hramos
Copy link
Contributor

hramos commented Sep 26, 2016

Hey, thanks for reporting this issue.

Can you please add all the info specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

@SatishMotif
Copy link
Author

Hello Hramos,

Thanks for jumping in.
This issue is related to migration from Parse to Azure, I am not getting that what kind of other information do you need as i have already provided it.

@SatishMotif
Copy link
Author

The code which i have written to initialise Parse(objective-c) is:

[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
        configuration.applicationId = @“MyAppID”;
        configuration.clientKey = @“MyClientKey”;
        configuration.server = @"https://iconiqtestnew.azurewebsites.net/parse";
    }]];

The issue i am facing with the code is:

PFFile *imageFile = [PhotoData objectForKey:@“photo”];

Here PhotoData is an object of one of my image class in which i have stored image file. I am getting object of PFFile here but with this it also prints a log at console like:

[Error]: Response status code was unacceptable: 404 (Code: 1, Version: 1.13.0)

And when i check the imageFile.url, it gives me this url:
https://iconiqtestnewstr.blob.core.windows.net/parse/tfss-565fa927-8645-469c-93a0-a6e7d73376ea-file

And when i run this URL it says that “This XML file does not appear to have any style information associated with it. The document tree is shown below.”

Reproduce the issue:
I am facing this issue everytime when i try to fetch any PFFile data with this code:
PFFile *imageFile = [PhotoData objectForKey:@“photo”];

Hope this is the information you need!

@ratan93
Copy link

ratan93 commented Sep 29, 2016

Hello Everyone,

I am facing the same concern after migrating my data from parse to back4App. Here is details :

I just migration my App data from Parse to Back4App and followed the steps to set up back4App configuration. But now when I hit the Parse API with reference to back4App. It is continuously giving me following error: [Error]: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “files.parsetfss.com” which could put your confidential information at risk. (Code: 100, Version: 1.14.2) Error]: Network connection failed. Making attempt 1 after sleeping for 1.171176 seconds. Can anyone please provide a solution for this kind of error. I have updated Parse SDK in my App as well as ParseFacebook SDK.
I had initialized the parse configuration same way as done above.

Hope for reply on this soon.

Thanks,
Ratneshwar

@SatishMotif
Copy link
Author

Hello,

Can anyone reply here?

@ratan93
Copy link

ratan93 commented Oct 4, 2016

Hello Satis,
Are you getting the same error? I resolved the above error by updating the _PFFileStateSecureDomain value with the new updated BaseUrl i.e. https://parsefiles.back4app.com . But currently I am stuck at the point :
[Error]: Response status code was unacceptable: 403 (Code: 1, Version: 1.14.2)

I need help on this. Do you have any information regarding this? It will be very helpful.

Thanks,
Ratneshwar

@SatishMotif
Copy link
Author

Hi Ratneshwar,

Can you tell me that where did you update _PFFileStateSecureDomain ?

Thanks,
Satish Mavani.

@ratan93
Copy link

ratan93 commented Oct 4, 2016

Hey Satis,

It is in PFFileState Class of Parse.

Thanks.

@SatishMotif
Copy link
Author

Thanks Ratneshwar for the information.

But even after changing the _PFFileStateSecureDomain there was no change in my error code.

@prashanthmadi
Copy link

@SatishMotif not sure if i understood your issue.. Could you provide total url which you are trying to load.

Azure web apps by default doesn't allow few extensions.. check below SO post
http://stackoverflow.com/questions/11846689/use-svg-in-windows-azure-websites

@SatishMotif
Copy link
Author

@JuntaoV5
Copy link

JuntaoV5 commented Oct 6, 2016

I worked together with Satish today and found the files, which are currently in an Amazon S3 storage, had not been migrated to Azure blob storage yet. The MongoDB had been migrated, but the files were not yet. That should be the cause of the 404 error from Azure storage blob.

We need to migrate all files from https://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/* to https://iconiqtestnewstr.blob.core.windows.net/parse/*

It was confirmed that the storage account iconiqtestnewstr existed. But the "parse" container didn't.
We had created /parse today and were going to migrate the files. (Download by an S3 client and then upload by Azure Storage Explorer?)

@flovilmart
Copy link
Contributor

@SatishMotif you should migrate your old files to your new backend. As @hramos suggested, please fill in the issue correctly. Also, provide the relevant logs when running with VERBOSE=1

@SatishMotif
Copy link
Author

@flovilmart i tried the below script and please find the below log:

parse-files-utils@0.0.1 start /Users/mukesh.shukla/Documents/projects/apps2016/parse-files-utils
node index.js "config.js" "VERBOSE=1"

? Rename Parse hosted file names? No
{
"applicationId": "YsUdonvHjTsAJVbhFxT88FaszE9el0TSpe4mySud",
"masterKey": "iIrvNzlrRPzRBeys8omrq2kNfskXWER1Wf8d18Kq",
"mongoURL": "mongodb://iconiqtestdb-parse:Eizr4E1pIlTsdz4DdS5inQFqOkE7NjQdztdA0mqLtfAKQ2klZqDRgpiKfxzUKQSt3vjOAD6gGdsxQ0CLy3lViQ==@iconiqtestdb-parse.documents.azure.com:10250/parse?ssl=true",
"serverURL": "https://api.parse.com/1",
"filesToTransfer": "parseOnly",
"renameInDatabase": false,
"transferTo": "filesystem",
"filesystemPath": "./downloaded_files",
"aws_accessKeyId": "ACCESS_KEY_ID",
"aws_secretAccessKey": "SECRET_ACCESS_KEY",
"aws_bucket": "BUCKET_NAME",
"aws_bucketPrefix": "",
"gcs_projectId": "GCS_PROJECT_ID",
"gcs_keyFilename": "credentials.json",
"gcs_bucket": "BUCKET_NAME",
"renameFiles": false
}
? About to start the file transfer. Does the above look correct? Yes
Initializing transfer configuration...
Initializing filesystem adapter
Fetching schema...
Fetching all objects with files...
Processing 2557 files
Saving files with filesystem
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-bd213147-9746-4c50-9270-f1b3c4e64d77-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-7ace1ea1-7fd6-4849-8035-7924451faa97-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-943f2049-ad86-45c9-8ce2-6e46c7426cc7-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-5ed9977a-a935-4e02-9d8d-81794fdd0589-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-b4a22541-f324-4d15-af60-875f7410423b-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-dfd3685b-0fa8-43d4-8bc7-17dbd664b939-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-8a3edc7d-2b5f-4e99-99bd-5f8147fe9c04-file
Failed request (403) skipping: http://files.parsetfss.com/0844782c-8340-41f3-8ff6-2bd0c1a39eaa/tfss-84822576-17f4-4079-b973-a4d45f605695-file

Please help its urgent!

@flovilmart
Copy link
Contributor

@SatishMotif again, this is not an issue with parse-server. This seems that your files are not accessible anymore, for some reason, you should reach out to https://parse.com/help

@flovilmart
Copy link
Contributor

It seems to be an issue with the parse-files-utils, I suggest you open it on it's repository.

@HouseEscort
Copy link

I know this is an old thread, but I did find a solution to this error thanks to this post:
https://stackoverflow.com/questions/48520795/response-status-code-was-unacceptable-403-for-ipad-only

This error is probably happening because you migrated or cloned a database on back4app.

FIX:

  • Replace image/file with a new file
  • uninstall app
  • reinstall app
  • try accessing the image/file again

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