cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to upload a file via FTP on device builds

glenneroovy
Level 4

I'm trying to upload a file via FTP. Actually it works fine via Editor but when I make a build and push it to my Quest, I get "The remote name could not be resolved." error when I try to call FtpWebRequest.GetRequestStream().

 

var request = WebRequest.Create(address) as FtpWebRequest;

request.Credentials = ...

request.KeepAlive = false;

request.UseBinary = false;

request.Method = WebRequestMethods.Ftp.UploadFile;

request.ContentLength = fileInfo.Length;

 

Then I call request.GetRequestStream() within a try/catch and it throws the timeout exception.

 

I tried adding <uses-permission android:name="android.permission.INTERNET" /> line to my AndroidManifest.xml thinking this might be the issue, but alas no change.

 

Perhaps related but my attempts to get Leaderboard/Achievement data also has errors:

Unable to resolve host "graph.oculus.com": No address associated with hostname

 

Both Leaderboards and Achievements work fine via Editor - only when I push a build to my device.

 

Does anyone have any idea?

1 ACCEPTED SOLUTION

Accepted Solutions

glenneroovy
Level 4

Nevermind! Apparently both of my headsets had no internet connection. I had to reboot my router and now they both connect i.e. FTP, achievements, leaderboards, etc. are working again.

View solution in original post

1 REPLY 1

glenneroovy
Level 4

Nevermind! Apparently both of my headsets had no internet connection. I had to reboot my router and now they both connect i.e. FTP, achievements, leaderboards, etc. are working again.