Render a PNG Texture from URL onto Instantiated Cube

I’m trying to render a image/png texture from a url onto a newly instantiated cube. It works great when I am testing in the Unity Editor, but the second I move over to the Hololens the texture is not rendering as I simply see the bright pink default texture.

I’ve tried all the advice from the below linked discussion, but still no dice. InternetClient and InternetClientServer are enabled and I’ve tested the URL in the Hololens browser and it worked fine.

Am I missing an option in Package.appxmanifest or is this a known bug in the Hololens?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class ForumSample : MonoBehaviour
{
    void Start ()
    {
        StartCoroutine (retrieveImageAndAttachToGameObject ());
    }

    IEnumerator retrieveImageAndAttachToGameObject ()
    {
        UnityWebRequest www = UnityWebRequest.GetTexture ("<url_to_png_image>", false);
        www.SetRequestHeader ("Accept", "image/png");
        Debug.LogError ("Downloading...");
        yield return www.Send ();

        while (!www.isDone) {
            Debug.LogError (".");
            yield return null;
        }

        if (www.isError) {
            Debug.Log (www.error);
        } else {
            Debug.Log ("Getting the texture content");

            // Instantiate a cube
            GameObject go = GameObject.CreatePrimitive (PrimitiveType.Cube);

            // Attach the browser image to the instantiated cube
            go.GetComponent<Renderer> ().materials [0].mainTexture = DownloadHandlerTexture.GetContent (www);
        }
    }
}

Can you add a test to check whether GetContent() is returning null?

Added now, but can’t check on Hololens until tomorrow. Will respond then.

The Texture object is not null and I’m getting correct width and height values from the downloaded texture Debug.Log(DownloadHandlerTexture.GetContent(www).height.ToString())

It appears this line GameObject.CreatePrimitive (PrimitiveType.Cube); is the issue. I created a simple cube and then saved as a prefab and did Instantiate(Resources.Load("Cube") as GameObject, Vector3.zero, Quaternion.identity) as GameObject; and the texture rendered correctly. Could there be some issue with PrimitiveType?