Hi, I using the OkHttpUtils2 library per to communicate with my server via JSON message.
Sometimes I have the error "ResponseError. Reason: Internal Server Error, Response:" and I can'receive the data.
B4A Versione: 7.80
Analisi del Codice. Error
Errore Analisi Programma.
Descrizione errore: Tipo sconosciuto: okhttprequest
Manca un riferimento ad una libreria?
Errore nella linea: 11 (HttpJob)
Private req As OkHttpRequest
No, I did not know that for the zip file must to use the "Export as zip" from b4a, I did use the winzip software. Sorry is the first time that I make the upload of one project.
Now I do it from b4a but is the same, my zip project is 587 KBytes, but the message teels me:
The following error occurred
The uploaded file is too large.
AppUdating library references OkHttpUtils2.
1. Close the IDE.
2. Edit AppUpdating.xml and remove this line:
<dependsOn includesSingletonModules="true">okhttputils2</dependsOn>
Now the error is disappeared, but after the compilation and the installation on the device, the App exit at the moment of check new version via AppUpdating function.
I compiled my OkHttpUtils2My using the two files (HttpJob.bas and HttpUtils2Service.bas) and I added in the main of library project this part of code for the cookie deleting
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
If HttpUtils2Service.hc.IsInitialized Then
Dim jo As JavaObject = HttpUtils2Service.hc
jo = jo.GetFieldJO("client").RunMethod("cookieJar", Null)
Dim r As Reflector
r.Target = jo
Dim CookieManager As JavaObject = r.GetField("cookieHandler")
CookieManager.RunMethodJO("getCookieStore", Null).RunMethod("removeAll", Null)
End If
but I have always the same error "ResponseError. Reason: Internal Server Error, Response:" on one of the queries.