wimverstuyf / php-coda-parser

PHP parser for Belgian CODA banking files
GNU Lesser General Public License v3.0
42 stars 25 forks source link

Error: could not parse in vendor/codelicious/php-coda-parser/src/LinesParser.php:56 #21

Closed astalpaert closed 3 years ago

astalpaert commented 3 years ago

Hi Wim,

Recently, i discovered that not all my coda files were processed from the first time. Sometimes, I'm getting the following error:

Exception: Could not parse in /var/www/app/releases/302/vendor/codelicious/php-coda-parser/src/LinesParser.php:56

with the stack trace:

`#0 /var/www/app/releases/302/vendor/codelicious/php-coda-parser/src/LinesParser.php(30): Codelicious\Coda\LinesParser->parse()

1 /var/www/app/releases/302/vendor/codelicious/php-coda-parser/src/Parser.php(31): Codelicious\Coda\LinesParser->parseFile()

2 /var/www/app/releases/302/app/Models/CodaFile.php(171): Codelicious\Coda\Parser->parseFile()

3 /var/www/app/releases/302/app/Jobs/Coda/ProcessCodaFile.php(54): App\Models\CodaFile->read()

`

It seems that the coda file could not be read, but when processing it for a second time, it just works perfectly. Any idea what the issue could be here? If needed, I can provide an anonymised version of the file. This only happened about 20 times in more than 5.000 coda files.

PS: I'm using this package for a while now and never encountered real issues. 🎉

Kind regards, Arno

wimverstuyf commented 3 years ago

Hi Arno

Not sure what the issue can be. This error should only be thrown when the content of the coda file is invalid. But this doesn't seem to be the case as the second time you run it is does work. Might be a temporary issue with reading the file?

astalpaert commented 3 years ago

Hey Wim,

Thanks for the answer. Indeed, I really don't have any idea what the issue could be. I will keep an eye on this.