cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unexpected character encountered while parsing value: <.Path

Unexpected character encountered while parsing value: <.Path

barnesgc
New member | Level 2

I have a VB.NET application that has been successfully using the .NET API to get a list of available files and download any that are missing in our local data share.  It has been running once a day, without any issues, for several weeks.

 

This morning, it is intermitently failing.  I've gotten it to work twice, but on most occasions it thows an exception when it attempts to retrieve the list of all of the files available on Dropbox.  The exception message that I get is, "Unexpected character encountered while parsing value: <.Path".  Nothing has changed about this code in the last few weeks.  So it worked just fine for a while, but has suddenly stopped working today.

 

The VB.NET code is encased in a class, with the following code:

 

Friend Class clsDropbox

   Private m_Dropbox As DropboxClient

   Friend Sub New(token As String)

      m_Dropbox = New DropboxClient(token)

   End Sub

   Friend Function ListGpsFiles() As List(Of clsGpsFileZip)

      Dim lstReturn As New List(Of clsGpsFileZip)
      Dim strError As String
      Dim gfz As clsGpsFileZip
      Dim lst As Files.ListFolderResult
      Dim fmd As Files.Metadata

      Try

         lst = m_Dropbox.Files.ListFolderAsync("/Apps/GPSLogger for Android/").Result

      Catch ex As Exception

         strError = "Falied to retrieve file list from Dropbox.  "

         If Not ex.InnerException.Message Is Nothing Then
            strError = strError + ex.InnerException.Message + "."
         Else
            strError = strError + ex.Message + "."
         End If

         Call MsgBox(strError)
         Application.Exit()

      End Try

      For Each fmd In lst.Entries

         If fmd.IsFile Then

            gfz = New clsGpsFileZip(fmd.Name)

            If gfz.IsGpsFile Then
               gfz.Path = fmd.PathLower
               lstReturn.Add(gfz)
            End If

         End If

      Next

      Return lstReturn

   End Function

End Class

As I say, everything worked fine until this morning, and the code has not changed in the past few weeks.  Any advice?

 

3 Replies 3

Greg-DB
Dropbox Staff
Thanks for the report! Based on the error message, it looks like the JSON parsing is failing because the response didn't contain valid JSON (e.g., it has "<").

That could happen due to intermittent server issues on our side. I can't reproduce the issue right now. Are you still seeing it?

barnesgc
New member | Level 2

Everything worked correctly this morning.  It's a daily process, so if I encouter it again I will post here.

Greg-DB
Dropbox Staff
Thanks! Server issues can happen occasionally, so it may be helpful to add some automatic retries for failures like this.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    barnesgc New member | Level 2
What do Dropbox user levels mean?