I was able to get the sample application to work if I am using IE Browser without any error in console. If I try it on Chrome, I get the error message about the unexpected token in JSON message but it scans successfully.
Any reason why it generates this error message? My app will be run on Chrome in all the factories and I want to avoid support calls because they see this message.
Having said all that, I am pretty sure that EB does not support the DS4308 anyway. There is no web SDK for that scanner (Symbol DS4308 Handheld Scanner Support & Downloads | Zebra ) , your best option would be to ensure the scanner is transmitting in HID mode which you should be able to do using the 123Scan tool at the previous link (it might be the default) and then capturing your data in Chrome the same way you would capture keyboard input.