It is because the SDK is modified in v2.2. You can refer to the
apiserver.js updated for v2.2. I have tested it and will make another article on the overall process. See if this helps.