expo-pixi icon indicating copy to clipboard operation
expo-pixi copied to clipboard

Pixi is not working on Android with SDK29.0.0

Open JinHoSo opened this issue 5 years ago • 8 comments

I got the following error message

[Unhandled promise rejection: Error: unexpected url: file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540rustykey%252Fexpo-pixi/5EOyTDQ.jpg]

I think that accessing a file in cache has a problem.

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Expo from 'expo';
import ExpoPixi from 'expo-pixi';
export default class App extends React.Component {
  render() {
    return (
      <Expo.GLView
        style={{ flex: 1, width:300, height:300 }}
        onContextCreate={async context => {
          const app = ExpoPixi.application({ context });
          const sprite = await ExpoPixi.spriteAsync(
            'https://i.imgur.com/5EOyTDQ.jpg',
          );
          app.stage.addChild(sprite);
        }}
      />
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

JinHoSo avatar Sep 02 '18 06:09 JinHoSo

Can confirm - getting the same error here.

bogdan-calapod avatar Sep 09 '18 16:09 bogdan-calapod

If I understand correctly from the referenced issue, the problem is in expo-pixi ? Or in expo-gl ?

Is there any workaround (however complicated as it may be) that we could use in the meantime ? I've tried using it with FilterImage, passing base64 data as the uri, but all options throw the same error. Works fine on iOS.

bogdan-calapod avatar Sep 10 '18 19:09 bogdan-calapod

@bogdan-calapod I guess that issue is related with cache, even you would get the same error when you are using 'http' for an image

JinHoSo avatar Sep 12 '18 06:09 JinHoSo

https://github.com/expo/expo/issues/2167

JinHoSo avatar Sep 12 '18 06:09 JinHoSo

Still broken in SDK 30.0.0

bogdan-calapod avatar Sep 18 '18 11:09 bogdan-calapod

Still broken in SDK 30.0.0

Please add constructive feedback, the root issue isn't closed - therefore this one isn't either

EvanBacon avatar Oct 02 '18 01:10 EvanBacon

The error is still there (On Android). Is there any update about this problem? "expo": "^30.0.1", "expo-pixi": "^0.3.1", "react": "16.3.1", "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",


[Unhandled promise rejection: Error: unexpected url: content://media/external/images/media/1635]

Stack trace:
  node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:121:42 in createErrorFromErrorData
  node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:78:57 in <unknown>
  node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:398:4 in __invokeCallback
  node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:137:28 in <unknown>
  node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:314:6 in __guardSafe
  node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:136:17 in invokeCallbackAndReturnFlushedQueue
  ...
`

gabgagnon avatar Nov 19 '18 22:11 gabgagnon

It seems not working properly on Android devices. I've got the same error when trying with the example code. Mine is Redmi Note 5 Pro. "expo": "^32.0.0", "expo-asset-utils": "^1.0.0", "expo-pixi": "^1.0.1", "react": "16.5.0", "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",

baochungit avatar Mar 21 '19 16:03 baochungit