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=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.6.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
EntityFramework, Version=4.4.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
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

Machine
-TIGER-PC
--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.

2 Likes