Import failing
See original GitHub issueIssue Summary
When trying to import content from another Ghost blog, an exception is thrown.
This is done using the Export / Import tool in the Labs section of the backend, so issues are expected.
Steps to Reproduce
- Export your blog content
- Import blog content
Docker logs is giving the following information:
ERROR: Transaction query already complete, run with DEBUG=knex:tx for more info
Error: Transaction query already complete, run with DEBUG=knex:tx for more info
at completedError (/usr/src/ghost/node_modules/knex/lib/transaction.js:252:9)
at /usr/src/ghost/node_modules/knex/lib/transaction.js:224:22
at tryCatcher (/usr/src/ghost/node_modules/knex/node_modules/bluebird/js/main/util.js:26:23)
at Function.Promise.attempt.Promise.try (/usr/src/ghost/node_modules/knex/node_modules/bluebird/js/main/method.js:31:24)
at Client.trxClient.query (/usr/src/ghost/node_modules/knex/lib/transaction.js:222:26)
at Transaction_MySQL.query (/usr/src/ghost/node_modules/knex/lib/dialects/mysql/transaction.js:18:28)
at Transaction_MySQL.rollback (/usr/src/ghost/node_modules/knex/lib/transaction.js:111:17)
at Function.transactor.rollback (/usr/src/ghost/node_modules/knex/lib/transaction.js:192:18)
at /usr/src/ghost/core/server/data/import/data-importer.js:110:34
at tryCatcher (/usr/src/ghost/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:502:31)
at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:559:18)
at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:628:18)
at Promise._resolveCallback (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:423:57)
at Promise._settlePromiseFromHandler (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:514:17)
at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:559:18)
at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:628:18)
at PromiseArray._resolve (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:125:19)
at PromiseArray._promiseFulfilled (/usr/src/ghost/node_modules/bluebird/js/release/promise_array.js:143:14)
at Promise._settlePromise (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:564:26)
at Promise._settlePromise0 (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:604:10)
at Promise._settlePromises (/usr/src/ghost/node_modules/bluebird/js/release/promise.js:683:18)
at Async._drainQueue (/usr/src/ghost/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/usr/src/ghost/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/src/ghost/node_modules/bluebird/js/release/async.js:17:14)
Technical details:
- Ghost Version: 0.8 Official Docker Image sha256:24e3ba4709202b759eecea009baf7c27c7f6c89f77adef718750d6e9eeb2618f
- Node Version: v4.2.6
- Browser/OS: Safari Technology Preview
- Database: MySQL Ver 14.14 Distrib 5.7.12
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
What is the cause of The import failed due to an error in ... - IBM
One of the more common causes is having duplicate primary keys within the spreadsheet.?If a column has been marked as a primary key...
Read more >My data import failed. What do I have to do? | Help Center
When importing a file into Spotzi there might occur an error. Please use this guide as a reference in order to fix your...
Read more >Python - fails importing package - Stack Overflow
modelmaker import command_file , i get the following error: ValueError: Attempted relative import in non-package . Do i need anything special in ...
Read more >How to Fix “Import Failed” Mail Error on Mac - OSXDaily
The import failure prevents the Mail app from opening any further, and therefore renders the Mail app and inboxes unusable.
Read more >Common Reasons for Import Failures - Outreach Support
Failed imports appear on the Imports landing page in the Outreach platform ... A solid red progress bar indicates the entire import failed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can also reproduce this issue on a MySQL database. Below is the message after turning on
DEBUG=knex:tx
.DEBUG=knex:*
gives more detailed information.Seems like that the query is failed due to a duplicate user, causing the entire transaction to fail. The backup data is malformed, generated from Ghost exporter. It should fail, but the reason of failure is not well-described.
I had verified my guess by fixing the user data manually, and luckily, it no longer failed.
Hi @chrishawes, sorry to hear you’re having trouble with the importer.
In general, the importer should work, so we need to figure out what detail about this import isn’t working.
Is it possible to try running Ghost using
DEBUG=knex:tx npm start --production
(or setDEBUG=knex:tx
as an env var before running Ghost) and then provide us the output from the import with that turned on? It’ll be a lot so will need to go in a gist or similar.Alternatively, would you be able to provide the content you were importing (email is fine)?