ARCore runtime error when using M_SceneDepthOcclusion material

Hi, I’m using 5.4.3 and the ARCore Plugin. Using the M_SceneDepthOcclusion material from Engine/Plugins/Google ARCore works fine in the editor, but after building and running it on my android smartphone (Pixel 8 Pro) it crashes after a few seconds with the following errors:

LogPlayLevel: Error: UAT: 08-14 12:47:14.715  8045  8476 D UE      : [2024.08.14-10.47.14:715][  0]LogRHI: Error: External compile of program Program V_B58E8C744DCFBE26F25919EDC8F510C1E8DA7F84_P_D7AEFE3F468E47AF378D6EFF5651BE0D7FF9A6DA failed: Failed to compile shader type: pixel shader log: 0:68: L0001: Typename expected, found 'samplerExternalOES'

LogPlayLevel: Error: UAT: 08-14 12:47:16.766  8045  8208 D UE      : [2024.08.14-10.47.16:766][  1]LogGoogleARCore: Error: SetCameraTextureIds 4 textures

LogPlayLevel: Error: UAT: 08-14 12:47:17.533  8045  8465 D UE      : [2024.08.14-10.47.17:533][ 19]LogRHI: Error: Shader:

… lots of shader code …

LogPlayLevel: Error: UAT: 08-14 12:47:17.533  8045  8465 D UE      : [2024.08.14-10.47.17:533][ 19]LogRHI: Error: Failed to compile shader. Compile log:
LogPlayLevel: UAT: 08-14 12:47:17.533  8045  8465 D UE      : 0:68: L0001: Typename expected, found 'samplerExternalOES'
LogPlayLevel: UAT: 08-14 12:47:17.533  8045  8465 D UE      : Ensure condition failed: bSuccessfullyCompiled [File:./Runtime/OpenGLDrv/Private/OpenGLShaders.cpp] [Line: 761]
LogPlayLevel: UAT: 08-14 12:47:17.533  8045  8465 D UE      :
LogPlayLevel: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogStats: FPlatformStackWalk::StackWalkAndDump -  0.048 s
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: === Handled ensure: ===
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: Ensure condition failed: bSuccessfullyCompiled  [File:./Runtime/OpenGLDrv/Private/OpenGLShaders.cpp] [Line: 761]
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: Stack:
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077DB4A4E04 libUnreal.so(0x00000000113F0E04)!FOpenGLShader::Compile(unsigned int)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077DB4B0D04 libUnreal.so(0x00000000113FCD04)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077DB4AF384 libUnreal.so(0x00000000113FB384)!FOpenGLDynamicRHI::RHICreateBoundShaderState_OnThisThread(FRHIVertexDeclaration*, FRHIVertexShader*, FRHIPixelShader*, FRHIGeometryShader*, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077DB47743C libUnreal.so(0x00000000113C343C)!FOpenGLDynamicRHI::RHICreateBoundShaderState_internal(FRHIVertexDeclaration*, FRHIVertexShader*, FRHIPixelShader*, FRHIGeometryShader*, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077DB477170 libUnreal.so(0x00000000113C3170)!FOpenGLDynamicRHI::RHISetGraphicsPipelineState(FRHIGraphicsPipelineState*, unsigned int, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D59E57F8 libUnreal.so(0x000000000B9317F8)!FRHICommand<FRHICommandSetGraphicsPipelineState, FRHICommandSetGraphicsPipelineStateString1672>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D5A15348 libUnreal.so(0x000000000B961348)!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D5A56344 libUnreal.so(0x000000000B9A2344)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D3C8CA90 libUnreal.so(0x0000000009BD8A90)!TGraphTask<TFunctionGraphTaskImpl<void (), (ESubsequentsMode::Type)0> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D3C9AF68 libUnreal.so(0x0000000009BE6F68)!FNamedTaskThread::ProcessTasksNamedThread(int, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D3C9940C libUnreal.so(0x0000000009BE540C)!FNamedTaskThread::ProcessTasksUntilQuit(int)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D5BEE794 libUnreal.so(0x000000000BB3A794)!FRHIThread::Run()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D3E95F90 libUnreal.so(0x0000000009DE1F90)!FRunnableThreadPThread::Run()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x00000077D3C915F8 libUnreal.so(0x0000000009BDD5F8)!FRunnableThreadPThread::_ThreadProc(void*)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x0000007B2F762FC0 libc.so(0x000000000006EFC0)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error: [Callstack] 0x0000007B2F754D64 libc.so(0x0000000000060D64)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.581  8045  8465 D UE      : [2024.08.14-10.47.17:581][ 20]LogOutputDevice: Error:
LogPlayLevel: UAT: 08-14 12:47:17.588  8045  8465 D UE      : [2024.08.14-10.47.17:588][ 20]LogStats:                SubmitErrorReport -  0.000 s
LogPlayLevel: UAT: 08-14 12:47:17.588  8045  8465 D UE      : [2024.08.14-10.47.17:588][ 20]LogStats:                    SendNewReport -  0.000 s
LogPlayLevel: UAT: 08-14 12:47:17.588  8045  8465 D UE      : [2024.08.14-10.47.17:588][ 20]LogStats:             FDebug::EnsureFailed -  0.055 s
LogPlayLevel: Error: UAT: 08-14 12:47:17.589  8045  8465 D UE      : [2024.08.14-10.47.17:589][ 20]LogRHI: Error: Failed to link program. Current total programs: 209 program binary bytes, last gl error 0x0, drvalloc 2664948
LogPlayLevel: UAT: 08-14 12:47:17.589  8045  8465 D UE      :   log:
LogPlayLevel: UAT: 08-14 12:47:17.589  8045  8465 D UE      : Link failed because of invalid fragment shader.
LogPlayLevel: Error: UAT: 08-14 12:47:17.611  8045  8465 D UE      : Fatal error: [File:./Runtime/OpenGLDrv/Private/OpenGLShaders.cpp] [Line: 2976]
LogPlayLevel: UAT: 08-14 12:47:17.611  8045  8465 D UE      : Failed to link program [Program V_B58E8C744DCFBE26F25919EDC8F510C1E8DA7F84_P_D7AEFE3F468E47AF378D6EFF5651BE0D7FF9A6DA]. Current total programs: 209, precompile: 0
LogPlayLevel: Error: UAT: 08-14 12:47:17.611  8045  8465 D UE      : [2024.08.14-10.47.17:611][ 20]Fatal error: [File:./Runtime/OpenGLDrv/Private/OpenGLShaders.cpp] [Line: 2976]

and a few lines later

LogPlayLevel: Error: UAT: 08-14 12:47:17.611  8045  8465 D UE      : [2024.08.14-10.47.17:611][ 20]LogAndroid: Error: === Critical error: ===
LogPlayLevel: Error: UAT: 08-14 12:47:17.611  8045  8465 D UE      : [2024.08.14-10.47.17:611][ 20]LogAndroid: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.611  8045  8465 D UE      : [2024.08.14-10.47.17:611][ 20]LogAndroid: Error: Fatal error: [File:./Runtime/OpenGLDrv/Private/OpenGLShaders.cpp] [Line: 2976]
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:611][ 20]LogAndroid: Error: Failed to link program [Program V_B58E8C744DCFBE26F25919EDC8F510C1E8DA7F84_P_D7AEFE3F468E47AF378D6EFF5651BE0D7FF9A6DA]. Current total programs: 209, precompile: 0
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077DB4B04F0 libUnreal.so(0x00000000113FC4F0)!FOpenGLDynamicRHI::RHICreateBoundShaderState_OnThisThread(FRHIVertexDeclaration*, FRHIVertexShader*, FRHIPixelShader*, FRHIGeometryShader*, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077DB47743C libUnreal.so(0x00000000113C343C)!FOpenGLDynamicRHI::RHICreateBoundShaderState_internal(FRHIVertexDeclaration*, FRHIVertexShader*, FRHIPixelShader*, FRHIGeometryShader*, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077DB477170 libUnreal.so(0x00000000113C3170)!FOpenGLDynamicRHI::RHISetGraphicsPipelineState(FRHIGraphicsPipelineState*, unsigned int, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D59E57F8 libUnreal.so(0x000000000B9317F8)!FRHICommand<FRHICommandSetGraphicsPipelineState, FRHICommandSetGraphicsPipelineStateString1672>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D5A15348 libUnreal.so(0x000000000B961348)!FRHICommandListBase::Execute(TRHIPipelineArray<IRHIComputeContext*>&, FRHICommandListBase::FPersistentState::FGPUStats*)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D5A56344 libUnreal.so(0x000000000B9A2344)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D3C8CA90 libUnreal.so(0x0000000009BD8A90)!TGraphTask<TFunctionGraphTaskImpl<void (), (ESubsequentsMode::Type)0> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D3C9AF68 libUnreal.so(0x0000000009BE6F68)!FNamedTaskThread::ProcessTasksNamedThread(int, bool)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D3C9940C libUnreal.so(0x0000000009BE540C)!FNamedTaskThread::ProcessTasksUntilQuit(int)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D5BEE794 libUnreal.so(0x000000000BB3A794)!FRHIThread::Run()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D3E95F90 libUnreal.so(0x0000000009DE1F90)!FRunnableThreadPThread::Run()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x00000077D3C915F8 libUnreal.so(0x0000000009BDD5F8)!FRunnableThreadPThread::_ThreadProc(void*)  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x0000007B2F762FC0 libc.so(0x000000000006EFC0)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error: [Callstack] 0x0000007B2F754D64 libc.so(0x0000000000060D64)![Unknown]()  []
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error:
LogPlayLevel: Error: UAT: 08-14 12:47:17.612  8045  8465 D UE      : [2024.08.14-10.47.17:612][ 20]LogAndroid: Error:

It seems, that the material shader compilation went wrong, but I can’t figure out how to fix this. Any ideas, how to fix this issue? Other forum threads seemed to get it working with 5.1 or 5.0. (https://forums.unrealengine.com/t/render-in-main-pass-ar-android/472666/4) so why isn’t it working in 5.4? Oo

Any help will be greatly appreciated.

thx and br :slight_smile: