Invalid byte encoding!

Dear friends,

I got an issue today with sambapos. The error message is “Invalid byte encoding”

here is the detailed report:

[Exception Info 1]

Top-level Exception
Type:        System.Xml.XmlException
Message:     Invalid byte encoding.
Source:      System.Runtime.Serialization
Stack Trace: at System.Runtime.Serialization.Json.JsonEncodingStreamWrapper.ReadEncoding(Byte b1, Byte b2)
   at System.Runtime.Serialization.Json.JsonEncodingStreamWrapper.ReadEncoding()
   at System.Runtime.Serialization.Json.JsonEncodingStreamWrapper.InitForReading(Stream inputStream, Encoding expectedEncoding)
   at System.Runtime.Serialization.Json.JsonEncodingStreamWrapper..ctor(Stream stream, Encoding encoding, Boolean isReader)
   at System.Runtime.Serialization.Json.XmlJsonReader.SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
   at System.Runtime.Serialization.Json.DataContractJsonSerializer.ReadObject(Stream stream)
   at Samba.Infrastructure.Helpers.JsonHelper.Deserialize[T](String json)
   at Samba.Services.Common.Device.AbstractDevice.LoadSettings[T]()
   at Samba.Addon.CalleridDevices.CometDevice.get_Settings()
   at Samba.Addon.CalleridDevices.CometDevice.GetSettings()
   at Samba.Services.Common.Device.AbstractDevice.SaveSettings()
   at Samba.Services.Common.Device.AbstractDevice.InitializeDevice()
   at Samba.Services.Implementations.DeviceService.<InitializeDevices>b__5(IDevice x)
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Samba.Services.Implementations.DeviceService.InitializeDevices()
   at Samba.Presentation.Bootstrapper.InitializeShell()
   at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean runWithDefaultConfiguration)
   at Samba.Presentation.App.RunInReleaseMode()


[Assembly Info]

Samba.Services, Version=
mscorlib, Version=
System, Version=
Microsoft.Practices.Prism, Version=
WindowsBase, Version=
Samba.Infrastructure, Version=
Samba.Infrastructure.Data, Version=
PresentationFramework, Version=
System.Xaml, Version=
Samba.Presentation.Services, Version=
FluentValidation, Version=
Samba.Domain, Version=
DevExpress.Xpf.Grid.v14.1, Version=
DevExpress.Xpf.Grid.v14.1.Core, Version=
PresentationCore, Version=
Stateless, Version=
System.Core, Version=
System.Drawing, Version=
DevExpress.Xpf.Core.v14.1, Version=
EntityFramework, Version=
System.Windows.Forms, Version=
System.ComponentModel.Composition, Version=
Samba.Localization, Version=
Microsoft.CSharp, Version=
Microsoft.Practices.ServiceLocation, Version=
Samba.Persistance, Version=
Microsoft.Practices.Prism.MefExtensions, Version=
PropertyTools, Version=2012.4.14.1


[System Info]

Operating System
-Microsoft Windows 7 Professional
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = 120
--FreePhysicalMemory = 2076364
--OSArchitecture = 64-Bit
--OSLanguage = 1031
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

--Manufacturer = INTEL_
--Model = DH61CR__
--TotalPhysicalMemory = 4263952384
--UserName = Tiger-PC\Tiger


I will appreciate if one of you may help or have an idea !

Thank you all.

Look like an issue with your Caller ID device. Check your CallerID configuration make sure its correct. Looks it may be having issue with device initialization.

What version of SambaPOS?

Dear Kendash,

The device is as u seen USB COMET CID. I also supposed that but i deactivate CID , still the same Problem!

Did you delete the device? What version of SambaPOS? When do you get the error?

PS: its definitely an issue with CallerID device.

The version is sambapos is 4.1.82. The device was working well weeks long, suddenly i got that error when i run sambapos today.

I reinstalled sambapos, didnt help!

I deinstalled CID from pc and plugged it out, didnt help!

I created new database with sample data, didnt help!

When i launch Sambapos , im having the same error each time.

Thanks for your consideration kendash!

Delete the device from SambaPOS local settings. Device settings is stored locally not in the Database. Reinstalling SambaPOS will not replace these settings.

Lets take this step by step.

1st remove the device from local settings > Devices

If this does not work then go to C:\ProgramData\SambaPOS\SambaPOS4 and delete your SambaSettings.txt and the comet device txt file it created then restart SambaPOS.

ProgramData is hidden by default so enable show hidden folders.