Try opening this in the editor
Closed this issue · 22 comments
https://sweet.sh/lowercasename/l9rD7IHiS
you don't have to actually change it, just hit save... i wasn't able to test how old posts with images in /public/images/uploads/ react to being edited and saved and i'm curious to find out
Oh wait, what? Wait give me a second
Okay mysteriously firstly the post that opened was your 'it rained...' post with the flowers
I have no idea how or why that occured, maybe a weird thing in Firefox?
what
What's super mysterious is that as you can see from the error messages, the URL was correct, so what the heck
that's the correct url
https://sweet.sh/lowercasename/l9rD7IHiS
the same one i posted up above, anyway
ok, yeah
(And I could click the edit button and stuff) - that was so weird, and I now can't replicate it
Anyway, I just successfully edited the spiders post to add a word after the image, however now when I tried to edit to remove the word, it hangs at 'Sending'.
What's the error in the browser console
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of undefined
4|sweet | at query.then (/home/raphael/sweet/app/viewingSweet.js:1032:33)
4|sweet | at <anonymous>
4|sweet | at process._tickCallback (internal/process/next_tick.js:188:7)
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of undefined
4|sweet | at query.then (/home/raphael/sweet/app/viewingSweet.js:1032:33)
4|sweet | at <anonymous>
4|sweet | at process._tickCallback (internal/process/next_tick.js:188:7)
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of undefined
4|sweet | at query.then (/home/raphael/sweet/app/viewingSweet.js:1032:33)
4|sweet | at <anonymous>
4|sweet | at process._tickCallback (internal/process/next_tick.js:188:7)
4|sweet | (node:2444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 14)
4|sweet | Tue, 20 Aug 2019 22:19:07 GMT body-parser deprecated bodyParser: use individual json/urlencoded middlewares at server.js:27:9
4|sweet | Tue, 20 Aug 2019 22:19:07 GMT body-parser deprecated undefined extended: provide extended option at node_modules/body-parser/index.js:105:29
4|sweet | (node:15598) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
4|sweet | (node:15598) DeprecationWarning: collection.findAndModify is deprecated. Use findOneAndUpdate, findOneAndReplace or findOneAndDelete instead.
4|sweet | (node:15598) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
4|sweet | could not move 59rGkUU5A.jpg out of temp
4|sweet | Error: ENOENT: no such file or directory, rename '/home/raphael/sweet/public/images/uploads/59rGkUU5A.jpg' -> './cdn/images/59rGkUU5A.jpg'
4|sweet | MongoError: E11000 duplicate key error collection: sweet.images index: filename_1 dup key: { : "59rGkUU5A.jpg" }
4|sweet | at Function.create (/home/raphael/sweet/node_modules/mongodb-core/lib/error.js:43:12)
4|sweet | at toError (/home/raphael/sweet/node_modules/mongodb/lib/utils.js:149:22)
4|sweet | at coll.s.topology.insert (/home/raphael/sweet/node_modules/mongodb/lib/operations/collection_ops.js:859:39)
4|sweet | at /home/raphael/sweet/node_modules/mongodb-core/lib/connection/pool.js:532:18
4|sweet | at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)
4|sweet | at _combinedTickCallback (internal/process/next_tick.js:131:7)
4|sweet | at process._tickCallback (internal/process/next_tick.js:180:9)
4|sweet | could not move 59rGkUU5A.jpg out of temp
4|sweet | Error: ENOENT: no such file or directory, rename '/home/raphael/sweet/public/images/uploads/59rGkUU5A.jpg' -> './cdn/images/59rGkUU5A.jpg'
4|sweet | (node:15598) UnhandledPromiseRejectionWarning: MongoError: E11000 duplicate key error collection: sweet.images index: filename_1 dup key: { : "59rGkUU5A.jpg" }
4|sweet | at Function.create (/home/raphael/sweet/node_modules/mongodb-core/lib/error.js:43:12)
4|sweet | at toError (/home/raphael/sweet/node_modules/mongodb/lib/utils.js:149:22)
4|sweet | at coll.s.topology.insert (/home/raphael/sweet/node_modules/mongodb/lib/operations/collection_ops.js:859:39)
4|sweet | at /home/raphael/sweet/node_modules/mongodb-core/lib/connection/pool.js:532:18
4|sweet | at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)
4|sweet | at _combinedTickCallback (internal/process/next_tick.js:131:7)
4|sweet | at process._tickCallback (internal/process/next_tick.js:180:9)
4|sweet | (node:15598) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
4|sweet | (node:15598) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
No Javascript errors in the frontend
But now this. I have no explanation for the post with the flowers thing
Let's pretend that never happened until it happens again
The Empirical Method TM
I know why that backend error is happening, though
No, that's fucked, though, how can the same url yield two different pages at two different times. What can have possibly changed from the one time to the next
New commit to the main branch master to probably stop old posts from breaking upon a 2nd edit attempt. That spider post may be stuck like it is forever, though, unless you manually do something to find it and set the imageVersion to 3. It's trying to update it but it's already been updated but it doesn't realize that bc the imageVersion wasn't changed