GetStream/react-native-activity-feed

StatusUpdateForm image upload error

Closed this issue · 3 comments

Setup (always fill this in):

  • iOS or Android?
    iOS

  • Expo or regular React Native?
    Expo

  • React Native Version:

❯ yarn list --pattern expo-activity-feed
yarn list v1.22.4
└─ expo-activity-feed@0.9.1
  • getstream version:
❯ yarn list --pattern get-stream
yarn list v1.22.4
└─ get-stream@4.1.0

Describe the bug:
When pressing the image button in the StatusUpdateForm component, the following error occurs:

Error: The following APIs have moved to separate packages and importing them from the "expo" package is no longer supported: Permissions.

1. Add correct versions of these packages to your project using:

   expo install expo-permissions

   If "install" is not recognized as an expo command, update your expo-cli installation.

2. Change your imports so they use specific packages instead of the "expo" package:

 - import { Permissions } from 'expo' -> import * as Permissions from 'expo-permissions'



throwError
    removedModule.js:36:19
_callTimer
    JSTimers.js:135:14
callTimers
    JSTimers.js:387:16
__callFunction
    MessageQueue.js:425:19
__guard$argument_0
    MessageQueue.js:112:6
__guard
    MessageQueue.js:373:10
callFunctionReturnFlushedQueue
    MessageQueue.js:111:4
callFunctionReturnFlushedQueue
    [native code]:0

To Reproduce
Steps to reproduce the behavior:

  1. Create a component using the StatusUpdateForm like the following:
const HomeScreen = () => {
  return (
    <View style={{ flex: 1 }}>
      <StreamApp
        apiKey="apikey"
        appId="appid"
        token={token}
      >
        <FlatFeed Activity={CustomActivity} notify />
        <StatusUpdateForm feedGroup="timeline" />
      </StreamApp>
    </View>
  );
};
  1. Press the "image" icon in StatusUpdateForm to choose an image from the camera roll, this causes the above error message.

Expected behavior

I think this should prompt the user to grant the app permissions to their camera roll. They can then choose an image from the camera roll to add to their post.

Screenshots
n/a

Additional context
n/a

Hey @fwdevin we will update the fix for this soon.

Great thanks @vishalnarkhede !

@vishalnarkhede This would be great to fix. We're planning to ship tomorrow and this is a blocker. Any ETA on when you'll be fixing this?