- Home /
Unity Android java.io.FileNotFoundException
I made a game which is working on my own android phone fine, but it seems not working on other phones. I don't have access to those phones, but this is what I was told.
more detail: My game is an android app and needs to send data to a server to be stored. The URL is something like this "https://example.com/register". The server is hosted on the google app engine. When a user attempts to send the data he gets an error back which is something like this "java.io.FileNotFoundException https://example.com/register". I checked the logs in my server, there is no record regarding a request from that user. I read somewhere that it's because of htaccess and WWW class and you can't call an URL with htaccess data in it! But there is no htaccess to that page in my server. The page simply receives the data and store them, no authentication needed.
Would be great if anyone has any other idea why some devices get this error and some don't.
Is there anyone from Unity Technology who can help me? Sending data via POST request is a very common feature for an application. I'm wondering why there is such a bug and not fixed yet.
I got the same exception when server sends me 403 Status error. It's can happen, because android os see connection as files, and when can't read from it raise an exception. I dont fix it yet too.
Answer by hubatish · Aug 21, 2015 at 03:10 PM
Not sure if this will solve your error, but I was getting java.io.FileNotFoundexception from an HTTP request when that HTTP request returned a 400 or above error. See this stackoverflow post on why this is on Android: http://stackoverflow.com/questions/5178947/filenotfoundexception-when-calling-webservice
You might also want to check out your https settings if you're getting no response from the server.