Closed msamirma closed 4 years ago
I am running into problems with my project as well. Things using ExpoPixi.Sketch
and sketch.takeScreenshotAsync()
worked fine on expo v38 for a "signature capture" solution. With the upgrade to expo v39, I am getting this in my console:
EXGL: gl.pixelStorei() doesn't support this parameter yet!
Though I don't know that this is the root of my issue. (My app keeps failing trying to upload the byte stream coming back from takeScreenshotAsync()
. Still investigating . . .)
During my investigation, I decided to try the examples from this proect (expo-pixi/examples).
To get them running (successfully!!!) in my iOS simulator, here's what I did:
git clone https://github.com/expo/expo-pixi.git
cd expo-pixi/examples/sketch
yarn install
<<--- there will be errors"expo-pixi": "^1.2.0",
expo upgrade
<<--- I answered "yes" to all questions (though I skipped upgrading client on emulators)expo install expo-gl
<<-- without this, expo start
will fail complaining about expo-gl not being availableexpo start
And the app runs in the iOS simulator just fine, with the exception of the warning message in the console mentioned above.
Still investigating the uploading the byte-stream issue...
Follow up: my code is back to working. Was not (necessarily?) an issue with Expo-Pixi. It seems that the behaviour of fetch()
has changed with my upgrade to expo v39.
I was doing:
const {uri} = await sketch.takeSnapshotAsync({format: 'png', compress: 0.1});
let response = await fetch(uri);
let blob = await response.blob();
uploadToFirebaseStorage(blob, "my-new-file-name.png");
that worked under expo v38, but with v39 it was failing with a network error from the fetch()
line.
With v39, this is the code that is now working:
const {uri} = await sketch.takeSnapshotAsync({format: 'png', compress: 0.1});
let str = await FileSystem.readAsStringAsync(uri, {encoding: 'base64'});
str = 'data:image/png;base64,' + str;
let response = await fetch(uri);
let blob = await response.blob();
uploadToFirebaseStorage(blob, "my-new-file-name.png");
(If anyone can recommend a clearer approach to the above, much appreciate in advance!!)
So, from my POV, there was a behaviour change between v38 and v39 but expo-pixi wasn't to blame in my use case and it is now working again!
Same here. Getting this on Expo 39:
EXGL: gl.pixelStorei() doesn't support this parameter yet!
Same here. Getting this on Expo 39:
I still get that warning, but it doesn't seem to impede capabilities that I can tell.
I will close this issue as these warning not cause issue when running expo-pixi
After upgrade to expo sdk 39, i got multiple warnings. expo-asset-utils@1.2.0" has incorrect peer dependency "expo-asset@~4.0.0" expo-asset-utils@1.2.0" has incorrect peer dependency "expo-file-system@~4.0.0" expo-asset-utils@1.2.0" has incorrect peer dependency "expo-font@~4.0.0"
And some functions like
const sprite = await PIXI.Sprite.fromExpoAsync( 'http://i.imgur.com/uwrbErh.png', ); app.stage.addChild(sprite);
not working anymore. @EvanBacon help would be appreciated