expo44 crash. problem with cyclic file import

GLView causes crash on startup.
problem with cyclic file import

SDK Version: 44
Platforms: Android, iOS


import { GLView } from 'expo-gl';
 * only import
import {PIXI} from 'expo-pixi';
import {THREE} from 'expo-three';

Can someone from expo developers help me? I haven’t been able to do anything for a month now.

It looks like it’s fixed in Fix cryptic error · expo/browser-polyfill@99e65a2 · GitHub but the package was not updated

A workaround you can use for now is to add

import {THREE} from 'expo-three';
delete global.WebGLRenderingContext;
1 Like

in the test repository it helped, but in the main repository it also crashes (

The issue appears because the polyfill library is overriding global.WebGLRenderingContex and expo-gl is seeing that function so it does not configure it’s own implementation

delete global.WebGLRenderingContext needs to be called after all imports to that polyfill happen, but before GLView is created, probably the best place to place this delete statement is in your entrypoint after the last import statement

1 Like

I did that, but it doesn’t work in the main project. And our developers claim that this is not a solution to the problem - just removing support for older devices.

this is the solution (workaround to be precise) to the problem you described in there first comment, if there is a different issue we can’t help without without more info