Skip to content
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

Cannot import PDFs #626

Closed
ghost opened this issue Sep 5, 2014 · 8 comments
Closed

Cannot import PDFs #626

ghost opened this issue Sep 5, 2014 · 8 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Sep 5, 2014

I cannot import any PDFs on the main instance. @chilldude also tried, and could not. Everything gets stuck in either "file loading" or "in import queue." No errors in console.

@ghost ghost added the bug label Sep 5, 2014
@mitar mitar added this to the 0.4 - Tears milestone Sep 5, 2014
@mitar
Copy link
Member

mitar commented Sep 5, 2014

The error in logs is strange. I restarted PeerLibrary. Try now.

@mitar
Copy link
Member

mitar commented Sep 5, 2014

It seems to work after restart. For some reason I see many same strange errors in the log:

2014-09-05_09:04:08.75670 Exception in queued task: MongoError: positional operator element mismatch
2014-09-05_09:04:08.75672     at Object.Future.wait (/bundle/programs/server/node_modules/fibers/future.js:326:15)
2014-09-05_09:04:08.75673     at _.extend._nextObject (packages/mongo-livedata/mongo_driver.js:805)
2014-09-05_09:04:08.75675     at _.extend.forEach (packages/mongo-livedata/mongo_driver.js:836)
2014-09-05_09:04:08.75675     at _.extend.getRawObjects (packages/mongo-livedata/mongo_driver.js:885)
2014-09-05_09:04:08.75676     at _.extend._pollMongo (packages/mongo-livedata/polling_observe_driver.js:144)
2014-09-05_09:04:08.75676     at Object.task (packages/mongo-livedata/polling_observe_driver.js:85)
2014-09-05_09:04:08.75676     at _.extend._run (packages/meteor/fiber_helpers.js:150)
2014-09-05_09:04:08.75677     at packages/meteor/fiber_helpers.js:128
2014-09-05_09:04:08.75677     - - - - -
2014-09-05_09:04:08.75678     at Object.toError (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/utils.js:110:11)
2014-09-05_09:04:08.75678     at /bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/cursor.js:642:54
2014-09-05_09:04:08.75678     at Cursor.close (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/cursor.js:912:5)
2014-09-05_09:04:08.75679     at commandHandler (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/cursor.js:642:21)
2014-09-05_09:04:08.75680     at /bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/db.js:1670:9
2014-09-05_09:04:08.75680     at Server.Base._callHandler (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
2014-09-05_09:04:08.75680     at /bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/server.js:472:18
2014-09-05_09:04:08.75681     at MongoReply.parseBody (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
2014-09-05_09:04:08.75681     at null.<anonymous> (/bundle/programs/server/npm/mongo-livedata/main/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
2014-09-05_09:04:08.75682     at emit (events.js:95:17)

@mitar
Copy link
Member

mitar commented Sep 5, 2014

I cherry picked from latest version of Meteor commit which might help with polling_observe_driver.js file, so let's see if this happens again now. I think there is a bug somewhere in Meteor, but now at least it should recover. I am closing this ticket for now. It seems to works now.

@mitar mitar closed this as completed Sep 5, 2014
@ghost
Copy link
Author

ghost commented Sep 6, 2014

Still not working. When I tried to import v2d2_Lugones.pdf I got the following error:

Error: Invalid XRef table: unexpected first object /packages/pdf.js/pdf.js/src/shared/util.js:176
    at error (https://peerlibrary.org/packages/pdf.js/pdf.js/src/shared/util.js:178:15)
    at Object.XRef_readXRefTable [as readXRefTable] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/obj.js:727:9)
    at Object.XRef_processXRefTable [as processXRefTable] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/obj.js:624:22)
    at Object.XRef_readXRef [as readXRef] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/obj.js:949:25)
    at Object.XRef_parse [as parse] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/obj.js:591:28)
    at Object.PDFDocument_setup [as setup] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/core.js:443:17)
    at Object.PDFDocument_parse [as parse] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/core.js:327:12)
    at LocalPdfManager_ensure [as ensure] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/pdf_manager.js:98:24)
    at LocalPdfManager.BasePdfManager_ensureModel [as ensureModel] (https://peerlibrary.org/packages/pdf.js/pdf.js/src/core/pdf_manager.js:34:19) /packages/pdf.js/pdf.js/src/shared/util.js:178
Warning: Unsupported feature "unknown" /packages/pdf.js/pdf.js/src/shared/util.js:161
Warning: Unsupported feature "unknown" 1a3404dd91ecc193655109f19abd5ddc7606017a.js:11
Error
    at XRefParseExceptionClosure (https://peerlibrary.org/packages/pdf.js/pdf.js/src/shared/util.js:370:34)
    at https://peerlibrary.org/packages/pdf.js/pdf.js/src/shared/util.js:375:3
    at https://peerlibrary.org/packages/pdf.js/pdf.js/src/worker_loader.js:70:24 /packages/pdf.js/pdf.js/src/core/pdf_manager.js:104
Warning: Indexing all PDF objects 

@ghost ghost reopened this Sep 6, 2014
@mitar
Copy link
Member

mitar commented Sep 6, 2014

That's buggy PDF. Not the same error. But the server did hang again in the same way.

@mitar mitar closed this as completed Sep 6, 2014
@mitar mitar reopened this Sep 6, 2014
mitar added a commit that referenced this issue Sep 6, 2014
@mitar
Copy link
Member

mitar commented Sep 6, 2014

I updated Meteor so that it will print debugging output when the initial error occurs.

To solve the second error we just resaved the PDF in Mac OS X Preview. It fixed it. It was really simply a broken PDF.

@mitar
Copy link
Member

mitar commented Sep 7, 2014

OK. Bug happened again and now I had enough data to debug it. The problematic user was Tony, he was triggering it. ;-)

The issue is that MongoDB does not support complicated queries we are making, and this connected with Meteor bad handling of failing MongoDB made parts of the site inoperable.

@mitar mitar closed this as completed in 2a05ad2 Sep 7, 2014
@mitar
Copy link
Member

mitar commented Sep 7, 2014

Fix pushed to production. It should not happen anymore. Tony can visit his library and test. :-) If it works, then it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant