We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
TejaVarma
9 years agoExplorer | Level 4
java.lang.UnsupportedOperationException
Hi,
This is the code I am using
try { /** * Changed URL from dropbox oauth 1 to 2 */ // String urlToken = "https://api.dropboxapi.com/1/oauth2/token"; api.dropboxapi.co...
Greg-DB
Dropbox Community Moderator
9 years agoIt looks like you're throwing the UnsupportedOperationException in your own code in the catch block. Can you share the full error that is causing the catch block to run?
TejaVarma
9 years agoExplorer | Level 4
Hi,
Please find error
com.dropbox.core.NetworkIOException: failed to connect to api.dropboxapi.com/192.168.1.1 (port 443) after 20000ms
01-01 05:39:07.615 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:240)
01-01 05:39:07.615 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:100)
01-01 05:39:07.615 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:256)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:97)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at com.blueberryfon.filepod.util.AddAccounts.addDropboxAccount(AddAccounts.java:50)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at com.blueberryfon.filepod.webserver.FilePodWebServer.serve(FilePodWebServer.java:271)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at com.blueberryfon.filepod.webserver.FilePodWebServer.serve(FilePodWebServer.java:124)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:768)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:186)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: at java.lang.Thread.run(Thread.java:818)
01-01 05:39:07.625 3871-5527/com.blueberryfon.filepod W/System.err: Caused by: java.net.SocketTimeoutException: failed to connect to api.dropboxapi.com/192.168.1.1 (port 443) after 20000ms
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:169)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:122)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at java.net.Socket.connect(Socket.java:882)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:63)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:223)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:195)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121)
01-01 05:39:07.635 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at okhttp3.RealCall.execute(RealCall.java:69)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.http.OkHttp3Requestor$BufferedUploader.finish(OkHttp3Requestor.java:282)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:235)
01-01 05:39:07.645 3871-5527/com.blueberryfon.filepod W/System.err: ... 10 more
Thanks
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks! That's helpful. This seems to be a network issue again. The Dropbox API servers are working properly though, so this indicate an issue with your network connection.
Specifically, based on the error "failed to connect to api.dropboxapi.com/192.168.1.1" it appears your computer thinks api.dropboxapi.com translates to 192.168.1.1. That's not correct. 192.168.1.1 is not a Dropbox IP address, but rather a private local address. You'll need to debug why your computer is resolving api.dropboxapi.com to 192.168.1.1.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!