java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h5. Problem description Using the latest TiSDK 3.3.X, Sync Server client is presenting issues when trying to login or sync. Using TiSDK 3.2.3.GA works as expected, so is a regression. h5. Steps to reproduce Grab Sample code here: https://github.com/appcelerator/titanium_mobile_tests_internal/tree/master/SyncServer/Sample_CombinedDev2013 Module available in repo: https://github.com/appcelerator-modules/appcelerator.syncserver.client Note: the updated sample code comes from the BasicSync sample code included in the module example folder with the following modifications: In app.js, change credentials to: {code} var credentials = { "user": "admin@eagentmobile2013.onmicrosoft.com", "password": "Combined1" }; {code} In syncConfig.js, the following code is used: {code} { "connectors": { "msDynamicsCrm1.0": { "apis": { "login": "/api/1.0/msDynamicsCrm1.0/login", "logout": "/api/1.0/msDynamicsCrm1.0/logout", "verifysession": "/api/1.0/msDynamicsCrm1.0/verifysession", "update-details": "/api/1.0/msDynamicsCrm1.0/update-details", "get-details": "/api/1.0/msDynamicsCrm1.0/get-details" }, "appId": "combined-dev-2013", "serverAddress": "http://e80189ea2413d9bb303c7095fc2bde12af543e0f.dev.ace.appcelerator.com", "databaseName": "DBTEST", "retryAttempts": 1, "autoResume": true, "models": [{ "modelName": "contact", "idAttribute": "contactid", "syncOptions": { "queryName": "PowerName", "queryParameters": { "statecode": 0 } } }] } } } {code} h6. iOS 1. Build and run on device or simulator 2. Click on Login Result: Application Error screen is displayed with "Invalid type passed to function at appcelerator.syncserver.client" error message. See "screenshot_iOS.png" attached and attached log "log_iOS_login.txt". Looking at the logs it seems that the login process is actually performed successfully. However, an Application Error is shown. 3. Click on Sync Result: Application Error screen is displayed with "Invalid type passed to function at appcelerator.syncserver.client" error message. See "screenshot_iOS.png" attached and attached log "log_iOS_sync.txt". Looking at the logs it seems that the login and sync processes are actually performed successfully. However, an Application Error is shown. h6. Android 5. Build/run on device or on simulator 6. Click on Login Result: no error is displayed on screen. However, the logs are displaying a failure authenticating. See attached "log_Android_login.txt" In particular: {code} I/TiAPI ( 1489): Login Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "loginFailed" I/TiAPI ( 1489): } {code} 7. Click on Sync Result: no error is displayed on screen. However, the logs are displaying a failure authenticating and syncing. See attached "log_Android_sync.txt" In particular: {code} D/skia ( 1489): --- SkImageDecoder::Factory returned null W/System.err( 1489): java.lang.NullPointerException W/System.err( 1489): at ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:772) W/System.err( 1489): at ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:93) W/System.err( 1489): at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) W/System.err( 1489): at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69) W/System.err( 1489): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121) W/System.err( 1489): at android.os.Handler.dispatchMessage(Handler.java:95) W/System.err( 1489): at android.os.Looper.loop(Looper.java:137) W/System.err( 1489): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) E/V8Exception( 1489): Exception occurred at appcelerator.syncserver.client:16: Uncaught Error: Java Exception occurred I/TiAPI ( 1489): Sync Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "loginFailed" I/TiAPI ( 1489): } D/TiAPI ( 1489): <progress> : {"errorCode":-15001,"message":"Unexpected token \u001f","method":"sendRequest","state":"loginFailed"} I/TiAPI ( 1489): Sync Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "syncFailed" I/TiAPI ( 1489): } {code}
    via by Federico Casali,
  • h5. Problem description Using the latest TiSDK 3.3.X, Sync Server client is presenting issues when trying to login or sync. Using TiSDK 3.2.3.GA works as expected, so is a regression. h5. Steps to reproduce Grab Sample code here: https://github.com/appcelerator/titanium_mobile_tests_internal/tree/master/SyncServer/Sample_CombinedDev2013 Module available in repo: https://github.com/appcelerator-modules/appcelerator.syncserver.client Note: the updated sample code comes from the BasicSync sample code included in the module example folder with the following modifications: In app.js, change credentials to: {code} var credentials = { "user": "admin@eagentmobile2013.onmicrosoft.com", "password": "Combined1" }; {code} In syncConfig.js, the following code is used: {code} { "connectors": { "msDynamicsCrm1.0": { "apis": { "login": "/api/1.0/msDynamicsCrm1.0/login", "logout": "/api/1.0/msDynamicsCrm1.0/logout", "verifysession": "/api/1.0/msDynamicsCrm1.0/verifysession", "update-details": "/api/1.0/msDynamicsCrm1.0/update-details", "get-details": "/api/1.0/msDynamicsCrm1.0/get-details" }, "appId": "combined-dev-2013", "serverAddress": "http://e80189ea2413d9bb303c7095fc2bde12af543e0f.dev.ace.appcelerator.com", "databaseName": "DBTEST", "retryAttempts": 1, "autoResume": true, "models": [{ "modelName": "contact", "idAttribute": "contactid", "syncOptions": { "queryName": "PowerName", "queryParameters": { "statecode": 0 } } }] } } } {code} h6. iOS 1. Build and run on device or simulator 2. Click on Login Result: Application Error screen is displayed with "Invalid type passed to function at appcelerator.syncserver.client" error message. See "screenshot_iOS.png" attached and attached log "log_iOS_login.txt". Looking at the logs it seems that the login process is actually performed successfully. However, an Application Error is shown. 3. Click on Sync Result: Application Error screen is displayed with "Invalid type passed to function at appcelerator.syncserver.client" error message. See "screenshot_iOS.png" attached and attached log "log_iOS_sync.txt". Looking at the logs it seems that the login and sync processes are actually performed successfully. However, an Application Error is shown. h6. Android 5. Build/run on device or on simulator 6. Click on Login Result: no error is displayed on screen. However, the logs are displaying a failure authenticating. See attached "log_Android_login.txt" In particular: {code} I/TiAPI ( 1489): Login Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "loginFailed" I/TiAPI ( 1489): } {code} 7. Click on Sync Result: no error is displayed on screen. However, the logs are displaying a failure authenticating and syncing. See attached "log_Android_sync.txt" In particular: {code} D/skia ( 1489): --- SkImageDecoder::Factory returned null W/System.err( 1489): java.lang.NullPointerException W/System.err( 1489): at ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:772) W/System.err( 1489): at ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:93) W/System.err( 1489): at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) W/System.err( 1489): at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69) W/System.err( 1489): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121) W/System.err( 1489): at android.os.Handler.dispatchMessage(Handler.java:95) W/System.err( 1489): at android.os.Looper.loop(Looper.java:137) W/System.err( 1489): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) E/V8Exception( 1489): Exception occurred at appcelerator.syncserver.client:16: Uncaught Error: Java Exception occurred I/TiAPI ( 1489): Sync Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "loginFailed" I/TiAPI ( 1489): } D/TiAPI ( 1489): <progress> : {"errorCode":-15001,"message":"Unexpected token \u001f","method":"sendRequest","state":"loginFailed"} I/TiAPI ( 1489): Sync Progress: { I/TiAPI ( 1489): "errorCode": -15001, I/TiAPI ( 1489): "message": "Unexpected token \u001f", I/TiAPI ( 1489): "method": "sendRequest", I/TiAPI ( 1489): "state": "syncFailed" I/TiAPI ( 1489): } {code}
    via by Federico Casali,
    • java.lang.NullPointerException at ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:772) at ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:93) at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69) at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:137) at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
    No Bugmate found.