UNEXPECTED END OF JSON INPUT IN LINE 1

98 views
Skip to first unread message

Samuel Victor

unread,
Sep 21, 2025, 10:36:46 AM (8 days ago) Sep 21
to DroidScript
Good day fam ❤️
I came across a fatal error on two projects I have in DroidScript. All of a sudden, they were unable to run successfully and I haven't touched the code base in while.
I get the error "Unexpected end of JSON INPUT in line 1" when I check - it's completely unrelated to the error itself.
The code works fine, as it used to. Just this error that came up recently.
I feel like it's DroidScript itself rejecting these projects.
Any help would be highly appreciated 👍 ❤️

Best Regards,

Dave

unread,
Sep 22, 2025, 1:53:07 PM (7 days ago) Sep 22
to DroidScript
We need to narrow down which bit of code is causing it.  Please make a copy of your app and then cut out chunks of code until you have a very simple bit of code that still shows the problem, then post it here.

Samuel Victor

unread,
Sep 23, 2025, 10:06:18 AM (6 days ago) Sep 23
to DroidScript
I can't exactly spot where the problem comes from two projects I haven't touched in a while. Each project code has about 1-2k lines of code. But the error points to line 1 and there's nothing related there. Here are pictures Screenshot_20250923-144807.pngScreenshot_20250923-145042.png

Samuel Victor

unread,
Sep 23, 2025, 1:34:14 PM (6 days ago) Sep 23
to DroidScript
The crypt object in DroidScript for encryption when called to encrypt returns a different cipher text from crypt.Encrypt("string");
I now later realized that crypt=app.CreateCrypt(without any parameters); when declared behaves exactly like this but sometimes decrypt successfully. I realized they recently added 'AES or ECB or PKCS5 padding as parameters optional' I decided to stick with AES and the problems I encountered stopped. It seems this was an update to the crypt object. I have fixed the problem successfully but can anyone explain why?

Dave

unread,
Sep 24, 2025, 1:19:51 PM (5 days ago) Sep 24
to DroidScript
The cryipt object now uses "AES/GCM/NoPadding" because Google Play developer console keeps warning you if you continue using the old AES/ECB/PKCS5Padding as it is considered insecure these days.  So we updated the default method, but if you have previously encrypted content, you will need to pass the "AES/ECB/PKCS5Padding" option to decrypt that older stuff.

If you mix the two worlds, then you need to mark/record that the newer content uses the newer method.
Reply all
Reply to author
Forward
0 new messages