sciencefair-land / sciencefair

The futuristic, fabulous and free desktop app for working with scientific literature :microscope: :book:
https://sciencefair-app.com
MIT License
603 stars 52 forks source link

[v1.0.2 macOS 10.12] TypeError: Cannot read property 'concat' of undefined #94

Closed blahah closed 7 years ago

blahah commented 7 years ago

https://sentry.io/codeforscience/sciencefair/issues/301432023/

TypeError: Cannot read property 'concat' of undefined
  at Paper.self.loadDatasource (/Users/user/Downloads/ScienceFair.app/Contents/Resources/app.asar/client/lib/paper.js:44:33)
  at Paper.self.loadBib (/Users/user/Downloads/ScienceFair.app/Contents/Resources/app.asar/client/lib/paper.js:36:10)
  at Paper.self.loadData (/Users/user/Downloads/ScienceFair.app/Contents/Resources/app.asar/client/lib/paper.js:21:10)
  at new Paper (/Users/user/Downloads/ScienceFair.app/Contents/Resources/app.asar/client/lib/paper.js:133:8)
  at Paper (/Users/user/Downloads/ScienceFair.app/Contents/Resources/app.asar/client/lib/paper.js:10:40)
...
(5 additional frame(s) were not displayed)

also reported by email by @npscience

blahah commented 7 years ago

This issue happens when a metadata entry has no files array. I'm not sure why this happened - I will check whether there are any papers without files, but if there are we should handle it cleanly.

blahah commented 7 years ago

Also linked: once the paper load fails due to above error, we then see file missing errors due to failed metadata loading.

https://sentry.io/codeforscience/sciencefair/issues/301237793/