Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video and photo upload not working on all devices #1191

Closed
rasos opened this issue Sep 12, 2019 · 9 comments
Closed

Video and photo upload not working on all devices #1191

rasos opened this issue Sep 12, 2019 · 9 comments

Comments

@rasos
Copy link

rasos commented Sep 12, 2019

We have tested photo and video on several devices. Not all devices support that yet.

Taking a photo or video does not start at all on a Nexus Tablet with Android 7.1.1.
On a Huawei P10 Plus, Android 9 we can make the video and after that when I can click on the hook to upload the video I automatically return to the chat, but with no uploaded video.

It works fine on a Fairphone 2 with Android 7.1.1, though.

  • Your Rocket.Chat Experimental app version: 1.19
  • Your Rocket.Chat server version: 0.74.1

#712

@diegolmello
Copy link
Member

@rasos Does the app crash? Can you send us some log report?

@rasos
Copy link
Author

rasos commented Sep 20, 2019

@diegolmello It seems to be simply a permission issue on our test tablet Nexus 7. Even if the app asks for both permissions to access the camera and have access to stored data, access to image-crop-picker is denied.

Here is the logcat when pressing Take a photo and Take a video:

09-20 18:33:18.366 32264 32411 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
09-20 18:33:18.372 32264 32411 E image-crop-picker: Promise rejected. Permission denied
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: Sending exception: Error - Permission denied l@index.android.bundle:13:1747
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: index.android.bundle:13:1194
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:3799
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: index.android.bundle:21:1076
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:2710
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:1046
09-20 18:33:18.401 32264 32411 I bugsnag-react-native: value@[native code]
09-20 18:33:18.515 32264 32275 I art     : Background sticky concurrent mark sweep GC freed 99695(4MB) AllocSpace objects, 37(880KB) LOS objects, 11% free, 44MB/50MB, paused 9.139ms total 106.974ms
09-20 18:33:19.928 32264 32429 W FirebaseRemoteConfig: No value of type 'String' exists for parameter key 'sessions_max_length_minutes'.
09-20 18:33:19.928 32264  3214 W FirebaseRemoteConfig: No value of type 'String' exists for parameter key 'sessions_feature_enabled'.
09-20 18:33:26.333 32264 32411 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
09-20 18:33:26.335   476   488 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@69adb7 attribute=null, token = android.os.BinderProxy@8c42188
09-20 18:33:26.340 32264 32411 E image-crop-picker: Promise rejected. Permission denied
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: Sending exception: Error - Permission denied l@index.android.bundle:13:1747
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: index.android.bundle:13:1194
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:3799
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: index.android.bundle:21:1076
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:2710
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: value@index.android.bundle:21:1046
09-20 18:33:26.368 32264 32411 I bugsnag-react-native: value@[native code]

@diegolmello
Copy link
Member

@rasos We'll take a look. Thanks.

@alleniver
Copy link

alleniver commented Sep 24, 2019

i have a same problem!

@alleniver
Copy link

Could be used normally when I restart The Rocket.Chat Server.

@rasos
Copy link
Author

rasos commented Sep 25, 2019

Photo upload now works on a Nexus Tablet with Andorid 7.1.1 with a fresh 1.20 develop build.

Taking a video throws exception:


09-25 07:58:38.015  8830  8830 W unknown:ReactNative: Receiver already unregistered
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: java.lang.IllegalArgumentException: Receiver not registered: org.wonday.orientation.OrientationModule$2@bca72ac
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1007)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1330)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:608)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at org.wonday.orientation.OrientationModule.onHostDestroy(OrientationModule.java:375)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.bridge.ReactContext.onHostDestroy(ReactContext.java:252)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.ReactInstanceManager.moveToBeforeCreateLifecycleState(ReactInstanceManager.java:688)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.ReactInstanceManager.onHostDestroy(ReactInstanceManager.java:597)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.ReactInstanceManager.onHostDestroy(ReactInstanceManager.java:611)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.ReactActivityDelegate.onDestroy(ReactActivityDelegate.java:122)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.facebook.react.ReactActivity.onDestroy(ReactActivity.java:70)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.Activity.performDestroy(Activity.java:6881)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1154)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4190)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4221)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ActivityThread.-wrap6(ActivityThread.java)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.os.Looper.loop(Looper.java:154)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at android.app.ActivityThread.main(ActivityThread.java:6126)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at java.lang.reflect.Method.invoke(Native Method)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
09-25 07:58:38.015  8830  8830 W unknown:ReactNative: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
09-25 07:58:38.015  8830  8830 D ReactNativeNotifs: onHostDestroy

@paolo050181
Copy link

Hello,
i cannot upload image from mobile and browser.
the debug error when i try is:
API ➔ debug POST: /api/v1/rooms.upload/rAkEiEbmzPWRdPC6k
Meteor ➔ method canAccessRoom -> userId: 6Q7PvzYcaktD56Jwb, arguments: ["rAkEiEbmzPWRdPC6k","6Q7PvzYcaktD56Jwb"]
Error: FileNotFound: no file with id cJtg56H5ZCDf49eyZ found
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/gridfs-stream/index.js:188:25
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:410:17
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:398:11
at ClientSession.endSession (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/sessions.js:134:41)
at executeCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:395:17)
at deleteCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:349:17)
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:364:54
at handleCallback (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:128:55)
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/collection_ops.js:1259:5
at handler (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:1155:22)
at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:397:18
at processTicksAndRejections (internal/process/task_queues.js:75:11)
API ➔ debug post rooms.upload/:rid threw an error: TypeError: sharp is not a function
at LocalStore.uploadsOnValidate [as onValidate] (app/file-upload/server/lib/FileUpload.js:232:13)
at LocalStore.validate (packages/jalik:ufs/ufs-store.js:597:18)
at MethodInvocation.ufsComplete (packages/jalik:ufs/ufs-methods.js:79:23)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
at packages/ddp-server/livedata_server.js:1689:15
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at packages/ddp-server/livedata_server.js:1687:36
at new Promise ()
at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12)
at Server.apply (packages/ddp-server/livedata_server.js:1625:26)
at Server.call (packages/ddp-server/livedata_server.js:1607:17)
at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:513:24)
at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:538:15)
at FileUploadClass.insertSync (packages/meteor.js:306:21)
at DDPCommon.MethodInvocation. (app/api/server/v1/rooms.js:122:35)
at packages/dispatch_run-as-user.js:211:14
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
at Object.post (app/api/server/v1/rooms.js:120:27)
at app/api/server/api.js:343:82
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:343:39)
at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
at packages/nimble_restivus/lib/route.coffee:59:33
at packages/simple_json-routes.js:98:9
=> awaited here:
at Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
at Server.apply (packages/ddp-server/livedata_server.js:1638:22)
at Server.call (packages/ddp-server/livedata_server.js:1607:17)
at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:513:24)
at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:538:15)
at FileUploadClass.insertSync (packages/meteor.js:306:21)
at DDPCommon.MethodInvocation. (app/api/server/v1/rooms.js:122:35)
at packages/dispatch_run-as-user.js:211:14
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
at Object.post (app/api/server/v1/rooms.js:120:27)
at app/api/server/api.js:343:82
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:343:39)
at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
at packages/nimble_restivus/lib/route.coffee:59:33
at packages/simple_json-routes.js:98:9
API ➔ debug Failure {
statusCode: 400,
body: {
success: false,
error: 'sharp is not a function',
stack: undefined
}
}
i have a problem only for pic, video and pdf work correctly.
Some information:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Rocket.Chat Version: 3.0.12 |
NodeJS Version: 12.14.0 - arm64
MongoDB Version: 4.2.5
MongoDB Engine: wiredTiger
Platform: linux
Process Port: 3000
Site URL: http://xxx.xxxx.it/
ReplicaSet OpLog: Enabled
Commit Hash: 15ac7670be
Commit Branch: HEAD
Could you help me?
Regards
Paolo

@diegolmello
Copy link
Member

Is this still a thing?

@rasos
Copy link
Author

rasos commented Jan 19, 2021

Passed our tests we did last summer and no more complaints from users. Closing.

@rasos rasos closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants