Related
i want to install flutter but every time when i use the flutter doctor command then it crashed because of Visual Studio Exception.
Visual Studio - develop for Windows (the doctor check crashed)
X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
about this issue at https://github.com/flutter/flutter/issues.
X Exception: Bad UTF-8 encoding (U+FFFD; REPLACEMENT CHARACTER) found while decoding string: [
{
"instanceId": "772ff8a9",
"installDate": "2022-05-15T08:58:24Z",
"installationName": "VisualStudio/17.2.0+32505.173",
"installationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
"installationVersion": "17.2.32505.173",
"productId": "Microsoft.VisualStudio.Product.Community",
"productPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Community 2022",
"description": "Leistungsstarke IDE, kostenlos f�r Studenten, Open-Source-Mitwirkende und Einzelpersonen",
"channelId": "VisualStudio.17.Release",
"channelUri": "https://aka.ms/vs/17/release/channel",
"enginePath": "C:\\Program Files (x86)\\Microsoft Visual
Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
"installedChannelUri": "https://aka.ms/vs/17/release/channel",
"releaseNotes": "https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.2#17.2.0",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
"updateDate": "2022-05-15T08:58:24.7196335Z",
"catalog": {
"buildBranch": "d17.2",
"buildVersion": "17.2.32505.173",
"id": "VisualStudio/17.2.0+32505.173",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "17.2.0",
"productLine": "Dev17",
"productLineVersion": "2022",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "0",
"productPreReleaseMilestoneSuffix": "7.0",
"productSemanticVersion": "17.2.0+32505.173",
"requiredEngineVersion": "3.2.2146.50370"
},
"properties": {
"campaignId": "2030:e0f42e6f-47a4-4dec-83b8-446b521c8eaf",
"channelManifestId": "VisualStudio.17.Release/17.2.0+32505.173",
"nickname": "",
"setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
}
}
]
. The Flutter team would greatly appreciate if you could file a bug explaining exactly what you were doing when
this happened:
https://github.com/flutter/flutter/issues/new/choose
The source bytes were:
[91, 13, 10, 32, 32, 123, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 110, 99, 101, 73, 100, 34, 58, 32,
34, 55, 55, 50, 102, 102, 56, 97, 57, 34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 68,
97, 116, 101, 34, 58, 32, 34, 50, 48, 50, 50, 45, 48, 53, 45, 49, 53, 84, 48, 56, 58, 53, 56, 58, 50, 52, 90, 34,
44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111, 110, 78, 97, 109, 101, 34,
58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 47, 49, 55, 46, 50, 46, 48, 43, 51, 50, 53,
48, 53, 46, 49, 55, 51, 34, 44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111,
110, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105, 108, 101,
115, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100,
105, 111, 92, 92, 50, 48, 50, 50, 92, 92, 67, 111, 109, 109, 117, 110, 105, 116, 121, 34, 44, 13, 10, 32, 32, 32,
32, 34, 105, 110, 115, 116, 97, 108, 108, 97, 116, 105, 111, 110, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32,
34, 49, 55, 46, 50, 46, 51, 50, 53, 48, 53, 46, 49, 55, 51, 34, 44, 13, 10, 32, 32, 32, 32, 34, 112, 114, 111,
100, 117, 99, 116, 73, 100, 34, 58, 32, 34, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 86, 105, 115, 117, 97,
108, 83, 116, 117, 100, 105, 111, 46, 80, 114, 111, 100, 117, 99, 116, 46, 67, 111, 109, 109, 117, 110, 105, 116,
121, 34, 44, 13, 10, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 80, 97, 116, 104, 34, 58, 32, 34, 67,
58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105, 108, 101, 115, 92, 92, 77, 105, 99, 114, 111, 115, 111,
102, 116, 32, 86, 105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 50, 48, 50, 50, 92, 92, 67,
111, 109, 109, 117, 110, 105, 116, 121, 92, 92, 67, 111, 109, 109, 111, 110, 55, 92, 92, 73, 68, 69, 92, 92, 100,
101, 118, 101, 110, 118, 46, 101, 120, 101, 34, 44, 13, 10, 32, 32, 32, 32, 34, 115, 116, 97, 116, 101, 34, 58,
32, 52, 50, 57, 52, 57, 54, 55, 50, 57, 53, 44, 13, 10, 32, 32, 32, 32, 34, 105, 115, 67, 111, 109, 112, 108, 101,
116, 101, 34, 58, 32, 116, 114, 117, 101, 44, 13, 10, 32, 32, 32, 32, 34, 105, 115, 76, 97, 117, 110, 99, 104, 97,
98, 108, 101, 34, 58, 32, 116, 114, 117, 101, 44, 13, 10, 32, 32, 32, 32, 34, 105, 115, 80, 114, 101, 114, 101,
108, 101, 97, 115, 101, 34, 58, 32, 102, 97, 108, 115, 101, 44, 13, 10, 32, 32, 32, 32, 34, 105, 115, 82, 101, 98,
111, 111, 116, 82, 101, 113, 117, 105, 114, 101, 100, 34, 58, 32, 102, 97, 108, 115, 101, 44, 13, 10, 32, 32, 32,
32, 34, 100, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 32, 83,
116, 117, 100, 105, 111, 32, 67, 111, 109, 109, 117, 110, 105, 116, 121, 32, 50, 48, 50, 50, 34, 44, 13, 10, 32,
32, 32, 32, 34, 100, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 32, 34, 76, 101, 105, 115, 116, 117,
110, 103, 115, 115, 116, 97, 114, 107, 101, 32, 73, 68, 69, 44, 32, 107, 111, 115, 116, 101, 110, 108, 111, 115,
32, 102, 129, 114, 32, 83, 116, 117, 100, 101, 110, 116, 101, 110, 44, 32, 79, 112, 101, 110, 45, 83, 111, 117,
114, 99, 101, 45, 77, 105, 116, 119, 105, 114, 107, 101, 110, 100, 101, 32, 117, 110, 100, 32, 69, 105, 110, 122,
101, 108, 112, 101, 114, 115, 111, 110, 101, 110, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 104, 97, 110, 110, 101,
108, 73, 100, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 49, 55, 46, 82, 101,
108, 101, 97, 115, 101, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 104, 97, 110, 110, 101, 108, 85, 114, 105, 34, 58,
32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 97, 107, 97, 46, 109, 115, 47, 118, 115, 47, 49, 55, 47, 114, 101,
108, 101, 97, 115, 101, 47, 99, 104, 97, 110, 110, 101, 108, 34, 44, 13, 10, 32, 32, 32, 32, 34, 101, 110, 103,
105, 110, 101, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105,
108, 101, 115, 32, 40, 120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105, 115, 117,
97, 108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 73, 110, 115, 116, 97, 108, 108, 101, 114, 92, 92, 114, 101,
115, 111, 117, 114, 99, 101, 115, 92, 92, 97, 112, 112, 92, 92, 83, 101, 114, 118, 105, 99, 101, 72, 117, 98, 92,
92, 83, 101, 114, 118, 105, 99, 101, 115, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 46, 86, 105, 115,
117, 97, 108, 83, 116, 117, 100, 105, 111, 46, 83, 101, 116, 117, 112, 46, 83, 101, 114, 118, 105, 99, 101, 34,
44, 13, 10, 32, 32, 32, 32, 34, 105, 110, 115, 116, 97, 108, 108, 101, 100, 67, 104, 97, 110, 110, 101, 108, 85,
114, 105, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 97, 107, 97, 46, 109, 115, 47, 118, 115, 47, 49,
55, 47, 114, 101, 108, 101, 97, 115, 101, 47, 99, 104, 97, 110, 110, 101, 108, 34, 44, 13, 10, 32, 32, 32, 32, 34,
114, 101, 108, 101, 97, 115, 101, 78, 111, 116, 101, 115, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47,
100, 111, 99, 115, 46, 109, 105, 99, 114, 111, 115, 111, 102, 116, 46, 99, 111, 109, 47, 101, 110, 45, 117, 115,
47, 118, 105, 115, 117, 97, 108, 115, 116, 117, 100, 105, 111, 47, 114, 101, 108, 101, 97, 115, 101, 115, 47, 50,
48, 50, 50, 47, 114, 101, 108, 101, 97, 115, 101, 45, 110, 111, 116, 101, 115, 45, 118, 49, 55, 46, 50, 35, 49,
55, 46, 50, 46, 48, 34, 44, 13, 10, 32, 32, 32, 32, 34, 116, 104, 105, 114, 100, 80, 97, 114, 116, 121, 78, 111,
116, 105, 99, 101, 115, 34, 58, 32, 34, 104, 116, 116, 112, 115, 58, 47, 47, 103, 111, 46, 109, 105, 99, 114, 111,
115, 111, 102, 116, 46, 99, 111, 109, 47, 102, 119, 108, 105, 110, 107, 47, 63, 76, 105, 110, 107, 73, 100, 61,
54, 54, 49, 50, 56, 56, 34, 44, 13, 10, 32, 32, 32, 32, 34, 117, 112, 100, 97, 116, 101, 68, 97, 116, 101, 34, 58,
32, 34, 50, 48, 50, 50, 45, 48, 53, 45, 49, 53, 84, 48, 56, 58, 53, 56, 58, 50, 52, 46, 55, 49, 57, 54, 51, 51,
53, 90, 34, 44, 13, 10, 32, 32, 32, 32, 34, 99, 97, 116, 97, 108, 111, 103, 34, 58, 32, 123, 13, 10, 32, 32, 32,
32, 32, 32, 34, 98, 117, 105, 108, 100, 66, 114, 97, 110, 99, 104, 34, 58, 32, 34, 100, 49, 55, 46, 50, 34, 44,
13, 10, 32, 32, 32, 32, 32, 32, 34, 98, 117, 105, 108, 100, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49,
55, 46, 50, 46, 51, 50, 53, 48, 53, 46, 49, 55, 51, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 105, 100, 34, 58,
32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105, 111, 47, 49, 55, 46, 50, 46, 48, 43, 51, 50, 53, 48,
53, 46, 49, 55, 51, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 108, 111, 99, 97, 108, 66, 117, 105, 108, 100, 34,
58, 32, 34, 98, 117, 105, 108, 100, 45, 108, 97, 98, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 109, 97, 110,
105, 102, 101, 115, 116, 78, 97, 109, 101, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117, 100, 105,
111, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 109, 97, 110, 105, 102, 101, 115, 116, 84, 121, 112, 101, 34, 58,
32, 34, 105, 110, 115, 116, 97, 108, 108, 101, 114, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111,
100, 117, 99, 116, 68, 105, 115, 112, 108, 97, 121, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 55, 46,
50, 46, 48, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 76, 105, 110, 101, 34,
58, 32, 34, 68, 101, 118, 49, 55, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116,
76, 105, 110, 101, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 50, 48, 50, 50, 34, 44, 13, 10, 32, 32, 32,
32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 77, 105, 108, 101, 115, 116, 111, 110, 101, 34, 58, 32, 34, 82,
84, 87, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 77, 105, 108, 101, 115, 116,
111, 110, 101, 73, 115, 80, 114, 101, 82, 101, 108, 101, 97, 115, 101, 34, 58, 32, 34, 70, 97, 108, 115, 101, 34,
44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 78, 97, 109, 101, 34, 58, 32, 34, 86,
105, 115, 117, 97, 108, 32, 83, 116, 117, 100, 105, 111, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 112, 114,
111, 100, 117, 99, 116, 80, 97, 116, 99, 104, 86, 101, 114, 115, 105, 111, 110, 34, 58, 32, 34, 48, 34, 44, 13,
10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 80, 114, 101, 82, 101, 108, 101, 97, 115, 101,
77, 105, 108, 101, 115, 116, 111, 110, 101, 83, 117, 102, 102, 105, 120, 34, 58, 32, 34, 55, 46, 48, 34, 44, 13,
10, 32, 32, 32, 32, 32, 32, 34, 112, 114, 111, 100, 117, 99, 116, 83, 101, 109, 97, 110, 116, 105, 99, 86, 101,
114, 115, 105, 111, 110, 34, 58, 32, 34, 49, 55, 46, 50, 46, 48, 43, 51, 50, 53, 48, 53, 46, 49, 55, 51, 34, 44,
13, 10, 32, 32, 32, 32, 32, 32, 34, 114, 101, 113, 117, 105, 114, 101, 100, 69, 110, 103, 105, 110, 101, 86, 101,
114, 115, 105, 111, 110, 34, 58, 32, 34, 51, 46, 50, 46, 50, 49, 52, 54, 46, 53, 48, 51, 55, 48, 34, 13, 10, 32,
32, 32, 32, 125, 44, 13, 10, 32, 32, 32, 32, 34, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 34, 58, 32,
123, 13, 10, 32, 32, 32, 32, 32, 32, 34, 99, 97, 109, 112, 97, 105, 103, 110, 73, 100, 34, 58, 32, 34, 50, 48, 51,
48, 58, 101, 48, 102, 52, 50, 101, 54, 102, 45, 52, 55, 97, 52, 45, 52, 100, 101, 99, 45, 56, 51, 98, 56, 45, 52,
52, 54, 98, 53, 50, 49, 99, 56, 101, 97, 102, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 99, 104, 97, 110, 110,
101, 108, 77, 97, 110, 105, 102, 101, 115, 116, 73, 100, 34, 58, 32, 34, 86, 105, 115, 117, 97, 108, 83, 116, 117,
100, 105, 111, 46, 49, 55, 46, 82, 101, 108, 101, 97, 115, 101, 47, 49, 55, 46, 50, 46, 48, 43, 51, 50, 53, 48,
53, 46, 49, 55, 51, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 110, 105, 99, 107, 110, 97, 109, 101, 34, 58, 32,
34, 34, 44, 13, 10, 32, 32, 32, 32, 32, 32, 34, 115, 101, 116, 117, 112, 69, 110, 103, 105, 110, 101, 70, 105,
108, 101, 80, 97, 116, 104, 34, 58, 32, 34, 67, 58, 92, 92, 80, 114, 111, 103, 114, 97, 109, 32, 70, 105, 108,
101, 115, 32, 40, 120, 56, 54, 41, 92, 92, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 86, 105, 115, 117, 97,
108, 32, 83, 116, 117, 100, 105, 111, 92, 92, 73, 110, 115, 116, 97, 108, 108, 101, 114, 92, 92, 115, 101, 116,
117, 112, 46, 101, 120, 101, 34, 13, 10, 32, 32, 32, 32, 125, 13, 10, 32, 32, 125, 13, 10, 93, 13, 10]
i cant find a solution.
maybe anyone can describe me how to fix this problem.
I tryed to reinstall the build tools in visual studio and restart the computer but nothing is working and the problem fixes i found wasnt the right.
I had the same problem and found the solution while searching on Flutter repo issues. Looks like the cause is a bug in vswhere. The solution is to replace vswhere.exe in C:\Program Files (x86)\Microsoft Visual Studio\Installer with the latest version.
The latest version can be found here: https://github.com/microsoft/vswhere/releases
Source: https://github.com/flutter/flutter/issues/102451
Maybe this error is happening because of Flutter's latest version. So you can download an older version like 2.10.5 there: https://docs.flutter.dev/development/tools/sdk/releases
flutter 2.0.0 uses the long connection websocket protocol, the returned data is ArrayBuffer, how to convert it into json data
[31, 139, 8, 0, 0, 0, 0, 0, 0, 0, 37, 144, 49, 79, 195, 48, 16, 70, 255, 10, 186, 217, 61, 249, 206, 103, 59, 241, 214, 38, 65, 68, 13, 36, 212, 41, 66, 221, 2, 237, 192, 208, 5, 194, 84, 229, 191, 115, 41, 147, 101, 125, 239, 61, 75, 190, 193, 231, 245, 12, 9, 126, 126, 63, 240, 123, 154, 47, 96, 224, 60, 205, 19, 164, 27, 28, 115, 61, 174, 231, 208, 119, 25, 146, 160, 48, 137, 129, 93, 126, 131, 196, 145, 48, 82, 136, 6, 218, 62, 43, 100, 209, 122, 239, 165, 208, 185, 122, 130, 20, 98, 68, 9, 6, 170, 237, 190, 81, 216, 161, 13, 106, 62, 182, 29, 36, 138, 1, 197, 137, 154, 117, 175, 162, 88, 100, 17, 29, 235, 109, 86, 145, 11, 198, 82, 43, 221, 160, 155, 35, 36, 13, 254, 231, 169, 8, 108, 160, 25, 43, 133, 244, 42, 209, 25, 120, 63, 12, 26, 68, 231, 136, 244, 177, 174, 125, 217, 171, 196, 120, 175, 159, 154, 149, 36, 143, 190, 92, 27, 207, 107, 132, 138, 184, 114, 247, 134, 148, 24, 189, 129, 215, 241, 168, 19, 9, 150, 236, 138, 101, 49, 48, 127, 93, 47, 250, 29, 108, 153, 54, 86, 54, 68, 15, 76, 73, 202, 100, 9, 150, 63, 238, 197, 136, 230, 44, 1, 0, 0]
I am using Spring Cloud Stream version 2.2.0 with Kafka binder and Avro. Apparently, an incorrect record has been published to one of the Kafka topics where it is causing all the consumers to return deserialization error and goes to some sort of infinite retry.
Error deserializing key/value for partition realtime-object-1 at offset 908. If needed, please seek past the record to continue consumption. Caused by: org.apache.kafka.common.errors.SerializationException: Error deserializing Avro message for id 13 Caused by: org.apache.kafka.common.errors.SerializationException: Could not find class au.com.brolly.avro.model.GenericTaskTriggerCapsule specified in writer's schema whilst finding reader's schema for a SpecificRecord.
Technically, there should be a way that I can specify the policy for deserialization exceptions. I can find some different policies like logAndContinue and sendToDlq but they are for Kafka streams which I don't use in my application. I would appreciate it if someone can help me to understand what I am missing here.
See the spring-kafka documentation.
Use an ErrorHandlingDeserializer2 to wrap the avro deserializer. The exception will be sent to the error handler (which will just just log the error, by default).
You can use a ListenerContainerCustomizer bean to add a SeekToCurrentErrorHandler (optionally with a DeadLetterPublishingRecoverer) to send the record that failed deserialization to another topic.
EDIT
Here's an example to configure it with Spring Cloud Stream...
#SpringBootApplication
#EnableBinding(Sink.class)
public class So60827393Application {
public static void main(String[] args) {
SpringApplication.run(So60827393Application.class, args);
}
#StreamListener(Sink.INPUT)
public void listen(String in) {
}
#Bean
public ApplicationRunner runner(KafkaTemplate<byte[], byte[]> template) {
return args -> template.send("foo", "foo".getBytes());
}
}
public class MyBadDeserializer implements Deserializer {
#Override
public Object deserialize(String topic, byte[] data) {
throw new RuntimeException("Always fails");
}
}
spring.cloud.stream.bindings.input.destination=foo
spring.cloud.stream.bindings.input.group=foo
spring.cloud.stream.bindings.input.consumer.use-native-decoding=true
spring.cloud.stream.kafka.bindings.input.consumer.configuration.value.deserializer=org.springframework.kafka.support.serializer.ErrorHandlingDeserializer2
spring.cloud.stream.kafka.bindings.input.consumer.configuration.spring.deserializer.value.delegate.class=com.example.demo.MyBadDeserializer
Add any additional properties (such as the schema registry URL) to the configuration as before (the EHD2 configures it's delegate deserializer).
2020-03-24 18:18:35.633 ERROR 61822 --- [container-0-C-1] o.s.kafka.listener.LoggingErrorHandler : Error while processing: ConsumerRecord(topic = foo, partition = 0, leaderEpoch = 0, offset = 0, CreateTime = 1585088312600, serialized key size = -1, serialized value size = 3, headers = RecordHeaders(headers = [RecordHeader(key = springDeserializerExceptionValue, value = [-84, -19, 0, 5, 115, 114, 0, 69, 111, 114, 103, 46, 115, 112, 114, 105, 110, 103, 102, 114, 97, 109, 101, 119, 111, 114, 107, 46, 107, 97, 102, 107, 97, 46, 115, 117, 112, 112, 111, 114, 116, 46, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 46, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 69, 120, 99, 101, 112, 116, 105, 111, 110, -26, -50, 105, 87, -16, 47, -111, -25, 2, 0, 2, 90, 0, 5, 105, 115, 75, 101, 121, 91, 0, 4, 100, 97, 116, 97, 116, 0, 2, 91, 66, 120, 114, 0, 40, 111, 114, 103, 46, 115, 112, 114, 105, 110, 103, 102, 114, 97, 109, 101, 119, 111, 114, 107, 46, 107, 97, 102, 107, 97, 46, 75, 97, 102, 107, 97, 69, 120, 99, 101, 112, 116, 105, 111, 110, 19, -40, -67, 105, 126, 123, 33, -76, 2, 0, 0, 120, 114, 0, 47, 111, 114, 103, 46, 115, 112, 114, 105, 110, 103, 102, 114, 97, 109, 101, 119, 111, 114, 107, 46, 99, 111, 114, 101, 46, 78, 101, 115, 116, 101, 100, 82, 117, 110, 116, 105, 109, 101, 69, 120, 99, 101, 112, 116, 105, 111, 110, 75, 126, 118, 72, -53, -113, -97, 0, 2, 0, 0, 120, 114, 0, 26, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 82, 117, 110, 116, 105, 109, 101, 69, 120, 99, 101, 112, 116, 105, 111, 110, -98, 95, 6, 71, 10, 52, -125, -27, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, 105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, 97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, 108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, 114, 97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 76, 105, 115, 116, 59, 120, 112, 115, 113, 0, 126, 0, 4, 113, 0, 126, 0, 12, 116, 0, 12, 65, 108, 119, 97, 121, 115, 32, 102, 97, 105, 108, 115, 117, 114, 0, 30, 91, 76, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 2, 70, 42, 60, 60, -3, 34, 57, 2, 0, 0, 120, 112, 0, 0, 0, 18, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, 38, 54, -35, -123, 2, 0, 4, 73, 0, 10, 108, 105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, 108, 97, 114, 105, 110, 103, 67, 108, 97, 115, 115, 113, 0, 126, 0, 8, 76, 0, 8, 102, 105, 108, 101, 78, 97, 109, 101, 113, 0, 126, 0, 8, 76, 0, 10, 109, 101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 8, 120, 112, 0, 0, 0, 31, 116, 0, 34, 99, 111, 109, 46, 101, 120, 97, 109, 112, 108, 101, 46, 100, 101, 109, 111, 46, 77, 121, 66, 97, 100, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 116, 0, 22, 77, 121, 66, 97, 100, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 46, 106, 97, 118, 97, 116, 0, 11, 100, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 115, 113, 0, 126, 0, 16, 0, 0, 0, 60, 116, 0, 50, 111, 114, 103, 46, 97, 112, 97, 99, 104, 101, 46, 107, 97, 102, 107, 97, 46, 99, 111, 109, 109, 111, 110, 46, 115, 101, 114, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 46, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 116, 0, 17, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 46, 106, 97, 118, 97, 113, 0, 126, 0, 20, 115, 113, 0, 126, 0, 16, 0, 0, 0, -56, 116, 0, 71, 111, 114, 103, 46, 115, 112, 114, 105, 110, 103, 102, 114, 97, 109, 101, 119, 111, 114, 107, 46, 107, 97, 102, 107, 97, 46, 115, 117, 112, 112, 111, 114, 116, 46, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 46, 69, 114, 114, 111, 114, 72, 97, 110, 100, 108, 105, 110, 103, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 50, 116, 0, 31, 69, 114, 114, 111, 114, 72, 97, 110, 100, 108, 105, 110, 103, 68, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 114, 50, 46, 106, 97, 118, 97, 113, 0, 126, 0, 20, 115, 113, 0, 126, 0, 16, 0, 0, 4, -12, 116, 0, 51, 111, 114, 103, 46, 97, 112, 97, 99, 104, 101, 46, 107, 97, 102, 107, 97, 46, 99, 108, 105, 101, 110, 116, 115, 46, 99, 111, 110, 115, 117, 109, 101, 114, 46, 105, 110, 116, 101, 114, 110, 97, 108, 115, 46, 70, 101, 116, 99, 104, 101, 114, 116, 0, 12, 70, 101, 116, 99, 104, 101, 114, 46, 106, 97, 118, 97, 116, 0, 11, 112, 97, 114, 115, 101, 82, 101, 99, 111, 114, 100, 115, 113, 0, 126, 0, 16, 0, 0, 0, 124, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 116, 0, 11, 97, 99, 99, 101, 115, 115, 36, 51, 54, 48, 48, 115, 113, 0, 126, 0, 16, 0, 0, 5, -44, 116, 0, 68, 111, 114, 103, 46, 97, 112, 97, 99, 104, 101, 46, 107, 97, 102, 107, 97, 46, 99, 108, 105, 101, 110, 116, 115, 46, 99, 111, 110, 115, 117, 109, 101, 114, 46, 105, 110, 116, 101, 114, 110, 97, 108, 115, 46, 70, 101, 116, 99, 104, 101, 114, 36, 80, 97, 114, 116, 105, 116, 105, 111, 110, 82, 101, 99, 111, 114, 100, 115, 113, 0, 126, 0, 29, 116, 0, 12, 102, 101, 116, 99, 104, 82, 101, 99, 111, 114, 100, 115, 115, 113, 0, 126, 0, 16, 0, 0, 5, 52, 113, 0, 126, 0, 34, 113, 0, 126, 0, 29, 116, 0, 11, 97, 99, 99, 101, 115, 115, 36, 49, 54, 48, 48, 115, 113, 0, 126, 0, 16, 0, 0, 2, -123, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 113, 0, 126, 0, 35, 115, 113, 0, 126, 0, 16, 0, 0, 2, 94, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 116, 0, 14, 102, 101, 116, 99, 104, 101, 100, 82, 101, 99, 111, 114, 100, 115, 115, 113, 0, 126, 0, 16, 0, 0, 5, 14, 116, 0, 47, 111, 114, 103, 46, 97, 112, 97, 99, 104, 101, 46, 107, 97, 102, 107, 97, 46, 99, 108, 105, 101, 110, 116, 115, 46, 99, 111, 110, 115, 117, 109, 101, 114, 46, 75, 97, 102, 107, 97, 67, 111, 110, 115, 117, 109, 101, 114, 116, 0, 18, 75, 97, 102, 107, 97, 67, 111, 110, 115, 117, 109, 101, 114, 46, 106, 97, 118, 97, 116, 0, 14, 112, 111, 108, 108, 70, 111, 114, 70, 101, 116, 99, 104, 101, 115, 115, 113, 0, 126, 0, 16, 0, 0, 4, -55, 113, 0, 126, 0, 42, 113, 0, 126, 0, 43, 116, 0, 4, 112, 111, 108, 108, 115, 113, 0, 126, 0, 16, 0, 0, 4, -79, 113, 0, 126, 0, 42, 113, 0, 126, 0, 43, 113, 0, 126, 0, 46, 115, 113, 0, 126, 0, 16, 0, 0, 4, 10, 116, 0, 81, 111, 114, 103, 46, 115, 112, 114, 105, 110, 103, 102, 114, 97, 109, 101, 119, 111, 114, 107, 46, 107, 97, 102, 107, 97, 46, 108, 105, 115, 116, 101, 110, 101, 114, 46, 75, 97, 102, 107, 97, 77, 101, 115, 115, 97, 103, 101, 76, 105, 115, 116, 101, 110, 101, 114, 67, 111, 110, 116, 97, 105, 110, 101, 114, 36, 76, 105, 115, 116, 101, 110, 101, 114, 67, 111, 110, 115, 117, 109, 101, 114, 116, 0, 34, 75, 97, 102, 107, 97, 77, 101, 115, 115, 97, 103, 101, 76, 105, 115, 116, 101, 110, 101, 114, 67, 111, 110, 116, 97, 105, 110, 101, 114, 46, 106, 97, 118, 97, 116, 0, 6, 100, 111, 80, 111, 108, 108, 115, 113, 0, 126, 0, 16, 0, 0, 3, -34, 113, 0, 126, 0, 49, 113, 0, 126, 0, 50, 116, 0, 13, 112, 111, 108, 108, 65, 110, 100, 73, 110, 118, 111, 107, 101, 115, 113, 0, 126, 0, 16, 0, 0, 3, -97, 113, 0, 126, 0, 49, 113, 0, 126, 0, 50, 116, 0, 3, 114, 117, 110, 115, 113, 0, 126, 0, 16, 0, 0, 1, -1, 116, 0, 46, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 99, 111, 110, 99, 117, 114, 114, 101, 110, 116, 46, 69, 120, 101, 99, 117, 116, 111, 114, 115, 36, 82, 117, 110, 110, 97, 98, 108, 101, 65, 100, 97, 112, 116, 101, 114, 116, 0, 14, 69, 120, 101, 99, 117, 116, 111, 114, 115, 46, 106, 97, 118, 97, 116, 0, 4, 99, 97, 108, 108, 115, 113, 0, 126, 0, 16, 0, 0, 1, 10, 116, 0, 31, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 99, 111, 110, 99, 117, 114, 114, 101, 110, 116, 46, 70, 117, 116, 117, 114, 101, 84, 97, 115, 107, 116, 0, 15, 70, 117, 116, 117, 114, 101, 84, 97, 115, 107, 46, 106, 97, 118, 97, 113, 0, 126, 0, 55, 115, 113, 0, 126, 0, 16, 0, 0, 2, -20, 116, 0, 16, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 84, 104, 114, 101, 97, 100, 116, 0, 11, 84, 104, 114, 101, 97, 100, 46, 106, 97, 118, 97, 113, 0, 126, 0, 55, 115, 114, 0, 38, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, -114, 16, 2, 0, 1, 76, 0, 4, 108, 105, 115, 116, 113, 0, 126, 0, 10, 120, 114, 0, 44, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, 2, 0, 1, 76, 0, 1, 99, 116, 0, 22, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 59, 120, 112, 115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, 116, 120, -127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, 120, 112, 0, 0, 0, 0, 119, 4, 0, 0, 0, 0, 120, 113, 0, 126, 0, 71, 120, 116, 0, 21, 102, 97, 105, 108, 101, 100, 32, 116, 111, 32, 100, 101, 115, 101, 114, 105, 97, 108, 105, 122, 101, 117, 113, 0, 126, 0, 14, 0, 0, 0, 17, 115, 113, 0, 126, 0, 16, 0, 0, 0, -28, 113, 0, 126, 0, 25, 113, 0, 126, 0, 26, 116, 0, 24, 100, 101, 115, 101, 114, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 113, 0, 126, 0, 16, 0, 0, 0, -53, 113, 0, 126, 0, 25, 113, 0, 126, 0, 26, 113, 0, 126, 0, 20, 115, 113, 0, 126, 0, 16, 0, 0, 4, -12, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 113, 0, 126, 0, 30, 115, 113, 0, 126, 0, 16, 0, 0, 0, 124, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 113, 0, 126, 0, 32, 115, 113, 0, 126, 0, 16, 0, 0, 5, -44, 113, 0, 126, 0, 34, 113, 0, 126, 0, 29, 113, 0, 126, 0, 35, 115, 113, 0, 126, 0, 16, 0, 0, 5, 52, 113, 0, 126, 0, 34, 113, 0, 126, 0, 29, 113, 0, 126, 0, 37, 115, 113, 0, 126, 0, 16, 0, 0, 2, -123, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 113, 0, 126, 0, 35, 115, 113, 0, 126, 0, 16, 0, 0, 2, 94, 113, 0, 126, 0, 28, 113, 0, 126, 0, 29, 113, 0, 126, 0, 40, 115, 113, 0, 126, 0, 16, 0, 0, 5, 14, 113, 0, 126, 0, 42, 113, 0, 126, 0, 43, 113, 0, 126, 0, 44, 115, 113, 0, 126, 0, 16, 0, 0, 4, -55, 113, 0, 126, 0, 42, 113, 0, 126, 0, 43, 113, 0, 126, 0, 46, 115, 113, 0, 126, 0, 16, 0, 0, 4, -79, 113, 0, 126, 0, 42, 113, 0, 126, 0, 43, 113, 0, 126, 0, 46, 115, 113, 0, 126, 0, 16, 0, 0, 4, 10, 113, 0, 126, 0, 49, 113, 0, 126, 0, 50, 113, 0, 126, 0, 51, 115, 113, 0, 126, 0, 16, 0, 0, 3, -34, 113, 0, 126, 0, 49, 113, 0, 126, 0, 50, 113, 0, 126, 0, 53, 115, 113, 0, 126, 0, 16, 0, 0, 3, -97, 113, 0, 126, 0, 49, 113, 0, 126, 0, 50, 113, 0, 126, 0, 55, 115, 113, 0, 126, 0, 16, 0, 0, 1, -1, 113, 0, 126, 0, 57, 113, 0, 126, 0, 58, 113, 0, 126, 0, 59, 115, 113, 0, 126, 0, 16, 0, 0, 1, 10, 113, 0, 126, 0, 61, 113, 0, 126, 0, 62, 113, 0, 126, 0, 55, 115, 113, 0, 126, 0, 16, 0, 0, 2, -20, 113, 0, 126, 0, 64, 113, 0, 126, 0, 65, 113, 0, 126, 0, 55, 113, 0, 126, 0, 69, 120, 0, 117, 114, 0, 2, 91, 66, -84, -13, 23, -8, 6, 8, 84, -32, 2, 0, 0, 120, 112, 0, 0, 0, 3, 102, 111, 111])], isReadOnly = false), key = null, value = null)
org.springframework.kafka.listener.ListenerExecutionFailedException: Listener failed; nested exception is org.springframework.kafka.support.serializer.DeserializationException: failed to deserialize; nested exception is java.lang.RuntimeException: Always fails
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.decorateException(KafkaMessageListenerContainer.java:1777) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeErrorHandler(KafkaMessageListenerContainer.java:1766) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeRecordListener(KafkaMessageListenerContainer.java:1679) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doInvokeWithRecords(KafkaMessageListenerContainer.java:1605) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeRecordListener(KafkaMessageListenerContainer.java:1510) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.invokeListener(KafkaMessageListenerContainer.java:1257) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1007) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:927) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_212]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]
Caused by: org.springframework.kafka.support.serializer.DeserializationException: failed to deserialize; nested exception is java.lang.RuntimeException: Always fails
at org.springframework.kafka.support.serializer.ErrorHandlingDeserializer2.deserializationException(ErrorHandlingDeserializer2.java:228) ~[spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.support.serializer.ErrorHandlingDeserializer2.deserialize(ErrorHandlingDeserializer2.java:203) ~[spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.apache.kafka.clients.consumer.internals.Fetcher.parseRecord(Fetcher.java:1268) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.internals.Fetcher.access$3600(Fetcher.java:124) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.internals.Fetcher$PartitionRecords.fetchRecords(Fetcher.java:1492) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.internals.Fetcher$PartitionRecords.access$1600(Fetcher.java:1332) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:645) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:606) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1294) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1225) ~[kafka-clients-2.3.1.jar:na]
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1201) ~[kafka-clients-2.3.1.jar:na]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1034) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:990) [spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
... 4 common frames omitted
Caused by: java.lang.RuntimeException: Always fails
at com.example.demo.MyBadDeserializer.deserialize(MyBadDeserializer.java:31) ~[classes/:na]
at org.apache.kafka.common.serialization.Deserializer.deserialize(Deserializer.java:60) ~[kafka-clients-2.3.1.jar:na]
at org.springframework.kafka.support.serializer.ErrorHandlingDeserializer2.deserialize(ErrorHandlingDeserializer2.java:200) ~[spring-kafka-2.3.6.RELEASE.jar:2.3.6.RELEASE]
... 15 common frames omitted
Whenever I try to send an ActivateSessionRequest to the opcua server, it throws an error stating "BadSessionNotActivated". Below is the message format of ActivateSessionRequest:
var ActivateSessionRequest v_activateSessionReq := {
requestHeader := session_reqHeader,
clientSignature := {
algorithm := valueof(tr_String("http://opcfoundation.org/UA/SecurityPolicy#None")),
Signature := valueof(tr_ByteString({48, 130, 4, 19, 48, 130, 2, 251, 160, 3, 2, 1, 2, 2, 2, 16, 26, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 40, 49, 18, 48, 16, 6, 3, 85, 4, 10, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 49, 18, 48, 16, 6, 3, 85, 4, 3, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 48, 34, 24, 15, 50, 48, 49, 56, 48, 50, 48, 53, 49, 51, 53, 54, 48, 50, 90, 24, 15, 50, 48, 49, 57, 48, 50, 48, 53, 49, 51, 53, 54, 48, 50, 90, 48, 40, 49, 18, 48, 16, 6, 3, 85, 4, 10, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 49, 18, 48, 16, 6, 3, 85, 4, 3, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 48, 130, 1, 34, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0, 3, 130, 1, 15, 0, 48, 130, 1, 10, 2, 130, 1, 1, 0, 178, 243, 137, 233, 196, 81, 105, 65, 195, 121, 2, 212, 193, 216, 187, 73, 213, 135, 135, 163, 140, 13, 165, 74, 203, 63, 212, 221, 158, 178, 59, 89, 71, 118, 141, 147, 102, 111, 5, 111, 52, 36, 160, 187, 189, 244, 38, 0, 200, 206, 33, 174, 227, 110, 132, 79, 202, 59, 223, 29, 116, 217, 12, 193, 191, 44, 87, 168, 113, 69, 125, 23, 239, 71, 139, 38, 121, 203, 255, 54, 196, 68, 199, 249, 43, 206, 32, 255, 192, 10, 134, 200, 71, 104, 150, 176, 66, 233, 241, 17, 227, 3, 96, 172, 169, 164, 96, 113, 114, 190, 194, 28, 232, 161, 46, 241, 170, 0, 70, 215, 89, 228, 130, 219, 152, 216, 85, 234, 72, 142, 103, 63, 211, 101, 238, 224, 160, 84, 134, 171, 241, 148, 60, 212, 190, 250, 16, 203, 248, 212, 153, 16, 56, 159, 153, 185, 202, 239, 135, 150, 185, 188, 80, 207, 62, 122, 172, 25, 110, 80, 124, 166, 227, 86, 32, 97, 137, 35, 164, 156, 1, 150, 51, 64, 140, 180, 196, 162, 32, 131, 207, 170, 144, 19, 90, 251, 239, 173, 33, 65, 135, 125, 110, 137, 2, 184, 106, 146, 55, 166, 217, 141, 127, 163, 137, 57, 91, 158, 133, 29, 218, 205, 174, 98, 208, 123, 30, 240, 42, 29, 102, 187, 113, 26, 166, 30, 55, 207, 49, 32, 132, 173, 115, 155, 7, 207, 206, 201, 27, 209, 52, 198, 119, 210, 142, 161, 2, 3, 1, 0, 1, 163, 130, 1, 65, 48, 130, 1, 61, 48, 12, 6, 3, 85, 29, 19, 1, 1, 255, 4, 2, 48, 0, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 162, 197, 27, 92, 111, 157, 37, 181, 146, 213, 162, 250, 174, 112, 194, 229, 164, 3, 176, 205, 48, 81, 6, 3, 85, 29, 35, 4, 74, 48, 72, 128, 20, 162, 197, 27, 92, 111, 157, 37, 181, 146, 213, 162, 250, 174, 112, 194, 229, 164, 3, 176, 205, 161, 44, 164, 42, 48, 40, 49, 18, 48, 16, 6, 3, 85, 4, 10, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 49, 18, 48, 16, 6, 3, 85, 4, 3, 19, 9, 78, 111, 100, 101, 79, 80, 67, 85, 65, 130, 2, 16, 26, 48, 91, 6, 3, 85, 29, 17, 4, 84, 48, 82, 134, 44, 117, 114, 110, 58, 97, 118, 100, 111, 111, 116, 99, 104, 97, 108, 107, 101, 45, 86, 105, 114, 116, 117, 97, 108, 66, 111, 120, 58, 78, 111, 100, 101, 79, 80, 67, 85, 65, 45, 83, 101, 114, 118, 101, 114, 130, 9, 108, 111, 99, 97, 108, 104, 111, 115, 116, 130, 23, 97, 118, 100, 111, 111, 116, 99, 104, 97, 108, 107, 101, 45, 86, 105, 114, 116, 117, 97, 108, 66, 111, 120, 48, 44, 6, 9, 96, 134, 72, 1, 134, 248, 66, 1, 13, 4, 31, 22, 29, 79, 112, 101, 110, 83, 83, 76, 32, 71, 101, 110, 101, 114, 97, 116, 101, 100, 32, 67, 101, 114, 116, 105, 102, 105, 99, 97, 116, 101, 48, 14, 6, 3, 85, 29, 15, 1, 1, 255, 4, 4, 3, 2, 2, 252, 48, 32, 6, 3, 85, 29, 37, 1, 1, 255, 4, 22, 48, 20, 6, 8, 43, 6, 1, 5, 5, 7, 3, 1, 6, 8, 43, 6, 1, 5, 5, 7, 3, 2, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 3, 130, 1, 1, 0, 147, 168, 16, 170, 204, 221, 81, 100, 167, 38, 104, 142, 27, 107, 108, 87, 94, 195, 100, 124, 141, 117, 46, 23, 231, 145, 68, 182, 241, 225, 148, 94, 144, 1, 142, 61, 228, 88, 64, 243, 126, 180, 17, 33, 164, 128, 234, 183, 198, 31, 223, 59, 125, 218, 110, 0, 112, 182, 244, 199, 220, 139, 114, 162, 153, 76, 245, 134, 167, 163, 199, 175, 153, 82, 214, 106, 142, 15, 52, 87, 11, 230, 95, 75, 23, 170, 137, 92, 144, 76, 111, 179, 1, 36, 150, 191, 84, 226, 252, 199, 228, 38, 97, 138, 26, 32, 230, 65, 110, 154, 179, 104, 146, 186, 104, 248, 246, 26, 136, 12, 15, 220, 6, 203, 220, 141, 230, 11, 185, 247, 250, 9, 76, 236, 74, 101, 149, 32, 100, 220, 249, 46, 255, 129, 21, 126, 6, 86, 230, 198, 94, 228, 51, 50, 73, 103, 57, 212, 105, 255, 9, 181, 189, 104, 121, 27, 21, 78, 196, 226, 99, 176, 44, 194, 176, 211, 216, 13, 81, 142, 35, 52, 76, 116, 49, 190, 253, 199, 166, 51, 41, 105, 81, 90, 222, 232, 223, 74, 100, 203, 192, 130, 48, 46, 116, 37, 236, 199, 70, 81, 60, 244, 6, 45, 51, 246, 4, 254, 178, 240, 14, 22, 64, 200, 134, 199, 249, 171, 118, 219, 81, 124, 218, 91, 175, 65, 59, 233, 19, 110, 217, 72, 165, 91, 75, 182, 12, 214, 215, 30, 169, 153, 36, 7, 69, 60 ,224, 153, 75, 106, 120, 118, 227, 63, 4, 63, 14, 101, 116, 161, 229, 230, 127, 196, 14, 37, 23, 251, 174, 94, 204, 114, 180, 26, 77, 200, 61, 148}))
},
clientSoftwareCertificates := { realArray := { arrayLength := 0, arrayValues := { } } },
localeIds := valueof(tr_ListOfLocaleId({})),
userIdentityToken := {
encodingByte := 1,
twoByteNodeValue := omit,
namespaceIndex := 0,
fourByteNodeValue := 321,
encoding := 1,
parameterLength := 13,
extensibleParameterBody := {
anonymousIdentityToken := {
policyId := valueof(tr_String( "username_basic256"))
}
}
},
userTokenSignature := {
algorithm := valueof(tr_StringNull),
Signature := valueof(tr_ByteStringNull)
}
}
Client-Server Communication
As shown in the image, ActivateSessionRequest is successful by sending SessionId and AuthenticationToken to the server. The header of ActivateSessionRequest contains AuthenticationToken. But How shall I provide the SessionId to the server? Is it because I am not providing the SessionId in the ActivateSessionRequest that the server throws an error or due to some other mistake? can someone guide me?
Any feedback is highly appreciated. Thank you in Advance
With Regards,
Avdoot
In a WebService JSON response is coming. In the response, there is image is coming as a byte array. I have to show the image in a UIImageView. I am trying to convert the byte array to NSData. But not getting how to do that. Any help would be appreciated.
I am confident that the byte array has image data in it.
Sample Byte array for your reference:
(137,
80,
78,
71,
...
66,
96,
130)
Thanks
Here is an example of getting your data into a NSData object.
const unsigned char bytes[] = {values here};
NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)];
NSLog(#"%#", data);
You have to convert the JSON to an array of strings first; you can, for example, use the NSJSONSerialization class:
NSArray *strings = [NSJSONSerialization JSONObjectWithData:theJSONString options:kNilOptions error:NULL];
Then walk the strings array, convert each entry to an integer, and add it to an allocated byte pointer/array:
unsigned c = strings.count;
uint8_t *bytes = malloc(sizeof(*bytes) * c);
unsigned i;
for (i = 0; i < c; i++)
{
NSString *str = [strings objectAtIndex:i];
int byte = [str intValue];
bytes[i] = byte;
}
Then finally make an NSData out of the bytes, then init an UIImage object using it:
NSData *imageData = [NSData dataWithBytesNoCopy:bytes length:c freeWhenDone:YES];
UIImage *image = [UIImage imageWithData:imageData];
and here's how to do it in Swift...
var bytes:[Byte] = [137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 130, 0, 0, 0, 22, 8, 6, 0, 0, 0, 12, 244, 68, 168, 0, 0, 0, 1, 115, 82, 71, 66, 0, 174, 206, 28, 233, 0, 0, 0, 4, 103, 65, 77, 65, 0, 0, 177, 143, 11, 252, 97, 5, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 3, 212, 73, 68, 65, 84, 104, 67, 237, 153, 61, 139, 20, 65, 16, 134, 55, 17, 253, 3, 114, 127, 224, 208, 204, 64, 228, 18, 3, 19, 21, 19, 35, 217, 200, 204, 15, 48, 19, 228, 48, 50, 242, 76, 12, 245, 2, 99, 47, 55, 88, 83, 65, 220, 76, 48, 57, 19, 49, 220, 95, 224, 125, 120, 34, 126, 224, 120, 207, 65, 141, 53, 189, 213, 85, 189, 238, 172, 176, 210, 5, 195, 206, 77, 87, 87, 247, 84, 189, 245, 118, 213, 220, 160, 169, 82, 61, 112, 232, 129, 65, 245, 66, 245, 0, 30, 168, 64, 168, 56, 56, 242, 64, 5, 66, 5, 66, 5, 66, 197, 192, 31, 15, 12, 142, 29, 63, 209, 228, 174, 209, 232, 101, 199, 87, 147, 201, 36, 171, 139, 141, 55, 227, 113, 179, 122, 234, 180, 171, 115, 110, 109, 173, 217, 217, 217, 53, 99, 112, 241, 210, 229, 169, 185, 216, 244, 246, 88, 50, 134, 93, 145, 18, 125, 79, 231, 230, 173, 219, 217, 253, 47, 51, 176, 92, 32, 156, 92, 89, 233, 188, 219, 189, 245, 245, 16, 8, 219, 219, 239, 27, 230, 69, 206, 76, 157, 246, 112, 99, 99, 106, 14, 78, 71, 230, 13, 94, 159, 64, 96, 47, 218, 222, 50, 7, 95, 239, 221, 5, 2, 47, 77, 96, 17, 178, 56, 10, 48, 217, 139, 192, 36, 81, 240, 158, 111, 109, 181, 251, 176, 178, 30, 102, 233, 43, 139, 75, 128, 192, 187, 161, 39, 87, 196, 108, 226, 23, 15, 8, 223, 70, 47, 154, 131, 7, 247, 155, 253, 27, 215, 155, 79, 103, 86, 59, 23, 207, 24, 67, 71, 203, 175, 253, 189, 230, 235, 179, 39, 157, 235, 199, 187, 183, 13, 23, 250, 123, 195, 171, 71, 118, 248, 229, 111, 158, 91, 130, 221, 207, 119, 239, 52, 59, 231, 207, 154, 107, 179, 6, 107, 137, 132, 64, 128, 202, 145, 167, 155, 155, 97, 112, 5, 8, 232, 91, 25, 174, 193, 129, 227, 113, 38, 0, 179, 156, 206, 49, 84, 2, 132, 89, 51, 50, 7, 208, 52, 203, 217, 151, 7, 102, 253, 174, 233, 30, 126, 126, 252, 208, 6, 44, 5, 128, 245, 55, 65, 101, 14, 66, 96, 83, 29, 43, 152, 90, 231, 251, 235, 87, 237, 22, 176, 19, 233, 235, 185, 2, 196, 16, 8, 165, 103, 191, 232, 105, 167, 64, 237, 158, 51, 1, 217, 181, 225, 112, 74, 7, 16, 105, 241, 108, 244, 5, 4, 246, 66, 112, 229, 138, 128, 239, 49, 130, 100, 109, 9, 8, 68, 103, 247, 202, 133, 44, 16, 34, 59, 4, 94, 196, 2, 1, 207, 96, 32, 139, 153, 176, 13, 248, 90, 32, 224, 136, 156, 195, 117, 198, 122, 122, 105, 150, 144, 85, 158, 190, 181, 158, 117, 254, 70, 199, 140, 55, 158, 218, 155, 199, 150, 204, 245, 106, 4, 178, 211, 10, 28, 52, 205, 24, 23, 247, 150, 14, 99, 22, 35, 136, 46, 129, 204, 101, 59, 64, 128, 238, 83, 187, 28, 31, 233, 209, 147, 234, 0, 220, 22, 8, 81, 6, 136, 19, 60, 61, 139, 46, 75, 106, 11, 177, 205, 113, 97, 117, 20, 243, 4, 175, 111, 32, 68, 93, 131, 21, 12, 28, 157, 138, 197, 26, 204, 205, 29, 13, 114, 116, 96, 199, 2, 3, 243, 172, 140, 103, 29, 97, 3, 126, 249, 219, 154, 223, 2, 129, 5, 162, 2, 73, 186, 136, 92, 96, 114, 231, 38, 52, 90, 18, 204, 180, 93, 45, 169, 17, 116, 129, 103, 221, 75, 231, 81, 98, 43, 98, 22, 93, 183, 228, 142, 36, 11, 8, 60, 75, 37, 167, 103, 1, 1, 6, 209, 98, 129, 136, 121, 127, 115, 36, 9, 59, 116, 128, 16, 177, 130, 156, 221, 179, 2, 129, 151, 136, 90, 79, 198, 115, 242, 47, 106, 4, 214, 240, 186, 34, 41, 110, 163, 154, 164, 132, 158, 177, 1, 101, 167, 20, 157, 99, 132, 20, 72, 86, 230, 151, 50, 130, 102, 7, 125, 223, 1, 66, 196, 10, 146, 17, 139, 0, 66, 238, 35, 19, 123, 138, 170, 119, 93, 228, 165, 247, 227, 195, 2, 80, 23, 118, 158, 173, 40, 17, 116, 75, 59, 11, 35, 16, 112, 221, 38, 114, 111, 213, 8, 60, 183, 24, 161, 20, 8, 95, 30, 63, 10, 107, 4, 169, 37, 210, 22, 117, 10, 8, 57, 103, 80, 221, 71, 244, 234, 181, 84, 81, 59, 233, 101, 90, 201, 177, 18, 209, 122, 180, 119, 230, 35, 81, 167, 83, 242, 49, 105, 150, 246, 77, 3, 130, 190, 126, 30, 32, 48, 223, 90, 155, 35, 3, 144, 88, 44, 196, 250, 204, 153, 2, 2, 206, 176, 40, 178, 36, 171, 254, 7, 32, 148, 116, 58, 105, 123, 155, 130, 56, 151, 241, 94, 27, 40, 140, 49, 15, 16, 216, 199, 172, 107, 3, 2, 10, 209, 129, 20, 88, 250, 101, 96, 5, 93, 120, 105, 54, 64, 79, 198, 104, 13, 245, 189, 215, 91, 243, 37, 49, 87, 216, 201, 71, 171, 28, 43, 48, 47, 93, 43, 183, 7, 235, 185, 174, 63, 188, 226, 82, 214, 231, 61, 162, 34, 52, 250, 178, 136, 115, 115, 25, 168, 1, 129, 142, 238, 8, 184, 151, 234, 94, 126, 211, 175, 143, 100, 183, 238, 6, 244, 7, 41, 222, 1, 102, 64, 199, 99, 38, 198, 244, 145, 83, 255, 13, 29, 85, 127, 61, 140, 19, 92, 249, 76, 44, 191, 58, 248, 61, 44, 225, 154, 72, 215, 182, 148, 43, 16, 22, 29, 133, 37, 177, 95, 129, 176, 36, 129, 90, 244, 54, 43, 16, 22, 237, 225, 37, 177, 255, 27, 38, 183, 224, 140, 178, 26, 189, 95, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130];
var imageData:NSData = NSData(bytes: bytes, length: bytes.count);
var image:UIImage = UIImage(data: imageData);
var imageView:UIImageView = UIImageView(image: image);
I have my way to do it in Swift
if let serverBytesArray = serverAnswer as? NSArray {
var bytes:[Byte] = []
for serverByte in serverBytesArray {
bytes.append(Byte(serverByte as UInt))
}
var data = NSData(bytes: bytes, length: bytes.count);
let tmpDir = NSTemporaryDirectory()
data.writeToFile(tmpDir.stringByAppendingPathComponent("test.pdf"), atomically: true)
}