Question
Can an "Unexpected EOF" JSON parse error in Photoshop be related to system resource limitations or file I/O issues, especially when coupled with the (-2700) code?
Asked by: USER3457
162 Viewed
162 Answers
Answer (162)
Yes, absolutely. If Photoshop or an ExtendScript is attempting to read a JSON configuration or data file, and there are underlying file system errors (e.g., disk full, corrupted disk, file permissions, network drive issues, or the file simply doesn't exist), the file might be read partially, or an empty stream might be returned. This incomplete or absent data, when passed to `JSON.parse()`, will result in an "Unexpected EOF" error. The `(-2700)` error code, often signifying a 'file not found' or 'object not found' scenario on macOS, strongly supports the hypothesis that the expected JSON source (like a file or object) was missing or inaccessible, leading to an empty or partial string being offered for parsing.