Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token < in JSON at position 0 #80

Open
HumboldtJoker opened this issue Jun 7, 2016 · 11 comments
Open

Unexpected token < in JSON at position 0 #80

HumboldtJoker opened this issue Jun 7, 2016 · 11 comments

Comments

@HumboldtJoker
Copy link

After saving and then attempting to load a character, I've run into problems. Most info screens now indicate parsrerror syntaxerror "Unexpected token < in JSON at position 0". The half made character is now stuck in the settings and cannot be changed or reset. Meanwhile, the unending load bar mocks me.

Thanks in advance for the help.

@EmperorArthur
Copy link
Collaborator

Hi, could you please post the json file causing the problems.

I've spent most my time re-writing the pdf-exporter, but I can at least see if there's anything wrong with the file itself.

@HumboldtJoker
Copy link
Author

Thanks for the quick response! Some friends and I intend to start an
Eclipse Phase Actual Play. Part of that is going to be encouraging
subscribers to put together NPC for our game, and so far this is looks like
the best tool I've seen for that. Thanks for the hard work.

The unnumbered file was an attempt to save after the error occurred. I
haven't been able to test whether it's functional, as even after clearing
my cache and reopening the error remains when the page loads.

On Tue, Jun 7, 2016 at 6:45 PM, Arthur Moore [email protected]
wrote:

Hi, could you please post the json file causing the problems.

I've spent most my time re-writing the pdf-exporter, but I can at least
see if there's anything wrong with the file itself.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#80 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AS5BDTrJy_Yb08Xo4WNUNiKGct1YpSNsks5qJh6qgaJpZM4IweNT
.

@mace666
Copy link
Contributor

mace666 commented Jun 8, 2016

Hello EA the described issue looks like the one I encountered some time ago.See issue #71 .
I had similar effects when saving and loading a JASON file too often.

@HumboldtJoker
Copy link
Author

So, I honestly don't have the expertise to know how to apply the listed fix.
On Jun 7, 2016 10:19 PM, "mace666" [email protected] wrote:

Hello EA the described issue looks like the one I encountered some time
ago.See issue #71
#71 .
I had similar effects when saving and loading a JASON file too often.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#80 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AS5BDQu1QpZ0bWK0X1YXBcRyfPAjy25kks5qJlD8gaJpZM4IweNT
.

@EmperorArthur
Copy link
Collaborator

If you'll attach the affected file we can take a look at it.

@mace666
Copy link
Contributor

mace666 commented Jun 9, 2016

Sorry HumboldJoker my post was addressed at EmperorArthur to give him one possible hint whre to look for the problem.

@matthiasschoger
Copy link

matthiasschoger commented Jun 12, 2016

Hi,

I have a similar issue, maybe my JSON save can help.

Tested with Firefox 47.
After loading the file, click on a tab, i.e. "Background". A panel appears which says
"There was an error.
parsererror
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 64 of the JSON data"

Abel3.4.2.5alpha2-20160304-211728.json.zip

@rbewley4
Copy link
Collaborator

I tested @matthiasschoger's Abel3.4.2.5alpha2-20160304-211728.json, and discovered that that his error was caused by PHP running out of memory.

GET http://eclipsephase.next-loop.com/Creator/version4/secondary-choice/backgrounds.php

Returns

[...]
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10939561 bytes) in Unknown on line 0

@EmperorArthur
Copy link
Collaborator

Sorry busy weekend. I'll try to see what's wrong with the file soon.
Using this python script I was able to successfully decode the json file without errors, so it might be something in the data, not the encoding.

import json
import pprint

in_file = open('Abel3.4.2.5alpha2-20160304-211728.json','r')
out_file = open('Decoded_Output.txt','w')

decoded = json.loads(in_file.read())

pprint.pprint(decoded,out_file)

in_file.close()
out_file.close()

Here's the Abel file decoded from json to a readable form.
Decoded_Output.txt

@mace666
Copy link
Contributor

mace666 commented Jun 14, 2016

As you can see the groupsArray contents in skillsSavePacks ist duplicated rather often this happens every time the JSON file is loaded. This leads to an increase in filesize with every save (even if nothing is changed). After a couple of saves the PHP JSON parser runs out of memory while loading the file. In my post #71 I posted a code snipped which prevents the duplication of the groupsArray content during loading. This works for me, but I am not totally sure if it is a "clean" fix for the problem.

@grebenyukaa
Copy link

Hi. Can confirm this issue with the attahed json.
StevenRennalt-20161124-170619.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants