Import failed - ghost blog import failed "Request contains an unknown or unsupported file type."

Hello,

I am running the latest version of Ghost (3.10.0) from a Digital Ocean Ghost droplet. Installation was seamless (thank you!). I am trying to import data from an older version of Ghost (3.5.0) to this version, but am getting the error:

Import failed Request contains an unknown or unsupported file type.

Could anyone advise on what I can do to debug / resolve this please?

Thank you

How are you trying to import it? Using the JSON import feature?

1 Like

@ijongkim - yes, that’s right.

Hmm that’s quite strange that you’re having trouble importing from 3.5 -> 3.10. Have you double checked that your JSON file wasn’t corrupted or modified in anyway? How large is your JSON file?

1 Like

It opens fine in SublimeText. And according to JSONlint.com it’s “valid JSON”. :/

I’ve also tried exporting again. But I get the same error. Interestingly, if I attempt to import on the same blog (v3.5.0) I get the same import failed error. :confused:

Frustrantingly - I upgraded both sites to v3.11.0. I then did another export on the source site and tried to import that. I get the same import failed error on both sites - the source and the destination.

I also went into the source site via SSH, did a manual ‘ghost export’ and tried to import that (on both sites). Same failure. :frowning:

Any ideas how else I can import my blogs please?

Before importing, do the following 2 things:

  1. On the server you’re importing to run ghost log -f
  2. In the browser window you’re about to do the import with, open the network tab of dev tools

Now submit the import, you should see the request recorded in both the logs and the network tab.

Please share the full error message including any stack trace from the ghost logs and the full request headers from the network tab.

This will aid in debugging the problem.

2 Likes

@Hannah comes through with the power tools, thank you!!

puts on hard hat

Ok, so I did as suggested. Strangely, nothing comes through via ghost log NOR Dev/Network (in Chrome). When I say nothing, I mean literally nothing. I select my JSON to import, and when I click ‘Import’, nothing gets updated in ghost log -f nor the browser dev tools network tab.

However, I did have a look at the console in my dev tools and see this:

Uncaught Error: Request contains an unknown or unsupported file type.
vendor.min-887691bd59779cd57846dea68907c7e8.js:8680 

    at e._validate (ghost.min-96c41a661b8de7ce6eca2988656c5c92.js:980)
    at e.onUpload (ghost.min-96c41a661b8de7ce6eca2988656c5c92.js:974)
    at F._join (vendor.min-887691bd59779cd57846dea68907c7e8.js:3756)
    at F.join (vendor.min-887691bd59779cd57846dea68907c7e8.js:3727)
    at d (vendor.min-887691bd59779cd57846dea68907c7e8.js:2837)
    at vendor.min-887691bd59779cd57846dea68907c7e8.js:1383
    at o (vendor.min-887691bd59779cd57846dea68907c7e8.js:2762)
    at e.onUpload (vendor.min-887691bd59779cd57846dea68907c7e8.js:1383)
    at e.upload (ghost.min-96c41a661b8de7ce6eca2988656c5c92.js:138)
    at e.send (vendor.min-887691bd59779cd57846dea68907c7e8.js:2456)

Thanks kindly for your time and help

Ok so that tells us the request isn’t being fired because it’s failing some client-side pre-validation.

Best guess is it’s to do with mime-types.

Can you please confirm for me:

  • Your ghost version number (run ghost version, I’m after the Ghost, not Ghost-CLI version)
  • Your client OS
  • Your browser type and version

Hopefully can figure out what to do from there!

1 Like

thank you for the reply.

I took your cue and tried a different browser (Firefox) and the import worked seamlessly. I should’ve tried that earlier, sorry for the inconvenience.

Fwiw, I am running Ghost 3.11.0 on both sites (export/import). My Chrome is Version 81.0.4044.43 (Official Build) beta (64-bit) without any ad-blocker extensions on Windows 8.1 Pro.

Thank you kindly for your help

No problem!

This likely means that Windows Chrome is sending some unrecognised mime-type for the file, we’ll likely need to improve the error handling to catch what it is. Will share with the team :slight_smile:

2 Likes

I just ran into this error but it is not working with Firefox either.

Hi there,

I have the same issue on the hosted version of Ghost.
Tried to import the ZIP file from an earlier installation (exported through ghost, and works to unzip on my computer). I tried both Safari and Chrome- same error.
The ZIP file is about 35 MB.

Thanks a lot in advance for your reply!

Best, Matthias

How’d you generate the .zip, and what’s the structure inside if you take a look at it locally?
The current Ghost export generates .json, not .zip, so I’m curious to know how this file was generated. You aren’t accidentally uploading a theme file, are you?

Hi Cathy,

thanks for your reply!

I exported this back in 2021, I believe it was through the export function in Ghost back then?
Hm I am not sure could it be a theme backup? I think it was an overal backup of the Ghost instance, but must have been generated through the admin panel on the site…

Bildschirmfoto 2024-01-28 um 16.43.17