• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bflosabre91 · Jul 01, 2014 at 06:39 PM · wwwwindows

WWW stream in Windows Store error

I'm using a leaderboard service called Scoreoid and everything works fine when I'm in Unity but once I build to a Windows Store application and try to run it in Visual Studio, I get an error everytime I try to get any data using WWWForm. I have the Internet(Client) and Internet(Client & Server) capabilities enabled in the project. Here is the code that is throwing the error.

  public void getBestScores()
     {
         /* API  method */
         string url = "https://api.scoreoid.com/v1/getScores";
 
         /* Unity WWW Class used for HTTP Request */
         WWWForm form = new WWWForm();
 
         form.AddField("api_key", "apiKeyGoesHere");
         form.AddField("game_id", "GameIDGoesHere");
         form.AddField("response", "json");
         form.AddField("order_by", "score");
         form.AddField("order", "desc");
         form.AddField("limit", "15");
         form.AddField("platform", "Windows 8");
         WWW www = new WWW(url, form);
         StartCoroutine(WaitForRequestGetBestScores(www));
     }
 
     IEnumerator WaitForRequestGetBestScores(WWW www)
     {
         yield return www;
 
         /* Check for errors */
         if (www.error == null)
         {
             var data = JsonConvert.DeserializeObject<getBestScoresData[]>(www.text);
             int num = 1;            
             foreach (getBestScoresData item in data)
             {
                 scores.text += num.ToString() + ". " + item.Player.username + "   -   " + item.Score.score + "\n";
                 num++;
             }
         }
         else
         {
             Debug.Log("WWW Error: " + www.error);
             scores.text = "Error Retrieving Scores";
         }
     }

The exact error text I'm getting is "Error while opening 'https://api.scoreoid.com/v1/getScores' - Operation has failed with error 0x800c0008: The download of the specified resource has failed."

Thanks for any help anyone can give.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image paulbaker · Jul 07, 2014 at 12:31 AM 0
Share

Hi. I'm having the same problem. Have you found a solution? BTW, I think this might just be a Scoreoid issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by shudecek · Jun 16, 2016 at 05:41 AM

Hi, in my case this has to do with using https instead of http. I am pointing to my own local server and I get this same error with https, but with http it works fine. I believe this has to do the certificate errors. In my case I am using a self-signed cert and ignoring SSL errors using a ServicePointManager.ServerCertificateValidationCallback function such as:

     private static bool TrustCertificate(object sender, X509Certificate x509Certificate, X509Chain x509Chain, SslPolicyErrors sslPolicyErrors)
        {        
             return true; // Accept all
        }
..the problem is that the x509 stuff is not supported in Windows Apps.

I believe I need to ignore errors in Windows as mentioned here:

https://code.msdn.microsoft.com/windowsapps/How-to-ignore-Self-Signed-e50b89b6

but I have not tried this using Unity WWW methods yet

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Integrating Watson Speech-to-Text with Unity 1 Answer

Is HTTPS supported on Windows Store through WWW? 0 Answers

Windows Phone: WWW(String,Byte[],Hashtable) doesn't exist in target framework. 0 Answers

WWW Windows Phone 8 / Windows RT 8.1 missing first line http status header 0 Answers

WWW loading not working on Windows, working on Mac 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges