Here are some tips that might help you when you encounter errors. When you investigate the error root cause with the error details and logs, please also check these items.
Are you using the latest SDK?
The sample code is written based on the latest SDKs. Some issues could have been resolved in the latest version, so please make sure to use the latest SDKs.
Are the AppID and server location correct?
Make sure to initialize the code with the Kii.initializeWithSite() as described in Adding the SDK to Your Web App. If you are developing multiple applications, make sure that the correct AppID is specified. Also double check if the correct server location (JP/US/SG/EU) is specified.