-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bug in fhemweb.js (SyntaxError: JSON.parse)? #33
Comments
I have no idea, and that line wasn't changed for years. From what image version did you upgrade and are you using a volume for storing the fhem directory? |
This was the old one: Yes, I'm using a volume. As I already mentioned, I also updated / upgraded Node.js packages (because it was telling me, it is not up-to-date). This is the current version: |
Nodejs has no dependency with fhemweb. Here are the changes with your revision till today. There are serval one regarding fhemweb: |
I don't think, it's an issue with the docker image itself. If the code in question did not change, then I guess the data that is passed there has changed. Is there a way I could get it logged and where it'll be logged to? |
Just realized that I can simply debug with Firefox' webdev tools... Looks like the following change few lines above would fix my issue: But as I said, I don't understand the code in detail and I'm not a web programmer. Can anyone avise, if it's the right way to fix it? |
This ist just a mirror from svn. FHEM support is only provided via forum from the maintainer. |
Hi,
I'm using fhem-docker and updated to 3.0.7-bullseye some days ago (and did also updates of other modules).
Since the update I recognized following error when restarting the container while keeping the fhem web page open:
fhemweb.js line 1215:
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 5 of the JSON data
I had a quick look at the file /www/pgm2/fhemweb.js:
var d = JSON.parse(l);
If I understand the code correctly, I guess, there should be another check for the content of
l
before passing it toJSON.parse()
.In current main, it's this line.
Is this a bug or does that error occure because of some other issue?
The text was updated successfully, but these errors were encountered: