OpenBullet2 icon indicating copy to clipboard operation
OpenBullet2 copied to clipboard

[Bug]: [Executing block ValidFormat] ArgumentException: The provided json is not a valid object or array

Open timolarra opened this issue 2 years ago • 4 comments

Version of the software

0.2.4

Operating system

Windows 10

Browser / Native

Chrome 104.0.5112.102

What happened?

When I get a JSON response with a whitespace above it, This error appears [Executing block ValidFormat] ArgumentException: The provided json is not a valid object or array.

I've tried the TRY / CATCH method but the Bot will stop work exactly at the Http Request Block (where I get the JSON response)

Could you please add a feature so we can disable this block"block ValidFormat" because the bot will stop working when this error appears.

Relevant LoliCode if needed

No response

timolarra avatar Aug 31 '22 09:08 timolarra

Hello, is the block called ValidFormat an Http Request block? Have you tried changing the HTTP library to SystemNet in the block's settings?

openbullet avatar Sep 01 '22 17:09 openbullet

No, there is no block called ValidFormat, but I figured that out from the error message "[Executing block ValidFormat]" And yes I've tried to change the HTTP library to SystemNet but still getting the same error Screenshot 2022-09-02 at 11 47 31

timolarra avatar Sep 02 '22 10:09 timolarra

Are you using a parse block right after the http request? If that's the case, maybe try using the Trim block first to remove the extra whitespace.

openbullet avatar Oct 13 '22 05:10 openbullet

Even with 'safe mode' checked, the bot gives an error and stops immediately after the Request Block and this is the problem.

timolarra avatar Oct 19 '22 05:10 timolarra

This is really weird, can you check the LoliCode and see if you can find the word "ValidFormat" anywhere in the script? It makes absolutely no sense that it prints that.

openbullet avatar Dec 03 '22 12:12 openbullet

Closing stale issue

openbullet avatar Jun 07 '24 11:06 openbullet