How to Diagnose UnityWebRequest failure
In my game I use UnityWebRequest to contact a server and have a php file echo me the contents of a text file. The code I've been using has worked fine in other games (2019.4.16f1) And, in my new game (2019.4.17f1)it works fine if I run from the editor. If I make a WebGL build, put it on the server and access through my browser (firefox or opera) it loads and runs. The webRequest returns isDone==true after a few milliseconds, but the download manager is empty and there is an error. WebRequest.isNetworkError is coming back true, but the webRequest.error is "Unknown Error". Any ideas what's going on between the editor version and webGl version or strategies on tracking this down?
I looked into the firefox console and found, "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.learningchicken.com/JBN/send_text.php. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)." Suggesting it is a server issue. But, my 2019.4.16 version of the same program with the same code continues to function. Has something changed?
Your answer
Follow this Question
Related Questions
Network Transport Layer API does not work with iOS to PC???? 0 Answers
[UNET] Rigidbody physics sync 0 Answers
Uploading to Photobucket 0 Answers
Unet: How can I know the percentage of packets lost? 1 Answer
starting host and creating match 1 Answer