Hello!
I'm trying the new Instant Preview feature in the HelloAR example scene. The installation was successful and when pressing the play button it logs to console "Instant Preview Version: 1.0.7" like it should.
However I'm only seeing white screen instead of the feed from the back camera. I'm seeing the "Searching for surfaces…" but the text doesn't change and the screen stays white.

This is the screen in the phone and in the Unity editor.
Thanks for any help and it's a really great feature. Can't wait to get it to work.
I also had some trouble getting this to work on my Samsung S8, I was however able to get it working on a pixel device.
Hi, thanks for the report. I added it to our internal tracking and we'll be looking into it.
@DanMillerDev
Hi, have you got it to work on your Samsung S8?
I'm using S8+ myself but haven't got it to work yet.
Joining the club; Galaxy S7 here. Occasionally it works but more often than not I get a constant "not connected to editor". A fresh reboot helps, occasionally.
anyone running the editor with OpenGL, try switching to DX11. this resolved the issue for me.
It doesn't work on Galaxy S8. The Instant-preview app stays on 'Press PLAY in Unity Unity editor '. White screen in the Editor. Unity console says: 'Instant Preview Version: 1.0.7'.
Same here as with rfilkov. Not working on Samsung Galaxy S8.
The exact same issue here too on the Samsung Galaxy S8+
Yesterday with my s8 and android version 7 it worked, after upgrading to android version 8 I've the same issue.
Any luck with that? I have same problem with s8 after upgrade to Android 8
I've debugged the reason. Frame.CameraImage.Texture in ARCoreBackgroundRenderer.cs returns null so there is no image and I see the white screen
Probably it is relate with what wrote @rfilkov - the instant preview does seems to not work correctly and it is not passing the frame image
anybody was able to handle this problem?
me too, same issue on U2017.3.1, OSX 10.13.4 using a Samsung S8 "Oreo"
Same issue for me with the S8. Does anyone have a solution? When I check the adb log I see this:
[EGL] Attaching window :0xdc97f808
WARNING: Shader
Unsupported: 'ARCore/ARBackground' - Pass '' has no vertex shader
...
Unable to lookup library path for 'instant_preview_unity_plugin', native render plugin support disabled.
Unable to find instant_preview_unity_plugin
Well, it's true, that ARBackground.shader code doesn't have a vertex shader. Question is what now?
same here latest ARCore + S8 Android 7 + Unity 2017.4.2f2
Same 2018.1 + Pixel Android P Beta
same here, galaxy s9 running android 8.0.0, unity 207.3.1f1, arcore 1.2.0, and instant preview 1.0.8
i opt out from beta program and it works correctly now. Be careful about android P
@omerfaruk what do you mean? what exactly did you do?
thanks
I was on 2018.1 + Pixel Android P Beta and had error. After turn back to android 8.1 my instant preview start working @Mraeclo
thanks @omerfaruk
same here, galaxy s8 running android 8.0.0, unity 207.3.1f1 on OSX, arcore 1.2.0, and instant preview 1.0.8
Hi my unity version is 2017.4.3f1 and my mobile phone is Google pixel. I have activated developer options and USB debugging. Also in project settings I have enabled instant preview. Nevertheless ,the error is the follow:

I see that a lot of people have exactly same problem. I'm wondering when it will be fixed. Deploying each, even smallest change, to the device is just a waste of time
Sometimes the ports Instant Preview uses don't get freed and Instant Preview can't listen on the port. Only one instance of Unity with Instant Preview will work at a time. If you close all instances of Unity and check your instant preview port, is it open? You can do that on windows with:
netstat -ano | findstr 49838
and on osx with:
netstat -an | grep 49838
If open, they should not show any output.
If the port isn't open, try using adb kill-server which sometimes helps.
I solved the problem changing unity version.
Same for me: I get a blank (white) screen, with the message "Seaching for surfaces".
Adding 2 more details from my case:
@juanmajr93 What exactly do you mean by "changing unity version"?
I really hope that some developer will have a look into this, as seems to affect many people by now.
@juanmajr93 can you let us know which unity version worked for you?
eagerly awaiting a fix for this bug
It's not apparent why a different Unity version would cause an Instant Preview compatibility problem.
@coffiarts was HelloAR scene added to the Unity build?
@philmaas I recently tested with an S8 on Windows 10 / SDK v1.20. Which OS/SDK version are you using?
Thanks for your assistance, @gstanlo !
And you're so right: I hadn't added HelloAR scene to the build! I fixed that, and now the app runs fine on the mobile (after building).
The Instant Preview is still the same, however. I suppose that the original issue discussed here is not solved by this. But I've got a step further at least. Thanks!
BTW, concerning the Instant Preview "White Screen" issue:
I tried it with some of the other example scenes from the HelloAR project (see below) --> the effect is reproducible for any of them.
Each of the screenshots below is taken in the editor. The related screens from the connected mobile (with AR Instant Preview) are always identical to what I see in the editor:
AugmentedImage:

CloudAnchor:

ComputerVision:

HelloAR:

@gstanlo yes same here: S8 on Windows 10 / SDK v1.20
Unity Version doesn't seem to matter, tested with 2017.3x and 20.18.1x
Hey guys, I have the same problem.
I use mobile device is ZenfoneAR on Win10 and SDKv1.2
I tried various versions. Unity Version 2017.2 / 2017.3 / 2018.1
Same problem for me:
As stated before the issue seems to be only with the Instant Preview. If I "Build & Run" the app from Unity all seems to works as expected
We believe that most of these issues can be solved with the adb kill-server method detailed here: https://github.com/google-ar/arcore-unity-sdk/issues/158#issuecomment-391438805
Please let us know if this fails to work!
The adb-kill doesn't work, atleast for me. netstat -ano | findstr 49838 doesn't show any output, but i still get the whitescreen instead of the camera feed. Im using a Samsung Galaxy A5 (2017), Win10, SDKv1.2, and Unity version 2018.1.2f1.
It used to work, but for some reason it suddenly stopped about two weeks ago and it hasn't worked since.
Same here with Pixel 1 XL with a Win7 machine using Unity 2017.3.0f2.
When I hit play, the instant preview app did fire up and showed
Press PLAY in Unity editor to stream
However, a dialogue box showed up on my PC when I hit Play saying
adb.exe has stopped working.
Two errors showed up in the Unity Console:
- Request error (error):
UnityEditor.AsyncHTTPClient:Done(State, Int32)
- daemon not running; starting now at tcp:5037 could not read ok from ADB Server* failed to start daemonerror: cannot connect to daemon
I think that this should be the problem. But how can I solve this?
Any help is appreciated.
Same for me: the adb-kill doesn't works as Sajdkick said
@Sajdkick Have you recently upgraded your android tools?
In Unity, if you go to Preferences / External Tools, you should see a path to your Android SDK. Under that SDK path, there should be platform-tools/adb. If you run adb devices, from here, do you see your connected device?
You might have multiple versions of adb installed on your computer. You can see which might be available using where adb(Win) or which adb(OSX). Use the one specified in the Unity preferences.
Before starting Unity, ensure that the ports are open with netstat, and that your device is attached to adb. You should see something like
List of devices attached
HTXXXXXXX00047 device
Another possibility is that something is blocking your ports. Instant Preview presently uses TCP port 49838. With Unity open, after you press PLAY and you get a white screen, try using the command adb reverse --list. You should see the response: (reverse) tcp:49838 tcp:49838.
Thanks for the quick response!
adb devices.where adb only one instance is listed.netstat -ano | findstr 49838. Which, if i understand correctly, means that it's open. And when i run adb devices it shows my device. These checks are done prior to opening Unity.adb reverse --list i get (reverse) tcp:49838 tcp:49838.Even though it all seems to work, i'm still not getting a camera feed.
@Sajdkick you mentioned this worked previously, can you recall any changes between then and now? Was this with the same phone (Samsung Galaxy A5) and host computer?
Have you attempted using a wifi connection?
What scene are you testing with? I've been using the HelloAR demo.
It was with the same phone and computer. I have also tried with another computer, which i have never tried to run instant preview on before, but i get the same issue there . I first encountered the whitescreen when i was playing around with cloud anchors in a prototype i'm working on. But i have since then been trying to get it to work with the HelloAR demo. I can't recall any major changes other than just working on the prototype, but even after going back to another project with the HelloAR demo in it, it still wouldn't work.
I'll try to see if i can get it to work over wifi!
I manage to connect over wifi no problem, but still the whitescreen unfortunately.
Does the tracking on the phone still work? If you move your phone around while connected, do you see the camera in Unity move around? Are there any exceptions in the Unity console?
Also, does the 1.1 version of the SDK work? Maybe there was a bug introduced in 1.2.
I was thinking maybe the camera permissions weren't on, but I can't start the app on my phone without accepting the permissions.
We fixed some issues that might cause it to work in the next version. In the mean time, this might be tricky, but you might be able to find some sort of error happening in Windows event logs: https://blogs.msdn.microsoft.com/mf/2010/05/20/using-event-viewer-to-trace-media-foundation/
In particular the sections "Did the Media Session start?" and "Did transforms process data?". When testing this I only have either Verbose or Information events -- any errors would be important to note.
When I play the HelloAR scene, an error appear first on the console:

But only the first run. If I close, reopen Unity and re-run the project, the error vanish.
Another strange thins: if i 'maximize' or resize the 'Game' window in Unity editor, even on my smartphone I see the window resizing. It seems that Instant Preview send information to the smartphone and not viceversa. I don't know if it is a normal behaviour.
After some debugging I've found that the function _NativeApi.LockCameraTexture(out pixelBytes, out width, out height)_ used on GoogleARCoreInternal.InstantPreviewManager.UpdateBackgroundTextureIfNeeded (InstantPreviewManager.cs) always return false
Here's a log from adb logat just after started the Instant Preview on the Smartphone (Samsung Galaxy A5 2017):
If you see, on the final part of the file, there are messaged that continuously spam.
Also get only whitescreen in preview, AR Core 1.2.1, Unity 2018.1.1f1, Samsung S7, Android Oreo. App works fine when deployed on device.
@Goliath86 to clarify, can you see changes to the unity scene -- other than the camera feed -- displayed on your phone? That is, it appears to be an issue streaming the camera feed over?
If you run the hello app, does plane detection work?
@gstanlo I can't see any changes to the unity scene. The unity camera object doesn't move. The entire unity scene seems unresponsive. There is no plane detection working. If I _Build&Run_ the app, then it works (obviously without been attached to the PC)
Instant Preview appears to be connected though? Does the device display a completely white screen?
Yes, Instant Preview appears to be connected when the phone is attached to the PC via USB. The device display a white screen with the 'Searching for surfaces..' text on the bottom.
What type of GPU are you using? It sounds like the issue could be in Media Foundation, used for decoding the video from Android. This is a little tricky, but you can view codec events using the windows event viewer: https://blogs.msdn.microsoft.com/mf/2010/05/20/using-event-viewer-to-trace-media-foundation/
If you are able test this, does there appear to be any errors being logged?
If I place, for example, an object on the unity scene, I can see it on the device display but I can't move the view.
I've already done what you suggested related to the Media Foundation and I've not found any error.
My GPU is an NVIDIA GeForce GTX 980M
Looking at your log, I found Failed to H264CodecSrcSetup which is possibly the encoder problem causing this. The pose state tries to sync with the encoded frame in the plugin which might explain why you're not getting poses.
So the problem seems related to the phone. Is there something that I/we can do to solve this encoder problem to see if it is effectively the 'White Screen' cause?
Bump having the same white screen issue on
Galaxy S7 on latest official (8.0.0)
Unity 2017.4.6f1
MacOS 10.13.5
ACCore 1.3 (Instant Preview Version 1.0.9)
adb finds device, ports open. Killserver and other mentioned solutions did not fix the problem.
Yes, the problem still there even after the 1.3.0 update
Same for me, Galaxy S9 8.0.0, Unity 2018.1.5.f1, latest Arcore stuff
I'm not sure if this is the fix. But I thought it might have something to do with the new Unity Hub which is technically like a second Unity instance running. So I restarted my computer and made sure to open Unity standalone, without Hub (and after checking that the port was indeed open). I opened the project and Preview worked for me.
Problem still exists in Unity 2018.2.2f1 and ARCore v1.4.0 :/ if anyone has any solution to this I would be more than grateful as this would speed up my development times significantly.
i use Samsung A6 i tried this version of unity:
Unity 2017.4.5f1 (64-bit)
Unity 2018.1.0f2 (64-bit)
Unity 2018.2.2f1 (64-bit)
ARcore 1.4
NOTHING works with istant preview...
please no one can help us?
@dylan-hart how can i run the with DX11?
@avrahamraskin how can i open unity without this "hub"?
@juanmajr93 what version of unity and what device?
This is only a problem if you've downloaded Hub and you it.
Even once you've got Hub on your computer, you can still choose to open
Unity straight
On Fri, Aug 10, 2018 at 3:35 PM ikaro88 notifications@github.com wrote:
@avrahamraskin https://github.com/avrahamraskin how can i open unity
without this "hub"?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/google-ar/arcore-unity-sdk/issues/158#issuecomment-412069298,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADf0QxIgHdnB-L96Av6WF3XsaWv1zU5Kks5uPX4qgaJpZM4TC5o6
.
--
Avraham Raskin
*AR Creator - *check out my new series '2025' on Instagram
Instagram http://instagram.com/avrahamraskin | Website
http://avrahamrask.in | Medium http://medium.com/@avrahamraskin
I have tried to run without hub but it doesn't help :/
I'm developing on Samsung Galaxy S8. I've tried Unity 2017.3.1 and 2017.4.10. It always gives me blank screen with Searching for Surfaces message.
It also appears the following error on the console:
Couldn't start Instant Preview server with adb path: C:\Users\name\Documents\Android\Sdk\platform-tools\adb.exe.
I've tryed to reinstall android sdk as well as stop and restart adb server via command line. Nothing happens and the same error still occurs.
Any idea?
Hi, ARCore SDK for Unity 1.5.0 has been released and this issue should be fixed. Please feel free to comment if you still experience it.
Hello, I've downloaded and installed the sdk update 1.5.0 but blank screen still occurs with the same error log:
Couldn't start Instant Preview server with adb path "C:\Users\name\AppData\Local\Android\Sdk\platform-tools\adb.exe".
UnityEngine.Debug:LogErrorFormat(String, Object[])
GoogleARCoreInternal.InstantPreviewManager:StartServer(String, String&) (at Assets/GoogleARCore/SDK/InstantPreview/Scripts/InstantPreviewManager.cs:515)
GoogleARCoreInternal.
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
GoogleARCoreInternal.ARCoreAndroidLifecycleManager:CreateSession(ARCoreSession) (at Assets/GoogleARCore/SDK/Scripts/Managers/ARCoreAndroidLifecycleManager.cs:83)
GoogleARCore.ARCoreSession:Awake() (at Assets/GoogleARCore/SDK/Scripts/ARCoreSession.cs:63)
@pablisho Yes, I can confirm the instant preview finally works in Unity editor now, but there is a new issue. When I run the app on the device, I get: "Failure to initialize! - Your hardware does not support this application, sorry!" What does this mean and is there a workaround? There was no problem with ARCore from 1.0 to v1.4.1. I use Unity 2017.4.0, as required.
if i open a new prowect it works, but if i import the new sdk in previus arcore projects the problem still persist...
Deleting GoogleARCore and PlayServiceResolver, and reimporting the project (Asset-> reimport all) fixed the problem for me
@vincentlorant you mean the folders?
Btw doing reimport now the instant preview works (only on unity) but while i compile i have this error:
Error: Duplicate file(s) in apk: 'C:\Users\carlo\Documents\Sviluppo\ArCore Balance\Temp\StagingArea\android-libraries\arcore_unity\libs'
can you help me?
I reimported the project and reinstalled ARCore, but it's still not working for me. In the Editor is a white screen and the Instant Preview App is showing a red Message "Not connected to editor"
Everything was working fine on my Samsung S8+, and then I upgraded to a S9+ and I am now getting the problem, HelloAR says searching for surfaces.. and it just has a white screen above that. I'm on Unity 2018.2.14f1 and ARCore 1.5.0.
Any suggestions on how to get this working again would be greatly appreciated.
When using Samsung Galaxy Note 9, Unity 2017.4.6f1, and ARCore 1.5.0, instant preview gets a white screen. Using a Google Pixel 2 with this setup, however, works fine.
In samsung S8 the error is intermitent. The instant preview worked as it should yesterday. Today it isnt working. I havent installed any updates.
Same here, the instant preview suddenly stopped working 2 days ago(Honor 10, Unity 2018.2.13f1, and ARCore 1.5)
EDIT: Not sure if that was the case, but update Unity to the 2018.2.14f1 did solve the issue.
Using ARCore v1.5 on a Mac with a rooted OnePlus 5. It shows the white screen on a fresh import and the helloAR example.
Same here, the instant preview suddenly stopped working 2 days ago(Honor 10, Unity 2018.2.13f1, and ARCore 1.5)
EDIT: Not sure if that was the case, but update Unity to the 2018.2.14f1 did solve the issue.
Same here too :(
Honor 8X, Unity 2018.3.0f2, ARCore 1.6.
this error still occurs, should be oppened no? :(
I get this same error on mac OS, Unity 2019.1, ARcore 1.12.0
Same problem. mac OS, Unity 2020.1.10f1, ARCore XR Plugin 3.1.8 ?
Most helpful comment
Same here, the instant preview suddenly stopped working 2 days ago(Honor 10, Unity 2018.2.13f1, and ARCore 1.5)
EDIT: Not sure if that was the case, but update Unity to the 2018.2.14f1 did solve the issue.