[🐛] Unable to upload images in chat with camera.
Issue
When uploading images with the camera I get a Not supported error overlay on the image preview. I suspect that this occurs because the image has no file name. We previously fixed this issue by handling the image upload ourselves using the uploadNewImage property on MessageInput but now only triggers that function when using the image picker gallery and not the camera.
Steps to reproduce
Steps to reproduce the behavior:
- Click on the plus button to add an attachment.
- Click on the camera icon.
- Take a picture
Expected behavior
For the image to upload and not show the "Not supported" error in preview or for me to handle the image upload myself through the uploadNewImage property.
Project Related Information
Customization
Click To Expand
# N/A
Offline support
- [ ] I have enabled offline support.
- [ ] The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)
Environment
Click To Expand
package.json:
{
"version": "5.0.2",
"scripts": {
"prestart": "tsc --noEmit",
"tsc:watch": "tsc --noEmit --watch",
"start": "concurrently --raw -n \"TSC,EXPO\" -c \"blue,green\" \"yarn tsc:watch\" \"npx expo start\"",
"start:no-cache": "expo start --clear",
"start:android": "expo start --android",
"start:ios": "expo start --ios",
"start:web": "expo start --web",
"debug": "open 'rndebugger://set-debugger-loc?host=localhost&port=19000' && expo start --ios",
"eject": "expo eject",
"test": "jest",
"test:unit": "jest",
"android": "npx expo run:android",
"ios": "npx expo run:ios",
"format": "prettier --write .",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"lint:fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix"
},
"dependencies": {
"@aws-amplify/cli-extensibility-helper": "^3.0.30",
"@aws-amplify/datastore": "^3.12.5",
"@expo/config-plugins": "~9.0.0",
"@expo/metro-runtime": "~4.0.1",
"@microsoft/react-native-clarity": "^4.1.0",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-community/datetimepicker": "8.2.0",
"@react-native-community/netinfo": "11.4.1",
"@react-native-firebase/app": "^21.7.1",
"@react-native-firebase/auth": "^21.7.1",
"@react-native-firebase/crashlytics": "^21.7.1",
"@react-native-firebase/messaging": "^18.8.0",
"@react-native-picker/picker": "2.9.0",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/drawer": "^7.1.1",
"@react-navigation/material-top-tabs": "^7.1.0",
"@react-navigation/native": "^7.0.14",
"@react-navigation/stack": "^7.1.1",
"@sentry/integrations": "^7.8.1",
"@sentry/minimal": "^6.19.7",
"@sentry/react-native": "~6.3.0",
"@sentry/tracing": "^7.99.0",
"@sentry/types": "^7.8.1",
"@shopify/flash-list": "1.7.1",
"@types/uuid": "^8.3.4",
"amazon-cognito-identity-js": "^4.6.3",
"aws-amplify": "^4.3.17",
"aws-amplify-react-native": "^6.0.8",
"buffer": "^4.9.2",
"compare-versions": "^4.1.3",
"container-validator": "^1.1.0",
"expo": "~52.0.26",
"expo-application": "~6.0.2",
"expo-build-properties": "~0.13.2",
"expo-cellular": "~7.0.2",
"expo-clipboard": "~7.0.1",
"expo-constants": "~17.0.4",
"expo-dev-client": "~5.0.9",
"expo-device": "~7.0.2",
"expo-doctor": "^1.1.3",
"expo-document-picker": "~13.0.2",
"expo-file-system": "~18.0.7",
"expo-font": "~13.0.3",
"expo-haptics": "~14.0.1",
"expo-image": "~2.0.4",
"expo-image-manipulator": "^13.0.6",
"expo-image-picker": "~16.0.4",
"expo-intent-launcher": "~12.0.2",
"expo-linking": "~7.0.4",
"expo-location": "~18.0.5",
"expo-media-library": "~17.0.5",
"expo-navigation-bar": "~4.0.7",
"expo-notifications": "~0.29.12",
"expo-secure-store": "~14.0.1",
"expo-sharing": "~13.0.1",
"expo-status-bar": "~2.0.1",
"expo-task-manager": "~12.0.4",
"expo-updates": "~0.26.13",
"fbemitter": "^3.0.0",
"graphql": "^14.0.0",
"graphql-tag": "^2.11.0",
"i18n-js": "^3.9.2",
"install": "^0.13.0",
"jest": "^29.2.1",
"jest-html-reporters": "^3.0.11",
"jest-junit": "^15.0.0",
"libphonenumber-js": "^1.9.42",
"patch-package": "^6.5.1",
"postinstall-postinstall": "^2.1.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "^7.34.2",
"react-native": "0.76.6",
"react-native-blob-util": "^0.19.9",
"react-native-collapsible": "^1.6.0",
"react-native-confirmation-code-field": "^7.1.0",
"react-native-country-picker-modal": "^2.0.0",
"react-native-gesture-handler": "~2.20.2",
"react-native-get-random-values": "~1.11.0",
"react-native-pager-view": "6.5.1",
"react-native-paper": "^4.12.4",
"react-native-pdf": "^6.7.4",
"react-native-push-notification-popup": "^1.6.1",
"react-native-reanimated": "~3.16.1",
"react-native-responsive-fontsize": "^0.5.1",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.4.0",
"react-native-simple-toast": "^1.1.3",
"react-native-svg": "15.8.0",
"react-native-tab-view": "^3.1.1",
"react-native-web": "~0.19.13",
"react-native-webview": "13.12.5",
"react-native-youtube-iframe": "^2.2.2",
"stream-chat-expo": "^6.2.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@types/fbemitter": "^2.0.35",
"@types/i18n-js": "^3.8.2",
"@types/react": "~18.3.12",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"concurrently": "^8.2.2",
"eslint": "^8.19.0",
"eslint-config-universe": "^11.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react-native": "^5.0.0",
"eslint-plugin-unused-imports": "^4.1.4",
"fs-extra": "^9.1.0",
"graphql-default-value-transformer": "^2.0.1",
"graphql-ttl-transformer": "1",
"jest-expo": "~52.0.3",
"jest-html-reporter": "^3.3.0",
"log-timestamp": "^0.3.0",
"metro-config": "^0.80.0",
"mocha": "^8.3.2",
"prettier": "^2.7.1",
"tsc-watch": "^6.2.0",
"typescript": "~5.3.3"
},
"eslintConfig": {
"extends": "universe/native"
},
"private": true,
"name": "trans-it-mobile-app"
}
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [x] iOS
- [x] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
stream-chat-react-nativeversion you're using that has this issue:6.2.0
- Device/Emulator info:
- [X] I am using a physical device
- OS version:
Android 15
Additional context
Screenshots
Click To Expand
Hey @1lander, for camera can you instead call takeAndUploadImage?
:tada: This issue has been resolved in version 6.6.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
takeAndUploadImage
This property does not seem to exist.
The issue is resolved with the latest version. File names get set correctly now so I don't need to try and do it myself.