MarkerDetectionHololens reference is null on NewDeviceDiscovery (SpectatorView)
Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)? HoloToolkit
Describe the bug I'm trying to get the SpectatorView Preview running, but I'm having several errors like the one in the title. Unity gives me these errors:

To Reproduce I just followed the steps on: https://docs.microsoft.com/en-us/windows/mixed-reality/spectator-view
Actual behavior I can't build neither for Hololens nor for iPhone
Unity Editor Version 2018.1.0f2
Additional context
Also in the inspector panel looking at the SpectatorView prefab, the NetworkManager seems to be empty:

edited issue to reflect that this is in HoloToolkit.
@benzben Unity 2017.2.1p2 is the officially supported version but has been tested up to 2017.4.9
If you use the prefab provided, those null references will be prefilled for you. I believe the source of this issue is that those public reference properties do not appear in the editor for the NewDeviceDiscovery and SpectatorViewNetworkDiscovery scripts due to the way the editor handles dervied classes that aren't derived from MonoBehaviour.
Another method to handle this is to edit the NewDeviceDiscovery and SpectatorViewNetworkDiscovery scripts to use the FindObjectOfType<>() function in their Awake() callbacks to find the respective references.
@MrGuy I can't use the Awake() function as it's not a MonoBehaviour Script, right?
Also I noticed that the SpectatorViewNetworking.prefab I'm using doesn't have the 'NetworkManager' GameObject that appears in this tutorial (https://docs.microsoft.com/en-us/windows/mixed-reality/spectator-view)
Where do I find this component?
Ah, right - You can't use the Awake function there. There is a portion of those scripts which detect the null references and prints those errors. You could use the FindObjectOfType<>() there to find the objects. Alternatively, you could just use the Start() callback.
I think the network manager script has been moved on to the SpectatorView > Shared > Networking object.
@danielescudero I just installed Unity 2017.3 for testing and I get the exact same errors.
@MrGuy "I think the network manager script has been moved on to the Shared > Networking object." When I search in my Assets for 'NetworkManager' it does not find anything except 'SpectatorViewNetworkManager.cs'. I will try the idea of using FindObjectOfType now, but somehow I doubt that this will result in success. Something's just really messed up in my configuration, but I just can't figure it out. I downloaded the newest Git Repositories, so this should not be the problem.
Here is the component the Network Manager was loaded on for me:

Note that the NewDeviceDiscovery and SpectatorViewDiscovery scripts were already included in the SpectatorView prefab, no need to drag in the extra SpectatorViewNetworking prefab.
Yeah sure, these components I have too, but as I posted in this reply (https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/3042#issuecomment-436892261), the SpectatorViewNetworking.prefab seems to lack a component 'NetworkManager'. Also I have to point out that I get all these errors even before trying to hit play or build, they appear as soon as I drag the prefabs into my scene.
I deleted the SpectatorViewNetworking prefab in my scene as you said and tried to build, then Unity gives me these errors:
Again I have the missing 'NetworkManager' on SpectatorView and some errors regarding the QRTracker...
Regarding this issue (https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/3040) I solved the problems with the QR Tracker.
However, again I can't build as I get the errors

Okay, so this very issue (MarkerDetectionHololens reference is null on NewDeviceDiscovery) is actually solved by using FindObjectOfType for every component in the Awake function (there actually ARE awake functions, I just missed them because I was blind...). This issue may be closed, I will continue in another specific issue.