Hi everibody,
i receive this error
this is the part with error, when i try to read map
when i try to decode e Json into a map from a WebServer, i'm using B4i v. 5.51, iHttpUtils2 v. 2.81 and hosted builder.
I looked for this: https://www.b4x.com/android/forum/t...not-be-nil-key-hc_username.59091/#post-372283 but i this it's not my case.
I've try to checkout my last released vers. from Git and it also doesn't work anymore (developed with B4i V. 5.0).
Can someone explain me what i'm doing wrong..?
Thanks
i receive this error
B4X:
Error occurred on line: 209 (IISApiCall)
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Stack Trace: (
CoreFoundation <redacted> + 252
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation _CFArgv + 0
CoreFoundation <redacted> + 1212
SmartDragonAPP -[B4IMap debug::] + 1040
SmartDragonAPP -[B4IShell getDebuggerVariable:] + 620
SmartDragonAPP -[B4IShell handleIncomingData:inputStream:] + 124
SmartDragonAPP -[B4IShellConnector readControlData:] + 160
SmartDragonAPP -[B4IShellConnector connect] + 2040
SmartDragonAPP -[B4IShellConnector run] + 40
Foundation <redacted> + 984
libsystem_pthread.dylib 0x00000001844302c0 <redacted> + 128
libsystem_pthread.dylib 0x0000000184430220 _pthread_start + 44
libsystem_pthread.dylib 0x0000000184433cdc thread_start + 4
)
SignalHandler 6
B4X:
'########## function active when the http result as a success ##########
Sub JobDone (jobName As HttpJob)
'Dim tm As Cls_ToastMessage
If jobName.Success = True Then
Errore = 0
GetData(jobName.GetString)
If Errore = 1 Then
RetryExecuteQuery(jobName)
End If
Else
'tm.Initialize("Job fail" & jobName.JobName,False)
Log("ISS JOB Error: " & jobName.ErrorMessage)
' ToastMessageShow("Error: " & job.ErrorMessage, True)
Errore = 1
RetryExecuteQuery(jobName)
End If
CallSub2(SourceTarget, "IISApiCall_Exec",jobName.JobName)
jobName.Release
IIS_Busy = False
End Sub
this is the part with error, when i try to read map
B4X:
'########## It excract 1 file Map with the data section of the json ##########
Sub GetData (Result As String)
Dim Tm As Cls_ToastMessage
Dim Json As JSONParser
Dim Map1 As Map
Try
Log("WebApi_RxData: = " & Result)
Json.Initialize(Result)
Map1 = Json.NextObject
Data = Map1.Get("Data")
If Map1.ContainsKey("Version") Then
GLB.Vers_SD_Code = Map1.Get("Version")
End If
Dim MapError As Map = Map1.Get("NotTrappedError")
Catch
Data.Initialize
'set receive data error to decode
Tm.Initialize(GLB.GetTranslation(TRANS.TXT_ERROR_WEBAPI_DECODE_ERROR,"WebAPI encode error"),False)
Errore = 2
IIS_Busy = False
End Try
End Sub
when i try to decode e Json into a map from a WebServer, i'm using B4i v. 5.51, iHttpUtils2 v. 2.81 and hosted builder.
I looked for this: https://www.b4x.com/android/forum/t...not-be-nil-key-hc_username.59091/#post-372283 but i this it's not my case.
I've try to checkout my last released vers. from Git and it also doesn't work anymore (developed with B4i V. 5.0).
Can someone explain me what i'm doing wrong..?
Thanks
Last edited: