How to fix error [SyntaxError: JSON Parse error: Unrecognized token '<'] - json

I have this "
error [SyntaxError: JSON Parse error: Unrecognized token '<']"
in my code.
It's an android app I have been working on for about a year. The app was compiling and run successfully before I took a break.
when I wanted to run the code again I started getting that error.
it's occuring when I load an image into the app to scan. I don't know it's origin or why it's popping up since the code was working perfectly.
anyone to help?
I have tried to reset cache, reload the code or reinstall the dependencies. nothing is working

Related

Webpack 5 - ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:4)

I don't understand what is the problem? Webpack does not compile the project and shows the following error:
ERROR in Error: Child compilation failed: Module parse failed: Unexpected character '�' (1:4)
But I can't figure out where the error derives from, in which module or file, where to look for it? This is the error from my IDE.
At the moment, it gives only 1 error when compiling, before that there were 22 errors. Actions that could lead to this - trying to solve the problem through CSS.
After I removed everything in the code (-webkit-min-device-pixel-ratio: 2), the number of errors was reduced to 1, but I don’t understand what to do next.
My webpack 5 config: webpack.config
If someone knows how to solve this problem, or where to look for the root of evil, please help.
Problem solved! It turned out that in my webpack.config in the image processor, I did not add webp support. And when I added it on the fly, the already assembled project did not take this moment into account. As a result, after restarting the build with the npm run dev command, the updated webpack config file started working as it should! Thank you all for your attention to the issue and the desire to help figure it out! enter image description here

SyntaxError: Unexpected string in JSON at position 36 at JSON.parse (<anonymous>)

error image
I'm trying to send the request to verify the Otp for the authentication in my web app but this error pops up and I'm not sure how to handle this as I've just started to learn the Web Dev. If anybody has some idea on how to fix this issue please tell me.
I have tried updating my node-parser module and imported it my server.js file correctly. Also I deleted the package.json.lock file and again did npm start to create a fresh file and all of that doesn't seem to work.

DevToolsActivePort file doesn't exist

I am trying to use Python in automating my work which requires to open a web page and fill login details, but I am getting the following error:
WebDriverException: unknown error: DevToolsActivePort file doesn't exist
Code:
Error:
Then chrome crashes with the error:
What to do now?
Please, try adding the next in your code:
os.environ['DISPLAY'] = ':0'
os.environ['XAUTHORITY']='/run/user/1000/gdm/Xauthority'
Remember that you must download the version of WebDriver in this page of Google according to the installed in your pc.

Rendering Error when executing Yarn Run with Boilerplate and Electron-React

I am very new to this and will probably have a hard time explaining the problem well. I am using boilerplate and electron react to open a webpage. Up until today it was working fine, however all of a sudden my console reads an error when using
yarn run
The error is:
Failed to load resource: the server responded with a status of 404 (Not Found) renderer.dev.js:1
The window appears but nothing renders.
I've tried to revert my commits but the problem doesn't go away, I'm unsure of what route to pursue with the problem.
Any guidance would be appreciated
EDIT
It looks like sajad saderi's suggestion of removing node_modules and reinstalling it removed the specific error message, and my renderer.dev.js file has loaded. However, now the following appears
Uncaught Error: None of the binaries loaded successfully. Is your node version >= 10.15 ?
at failIfNoBinaryExported (renderer.dev.js:192034)
at Object.liveLoad (renderer.dev.js:192030)
at Object../node_modules/msnodesqlv8/lib/bootstrap.js (renderer.dev.js:192050)
at __webpack_require__ (renderer.dev.js:771)
at fn (renderer.dev.js:131)
at renderer.dev.js:192072
at Object../node_modules/msnodesqlv8/lib/connection.js (renderer.dev.js:192508)
at __webpack_require__ (renderer.dev.js:771)
at fn (renderer.dev.js:131)
at Object.<anonymous> (renderer.dev.js:194552)
The program is meant to gather data from an SQL Server using Electron React, Boilerplate, and msnodesqlv8

JSON.parse error with nodejs v0.6.12 on ubuntu

I just installed nodejs v0.6.12 on Ubuntu 10 on Amazon AWS.
The code runs without any issues on my computer (running 0.6.11 on ubuntu) but on the AWS server, I get a JSON parse error:
SyntaxError: Unexpected token u
at Object.parse (native)
The error appears to be coming from the line where I am trying to parse the request from the client (containing a JSON array). It does not appear that I am using any unassigned variable in the line where the error appears to be coming from.
Once again, the code works on my computer - I do not believe I should need any modules for JSON since its built-in with nodejs. Any help in troubleshooting will be appreciated.
The line throwing the error is given below:
obj = JSON.parse(req.rawBody); // I tried both - first by assigning obj an empty value
var obj = JSON.parse(req.rawBody); //
Thanks.
The issue was that the new version of Express (3.0) does not appear to support req.rawBody anymore - the old version did.