T Turbo3 Active Member Licensed User Longtime User Feb 1, 2018 #1 The first time I execute this command Code: dbxFiles.createFolder("/New Folder 1") I get this error and the application crashes. However the folder is created in my Dropbox. Code: java.lang.Exception: Sub dbxfiles_createfolder signature does not match expected signature. at anywheresoftware.b4a.BA.raiseEvent2(BA.java:188) at anywheresoftware.b4a.BA$2.run(BA.java:360) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Once the folder is created executing that same line of code does not cause the app to crash. What am I doing wrong? Can someone explain what signature it is referring to. Also placing a Try/Catch around the line does not catch the error so I could ignore it. Therefore I am not able to stop the app from crashing when I create a new folder. Here is the dbxFiles_CreateFolder routine if that helps. I am guessing that the parameter list is some how wrong but I think I got it from the example code. Perhaps something obvious I am missing. Code: Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata, error As String) Log("==> dbxFiles_CreateFolder") ' Log($"dbxFiles_CreateFolder(${success}, ${error})"$) End Sub Last edited: Feb 1, 2018
The first time I execute this command Code: dbxFiles.createFolder("/New Folder 1") I get this error and the application crashes. However the folder is created in my Dropbox. Code: java.lang.Exception: Sub dbxfiles_createfolder signature does not match expected signature. at anywheresoftware.b4a.BA.raiseEvent2(BA.java:188) at anywheresoftware.b4a.BA$2.run(BA.java:360) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Once the folder is created executing that same line of code does not cause the app to crash. What am I doing wrong? Can someone explain what signature it is referring to. Also placing a Try/Catch around the line does not catch the error so I could ignore it. Therefore I am not able to stop the app from crashing when I create a new folder. Here is the dbxFiles_CreateFolder routine if that helps. I am guessing that the parameter list is some how wrong but I think I got it from the example code. Perhaps something obvious I am missing. Code: Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata, error As String) Log("==> dbxFiles_CreateFolder") ' Log($"dbxFiles_CreateFolder(${success}, ${error})"$) End Sub
DonManfred Expert Licensed User Longtime User Feb 1, 2018 #2 try Code: Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata) Log("==> dbxFiles_CreateFolder") ' Log($"dbxFiles_CreateFolder(${success})"$) End Sub Upvote 0
try Code: Sub dbxFiles_CreateFolder(success As Boolean, meta As FolderMetadata) Log("==> dbxFiles_CreateFolder") ' Log($"dbxFiles_CreateFolder(${success})"$) End Sub
T Turbo3 Active Member Licensed User Longtime User Feb 1, 2018 #3 Same error. (Actually worse, see next post) But these two work fine. I will test Upload after we get create folder working. Code: Sub dbxFiles_listFolder(success As Boolean, content As List, error As String) Sub dbxFiles_DownloadFinished(success As Boolean, meta As FileMetadata, error As String) Upload works too. Code: Sub dbxFiles_UploadFinished(success As Boolean, meta As FileMetadata, error As String) Last edited: Feb 1, 2018 Upvote 0
Same error. (Actually worse, see next post) But these two work fine. I will test Upload after we get create folder working. Code: Sub dbxFiles_listFolder(success As Boolean, content As List, error As String) Sub dbxFiles_DownloadFinished(success As Boolean, meta As FileMetadata, error As String) Upload works too. Code: Sub dbxFiles_UploadFinished(success As Boolean, meta As FileMetadata, error As String)
T Turbo3 Active Member Licensed User Longtime User Feb 1, 2018 #4 Found something new if I use your suggestion. It always crashes. Even when the folder exists. With the original code from the example it only crashes when it actually creates a folder. If the folder already exists it does not crash. It seems the expected number/type of parameters changes based on whether it succeeded or not. If it fails (because it already existed) then the example code is correct. When it does not crash here is what the Log statement prints when I add success and error parameter. Which looks correct if the folder already exists. Code: ==> dbxFiles_CreateFolder false Exception in 2/files/create_folder: {".tag":"path","path":{".tag":"conflict","conflict":"folder"}} Last edited: Feb 1, 2018 Upvote 0
Found something new if I use your suggestion. It always crashes. Even when the folder exists. With the original code from the example it only crashes when it actually creates a folder. If the folder already exists it does not crash. It seems the expected number/type of parameters changes based on whether it succeeded or not. If it fails (because it already existed) then the example code is correct. When it does not crash here is what the Log statement prints when I add success and error parameter. Which looks correct if the folder already exists. Code: ==> dbxFiles_CreateFolder false Exception in 2/files/create_folder: {".tag":"path","path":{".tag":"conflict","conflict":"folder"}}
T Turbo3 Active Member Licensed User Longtime User Feb 1, 2018 #5 Until you can get this problem fixed I am adding back in the old DropboxV2.bas code stripped down to just handle create folder. This works fine to create a folder without crashing the app. I just needed to add back the OkHttp and OkHttpUtils2 iibraries again to support DropboxV2.bas. Last edited: Feb 1, 2018 Upvote 0
Until you can get this problem fixed I am adding back in the old DropboxV2.bas code stripped down to just handle create folder. This works fine to create a folder without crashing the app. I just needed to add back the OkHttp and OkHttpUtils2 iibraries again to support DropboxV2.bas.