paleobot / pbot-dev

Codebase and initial design documents for pbot client
MIT License
2 stars 2 forks source link

Unable to create new image node #272

Open ecurrano opened 4 months ago

ecurrano commented 4 months ago

Error message: Error: Unexpected token '<', " <h"... is not valid JSON

Here's what I attempted to submit- keeping things as simple as possible to try and understand where the glitch was. Screen Shot 2024-02-16 at 2 59 59 PM

NoisyFlowers commented 4 months ago

Have you been able to create any Image nodes on prod or do they all fail like this?

ecurrano commented 4 months ago

Still having this problem on prod. I retried the original problem and then tried out an image of a different specimen in a different collection, too.

NoisyFlowers commented 4 months ago

I stopped the api server in pm2 and ran it manually with debug options turned on.

I was able to create an Image node using the data in the above example and a dummy image.

I restarted the api server in pm2.

I was again able to create an Image node.

https://pbot.paleobiodb.org/query/specimen/a4da50ce-0688-4276-9289-fac8dedf9be0?includeImages=true

It's possible there is a problem with the image itself. If you can send it to me, I'll try it with that.

NoisyFlowers commented 4 months ago

Investigating the problem over zoom revealed that it likely was an upload size issue. nginx on dev is configured for 15Mb. nginx on prod is not configured so uses the default 1Mb.

I've changed the config on prod. Give it a try and let me know if it works.

Also, I've opened paleobot/pbot-client#34 to address the useless error messaging.