dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.06k stars 100 forks source link

Error: invalid character '<' looking for beginning of value #150

Open imerelli opened 4 years ago

imerelli commented 4 years ago

Hi, I'm using dbxcli since almost one year without problems, on multiple servers and with multiple users. A few days ago on some servers (and with all the users of those servers) I'm experiencing this problem:

$ ./dbxcli ls Error: invalid character '<' looking for beginning of value

I'm not able to figure out what is going on and why on some servers it works while on others It doesn't. Below the same query in verbose mode. Thanks

$/dbxcli --verbose ls 2020/11/07 10:31:44 sdk.go:94: arg: &{ false false false false true 0 } 2020/11/07 10:31:44 sdk.go:94: req: &{POST https://api.dropboxapi.com/2/files/list_folder HTTP/1.1 1 1 map[Content-Type:[application/json]] {0xc00001f740} 0x67cf10 155 [] false api.dropboxapi.com map[] map[] map[] } 2020/11/07 10:31:44 sdk.go:94: resp: &{410 Gone 410 HTTP/1.1 1 1 map[Content-Length:[25658] Connection:[keep-alive] Etag:["5fa0872c-643a"] X-Dropbox-Request-Id:[2aed9018dbd8f32840bc9f7d48ce1736] Server:[nginx] Date:[Sat, 07 Nov 2020 09:31:44 GMT] Content-Type:[text/html]] 0xc00033c080 25658 [] false false map[] 0xc000122d00 0xc0003169a0} 2020/11/07 10:31:44 sdk.go:94: body: <!DOCTYPE html>

Dropbox - 4xx
Error: 4xx

Error (4xx)

We can't find the page you're looking for.

2020/11/07 10:31:44 sdk.go:94: invalid character '<' looking for beginning of value Error: invalid character '<' looking for beginning of value

imerelli commented 4 years ago

I also tried to reset the account by deleting ~/.config/dbxcli, but the results is same. I want to highlight that I'm using exactly the same account with dbxcli on other servers and it works. This errors seems to affect only some servers.

./dbxcli ls

  1. Go to https://www.dropbox.com/1/oauth2/authorize?client_id=07o23gulcj8qi69&response_type=code&state=state
  2. Click "Allow" (you might have to log in first).
  3. Copy the authorization code. Enter the authorization code here: XXXXXXXXXXXXXXXXXXXXXXXXXXX Error: oauth2: cannot fetch token: 410 Gone Response: <!DOCTYPE html> Dropbox - 4xx

Error: 4xx

Error (4xx)

We can't find the page you're looking for.